Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Before a migrate is carried out, we wish to check that the current state of the instance is ready for migration with a pre-check - effectively like a healthcheck.

Only once this done should we be able to trigger migrate.

Assumptions:

  • Only the participants can execute a effective precheck.
  • Precheck is executed before the migration, if it fail the migration will be not executed.
  • User needs to receive the result of the precheck.
  • Acm-runtime needs to handle the precheck fail in a different way it handles migration fail.

Solution: create a new flow for migration-precheck.

User can send the action migration-precheck POST. The user can do the action migration POST after that. The migration flow will be unchanged and backwards-compatible.

  • User send migration-precheck action
  • Acm-runtime set the instance in "MIGRATING-PRECHECK" deployState
  • Acm-runtime sends migration-precheck message to participants (it will be AUTOMATION_COMPOSITION_MIGRATION message with Boolean flag "precheck" set to true)
  • Participant receives migration-precheck message and executes the precheck and sends the result
  • Acm-runtime receives precheck-result messages from all participants
  • Acm-runtime shows this result into the stateChangeResult (deployState will be in "DEPLOYED" state)
    • NO_ERROR: means the migration is valid
    • NOT_VALID: means the migration is not valid (is better do no create confusion wit FAILED)

How the user can send the action migration-precheck POST?

Below the list of solutions:

  • parameter in POST action: {{address}}:{{port}}/onap/policy/clamp/acm/v2/compositions/{{compositionId}}/instances?precheck=true
  • new filed into the Body:
name: DemoInstance0
version: 1.0.1
compositionId: {{composition1Id}}
instanceId: {{instanceId}}
compositionTargetId: {{composition2Id}}
precheck: true
  • No labels