Orchestrated Removal of Pre-Upgrade Deploy MetapackagesΒΆ
You can use the sw-manager sw-deploy-strategy commands to orchestrate the removal of previously deployed pre-upgrade-deploy metapackages. This reverses a prior pre-upgrade-deploy deployment, returning the system to its state before those metapackages were applied.
When the --remove option is used together with --delete, the
metapackages transition to the available state rather than the
removing state once the strategy completes.
Prerequisites
Pre-upgrade-deploy metapackages have been previously deployed on the system.
No other orchestration strategy is in progress.
All hosts are unlocked, enabled, and available.
The system is clear of alarms (use
--alarm-restrictions relaxedto proceed with non-management-affecting alarms).
Procedure
Create the software deployment orchestration strategy with the
--pre-upgrade-deployand--removeoptions.To remove the pre-upgrade-deploy metapackages and leave them in the
removingstate:~(keystone_admin)]$ sw-manager sw-deploy-strategy create \ --pre-upgrade-deploy --remove <release>
To remove the pre-upgrade-deploy metapackages and return them to the
availablestate, add the--deleteoption:~(keystone_admin)]$ sw-manager sw-deploy-strategy create \ --pre-upgrade-deploy --remove --delete <release>
Where
<release>is the major release whose pre-upgrade-deploy metapackages you want to remove.Note
The
--removeoption requires--pre-upgrade-deploy. Using--removewithout--pre-upgrade-deployresults in a validation error.Wait for the build phase to complete.
~(keystone_admin)]$ sw-manager sw-deploy-strategy show
Verify that
current-phase-completionis100%andstateisready-to-apply.Apply the strategy.
~(keystone_admin)]$ sw-manager sw-deploy-strategy apply
Monitor the strategy until it completes.
~(keystone_admin)]$ sw-manager sw-deploy-strategy show
Wait until
stateshowsappliedandapply-resultshowssuccess.Delete the strategy.
~(keystone_admin)]$ sw-manager sw-deploy-strategy delete
Results
The pre-upgrade-deploy metapackages have been removed from all hosts. If
the --delete option was used, the metapackages are in the
available state and can be redeployed if needed. If --delete was
not used, the metapackages are in the removing state. To finish deployment,
run the following command.
~(keystone_admin)]$ software deploy delete
Verify the metapackage states:
~(keystone_admin)]$ software metapackage list --all