From: waynedunican Date: Thu, 10 Jul 2025 08:26:06 +0000 (+0100) Subject: Update clamp docs with rollback functionality X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a74e8dfb84122298606ec2963b443ae5ba8006fe;p=policy%2Fparent.git Update clamp docs with rollback functionality Issue-ID: POLICY-5194 Change-Id: I1c1094732475e2bdc0a3e13426880518e2f437e7 Signed-off-by: waynedunican --- diff --git a/docs/clamp/acm/acm-user-guide.rst b/docs/clamp/acm/acm-user-guide.rst index dc8f81f5..7f9078c1 100644 --- a/docs/clamp/acm/acm-user-guide.rst +++ b/docs/clamp/acm/acm-user-guide.rst @@ -403,6 +403,24 @@ by the participant. .. literalinclude:: files/AC-migrate.json :language: json +Rollback AC instance (Optional) +------------------------------- + +In the event of a migration failure, the user can rollback to a previous state. + +.. code-block:: bash + + Invoke a POST request + 'http://policy_runtime_ip:port/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}/rollback' + +This returns a 202 response on a successful rollback request. The elements will be in "MIGRATION_REVERTING" deploy state until the completion. +The current status and result can be fetched through the following endpoint. + +.. code-block:: bash + + Invoke a GET request + 'http://policy_runtime_ip:port/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}' + UnDeploy AutomationComposition ------------------------------ The AC instances can be undeployed from the system by the participants. diff --git a/docs/clamp/acm/allowed-operations.rst b/docs/clamp/acm/allowed-operations.rst index 068e790c..7feeb853 100755 --- a/docs/clamp/acm/allowed-operations.rst +++ b/docs/clamp/acm/allowed-operations.rst @@ -55,94 +55,100 @@ CRUD Automation Composition Instance ------------------------------------ AC Definition is PRIMED with NO_ERROR. -+------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| **Action** | **deployState** | **lockState** | **subSate** | **stChResult** | **Description** | -+------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| Create | | | | | Create a new AC instance | -+------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| Update | UNDEPLOYED | | | | Update the AC Instance | -+ +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| | DEPLOYED | LOCKED | | | Start Updating and send update to participants | -+ +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| | UPDATING | LOCKED | | FAILED | Start Updating and send update to participants after UPDATING is failed | -+ +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| | UPDATING | LOCKED | | TIMEOUT | Start Updating and send update to participants after UPDATING got timeout | -+------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| Migrate | DEPLOYED | LOCKED | | | Start Migrating and send migrate to participants | -+------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| | UNDEPLOYED | | | | Start Deleting and send delete to participants | -+ +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| Delete | UNDEPLOYED | | PREPARING | FAILED | Start Deleting and send delete to participants after PREPARING is failed | -+ +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| | UNDEPLOYED | | PREPARING | TIMEOUT | Start Deleting and send delete to participants after PREPARING got timeout | -+ +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| Delete | DELETING | | | FAILED | Start Deleting and send delete to participants after DELETING is failed | -+ +-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ -| | DELETING | | | TIMEOUT | Start Deleting and send delete to participants after DELETING got timeout | -+------------+-----------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ ++------------+---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| **Action** | **deployState** | **lockState** | **subSate** | **stChResult** | **Description** | ++------------+---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| Create | | | | | Create a new AC instance | ++------------+---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| Update | UNDEPLOYED | | | | Update the AC Instance | ++ +---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| | DEPLOYED | LOCKED | | | Start Updating and send update to participants | ++ +---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| | UPDATING | LOCKED | | FAILED | Start Updating and send update to participants after UPDATING is failed | ++ +---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| | UPDATING | LOCKED | | TIMEOUT | Start Updating and send update to participants after UPDATING got timeout | ++------------+---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| Migrate | DEPLOYED | LOCKED | | | Start Migrating and send migrate to participants | ++------------+---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| Rollback | MIGRATING | LOCKED | | FAILED | Start Rolling Back the AC Instance | ++ +---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| | MIGRATING | LOCKED | | TIMEOUT | Start Rolling Back the AC Instance | ++------------+---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| | UNDEPLOYED | | | | Start Deleting and send delete to participants | ++ +---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| Delete | UNDEPLOYED | | PREPARING | FAILED | Start Deleting and send delete to participants after PREPARING is failed | ++ +---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| | UNDEPLOYED | | PREPARING | TIMEOUT | Start Deleting and send delete to participants after PREPARING got timeout | ++ +---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| Delete | DELETING | | | FAILED | Start Deleting and send delete to participants after DELETING is failed | ++ +---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ +| | DELETING | | | TIMEOUT | Start Deleting and send delete to participants after DELETING got timeout | ++------------+---------------------+---------------+-------------+----------------+-----------------------------------------------------------------------------+ Change status of Automation Composition Instance ------------------------------------------------ -+------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| **Action** | **deployState** | **lockState** | **subSate** | **stChResult** | **Description** | -+------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | UNDEPLOYED | | | | Start Deploying and send deploy to participants | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYING | NONE | | FAILED | Start Deploying and send deploy to participants after DEPLOYING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| Deploy | DEPLOYING | NONE | | TIMEOUT | Start Deploying and send deploy to participants after DEPLOYING got timeout | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | UNDEPLOYING | NONE | | FAILED | Start Deploying and send deploy to participants after UNDEPLOYING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | UNDEPLOYING | NONE | | TIMEOUT | Start Deploying and send deploy to participants after UNDEPLOYING got timeout | -+------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKED | | | Start Undeploying and send undeploy to participants | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYING | NONE | | FAILED | Start Undeploying and send undeploy to participants after DEPLOYING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYING | NONE | | TIMEOUT | Start Undeploying and send undeploy to participants after DEPLOYING got timeout | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKED | REVIEWING | FAILED | Start Undeploying and send undeploy to participants after REVIEWING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKED | REVIEWING | TIMEOUT | Start Undeploying and send undeploy to participants after REVIEWING got timeout | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKED | MIGRATION_PRECHECKING | FAILED | Start Undeploying and send undeploy to participants after MIGRATION_PRECHECKING is failed | -+ Undeploy +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKED | MIGRATION_PRECHECKING | TIMEOUT | Start Undeploying and send undeploy to participants after MIGRATION_PRECHECKING got timeout | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | UNDEPLOYING | NONE | | FAILED | Start Undeploying and send undeploy to participants after UNDEPLOYING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | UNDEPLOYING | NONE | | TIMEOUT | Start Undeploying and send undeploy to participants after UNDEPLOYING got timeout | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | UPDATING | LOCKED | | FAILED | Start Undeploying and send update to participants after UPDATING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | UPDATING | LOCKED | | TIMEOUT | Start Undeploying and send update to participants after UPDATING got timeout | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | MIGRATING | LOCKED | | FAILED | Start Undeploying and send update to participants after MIGRATING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | MIGRATING | LOCKED | | TIMEOUT | Start Undeploying and send update to participants after MIGRATING got timeout | -+------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | UNLOCKED | | | Start Locking and send lock to participants | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | UNLOCKING | | FAILED | Start Locking and send lock to participants after UNLOCKING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| Lock | DEPLOYED | UNLOCKING | | TIMEOUT | Start Locking and send lock to participants after UNLOCKING got timeout | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKING | | FAILED | Start Locking and send lock to participants after LOCKING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKING | | TIMEOUT | Start Locking and send lock to participants after LOCKING got timeout | -+------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKED | | | Start Unlocking and send unlock to participants | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | UNLOCKING | | FAILED | Start Unlocking and send unlock to participants after UNLOCKING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| Unlock | DEPLOYED | UNLOCKING | | TIMEOUT | Start Unlocking and send unlock to participants after UNLOCKING got timeout | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKING | | FAILED | Start Unlocking and send unlock to participants after LOCKING is failed | -+ +-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ -| | DEPLOYED | LOCKING | | TIMEOUT | Start Unlocking and send unlock to participants after LOCKING got timeout | -+------------+-----------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ ++------------+---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| **Action** | **deployState** | **lockState** | **subSate** | **stChResult** | **Description** | ++------------+---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | UNDEPLOYED | | | | Start Deploying and send deploy to participants | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYING | NONE | | FAILED | Start Deploying and send deploy to participants after DEPLOYING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| Deploy | DEPLOYING | NONE | | TIMEOUT | Start Deploying and send deploy to participants after DEPLOYING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | UNDEPLOYING | NONE | | FAILED | Start Deploying and send deploy to participants after UNDEPLOYING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | UNDEPLOYING | NONE | | TIMEOUT | Start Deploying and send deploy to participants after UNDEPLOYING got timeout | ++------------+---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKED | | | Start Undeploying and send undeploy to participants | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYING | NONE | | FAILED | Start Undeploying and send undeploy to participants after DEPLOYING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYING | NONE | | TIMEOUT | Start Undeploying and send undeploy to participants after DEPLOYING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKED | REVIEWING | FAILED | Start Undeploying and send undeploy to participants after REVIEWING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKED | REVIEWING | TIMEOUT | Start Undeploying and send undeploy to participants after REVIEWING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKED | MIGRATION_PRECHECKING | FAILED | Start Undeploying and send undeploy to participants after MIGRATION_PRECHECKING is failed | ++ Undeploy +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKED | MIGRATION_PRECHECKING | TIMEOUT | Start Undeploying and send undeploy to participants after MIGRATION_PRECHECKING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | UNDEPLOYING | NONE | | FAILED | Start Undeploying and send undeploy to participants after UNDEPLOYING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | UNDEPLOYING | NONE | | TIMEOUT | Start Undeploying and send undeploy to participants after UNDEPLOYING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | UPDATING | LOCKED | | FAILED | Start Undeploying and send update to participants after UPDATING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | UPDATING | LOCKED | | TIMEOUT | Start Undeploying and send update to participants after UPDATING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | MIGRATING | LOCKED | | FAILED | Start Undeploying and send update to participants after MIGRATING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | MIGRATION_REVERTING | LOCKED | | FAILED | Start Undeploying and send update to participants after MIGRATION_REVERTING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | MIGRATION_REVERTING | LOCKED | | TIMEOUT | Start Undeploying and send update to participants after MIGRATION_REVERTING failed | ++------------+---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | UNLOCKED | | | Start Locking and send lock to participants | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | UNLOCKING | | FAILED | Start Locking and send lock to participants after UNLOCKING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| Lock | DEPLOYED | UNLOCKING | | TIMEOUT | Start Locking and send lock to participants after UNLOCKING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKING | | FAILED | Start Locking and send lock to participants after LOCKING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKING | | TIMEOUT | Start Locking and send lock to participants after LOCKING got timeout | ++------------+---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKED | | | Start Unlocking and send unlock to participants | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | UNLOCKING | | FAILED | Start Unlocking and send unlock to participants after UNLOCKING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| Unlock | DEPLOYED | UNLOCKING | | TIMEOUT | Start Unlocking and send unlock to participants after UNLOCKING got timeout | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKING | | FAILED | Start Unlocking and send unlock to participants after LOCKING is failed | ++ +---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ +| | DEPLOYED | LOCKING | | TIMEOUT | Start Unlocking and send unlock to participants after LOCKING got timeout | ++------------+---------------------------+---------------+-----------------------+----------------+---------------------------------------------------------------------------------------------+ Sub status of Automation Composition Instance --------------------------------------------- diff --git a/docs/clamp/acm/api-protocol/system-level-dialogues.rst b/docs/clamp/acm/api-protocol/system-level-dialogues.rst index 5c47affd..2fc072e7 100644 --- a/docs/clamp/acm/api-protocol/system-level-dialogues.rst +++ b/docs/clamp/acm/api-protocol/system-level-dialogues.rst @@ -267,12 +267,23 @@ The ACM Runtime receives and stores the responses, and send sync message to all .. image:: ../images/system-dialogues/LockResponseStored.png -3.13 Update Operational State, Use State and outProperties on Automation Composition Instance +3.13 Rollback Automation Composition Instance +--------------------------------------------- + +The user requests the AC Instance to be rolled back using a REST endpoint. The ACM Runtime orders the AC Instance to be rolled back. + +.. image:: ../images/system-dialogues/RollbackAcInstance.png + +Each participant rolled back its AC Element from the AC Instance + +.. image:: ../images/system-dialogues/RollbackAcElements.png + +3.14 Update Operational State, Use State and outProperties on Automation Composition Instance --------------------------------------------------------------------------------------------- .. image:: ../images/system-dialogues/UpdateOperationalState.png -3.14 Failure handling in ACM +3.15 Failure handling in ACM ---------------------------- After any ACM operation is completed, one of the following result messages will be updated in the ACM. These result values are updated along with the overall state of the ACM instance. @@ -288,7 +299,7 @@ If the operation succeeds, the participant is required to update the result valu .. image:: ../images/system-dialogues/SuccessAcmResult.png The result value should be updated as 'FAILED' by the participants when any failures occurred. -Also in case of failures, the overall state of the composition/instance remains in any of the transitioning states (DEPLOYING, UNDEPLOYING, PRIMING, DEPRIMING, UPDATING, MIGRATING, PREPARING, REVIEWING, MIGRATION_PRECHECKING) +Also in case of failures, the overall state of the composition/instance remains in any of the transitioning states (DEPLOYING, UNDEPLOYING, PRIMING, DEPRIMING, UPDATING, MIGRATING, PREPARING, REVIEWING, MIGRATION_PRECHECKING, MIGRATION_REVERTING) with the appropriate result values updated by the participant. .. image:: ../images/system-dialogues/FailedAcmResult.png @@ -335,7 +346,7 @@ The following flow shown and example of deployment that get stuck, and the user .. image:: ../images/system-dialogues/TimeoutParticipant.png -3.15 OFF_LINE handling in ACM +3.16 OFF_LINE handling in ACM ----------------------------- Runtime marks the participant state with the value 'OFF_LINE' when the participant replica fails to report the periodic heartbeat, the participant replica state is then marked as 'OFF_LINE' by the ACM-R after the configured waiting limit is reached. diff --git a/docs/clamp/acm/images/system-dialogues/RollbackAcElements.png b/docs/clamp/acm/images/system-dialogues/RollbackAcElements.png new file mode 100644 index 00000000..72b800f7 Binary files /dev/null and b/docs/clamp/acm/images/system-dialogues/RollbackAcElements.png differ diff --git a/docs/clamp/acm/images/system-dialogues/RollbackAcInstance.png b/docs/clamp/acm/images/system-dialogues/RollbackAcInstance.png new file mode 100644 index 00000000..fcc16d20 Binary files /dev/null and b/docs/clamp/acm/images/system-dialogues/RollbackAcInstance.png differ