Add rollback for ACM Migration
ACM-R currently doesn’t revert back the element properties to their previous values if migration fails. Also, if there are new elements added or an element removed in the migration request, those elements will be added/removed in the database before the migration is performed by the participant. This behavior should be improved with a rollback mechanism in the event of failure.
Scenario
Implementation
ACM-R:
add support to store in/out properties as copy before trigger migrate/update
add new endpoint for rollback
add validation for rollback endpoint: rollback can be triggered when the instance is in DeployState as MIGRATING/UPDATING and StateChangeResult as FAILED
Participant-intermediary:
add rollback support
example of rollback method
void rollback(CompositionElementDto compositionElement,
InstanceElementDto instanceElement) throws PfModelException;
Note
Rollback is supposed to support only migration/update fail scenario.
Should rollback support stage?