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 relaxed to proceed with non-management-affecting alarms).

Procedure

  1. Create the software deployment orchestration strategy with the --pre-upgrade-deploy and --remove options.

    To remove the pre-upgrade-deploy metapackages and leave them in the removing state:

    ~(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 available state, add the --delete option:

    ~(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 --remove option requires --pre-upgrade-deploy. Using --remove without --pre-upgrade-deploy results in a validation error.

  2. Wait for the build phase to complete.

    ~(keystone_admin)]$ sw-manager sw-deploy-strategy show
    

    Verify that current-phase-completion is 100% and state is ready-to-apply.

  3. Apply the strategy.

    ~(keystone_admin)]$ sw-manager sw-deploy-strategy apply
    
  4. Monitor the strategy until it completes.

    ~(keystone_admin)]$ sw-manager sw-deploy-strategy show
    

    Wait until state shows applied and apply-result shows success.

  5. 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