.. WARNING: Add no lines of text between the label immediately following .. and the title. .. _manual-rollback-host-software-deployment-9295ce1e6e29: ======================================== Manual Rollback Host Software Deployment ======================================== For a major release software deployment, you can abort and rollback the :ref:`manual-host-software-deployment-ee17ec6f71a4` procedure at any time between :command:`software deploy start` and :command:`software deploy delete`. .. note:: After the software deploy deletion step, aborting and rolling back of the major release deployment is not possible. .. note:: This section also covers the abort and rollback of a new patched major release deployment. This section describes different rollback procedures based on where you currently are in the software deployment procedure. .. contents:: |minitoc| :local: :depth: 1 Rollback After Successful Software Deploy Activate -------------------------------------------------- You can roll back the manual host software deployment after a successful :command:`software deploy activate` in the following scenarios: - A Patch Release deployment Immediately after the successful :command:`software deploy activate` - A major release deployment - Immediately after the successful :command:`software deploy activate`, before attempting the Kubernetes upgrade. - After attempting a Kubernetes upgrade which failed and was rolled back. .. note:: A rollback of a host major release software deployment can only be done if Kubernetes has been successfully rolled back to its original version. .. _rollbackafterdeployactive: .. rubric:: |proc| #. Verify the current deploy state and Kubernetes current version. .. code-block:: [sysadmin@controller-0 ~(keystone_admin)]$ software deploy show +--------------+------------+------+------------------+ | From Release | To Release | RR | State | +--------------+------------+------+------------------+ | 24.09.400 | 25.09.0 | True | deploy-completed | +--------------+------------+------+------------------+ [sysadmin@controller-0 ~(keystone_admin)]$ system kube-version-list +---------+--------+-----------+ | version | target | state | +---------+--------+-----------+ | v1.29.2 | True | active | | v1.30.6 | False | available | | v1.31.5 | False | available | | v1.32.2 | False | available | | v1.33.0 | False | available | +---------+--------+-----------+ .. _aborthostsoftwaredeploy: #. Abort the current host software deployment. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy abort Deployment has been aborted #. Verify the deploy state. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy show +--------------+------------+------+----------------------------------+ | From Release | To Release | RR | State | +--------------+------------+------+----------------------------------+ | 25.09.0 | 24.09.400 | True | deploy-activate-rollback-pending | +--------------+------------+------+----------------------------------+ #. Perform :command:`deploy activate-rollback` and check the deploy and host deploy states. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy activate-rollback Deploy activate-rollback has started [sysadmin@controller-0 ~(keystone_admin)]$ software deploy show +--------------+------------+------+-------------------------------+ | From Release | To Release | RR | State | +--------------+------------+------+-------------------------------+ | 25.09.0 | 24.09.400 | True | deploy-activate-rollback-done | +--------------+------------+------+-------------------------------+ [sysadmin@controller-0 ~(keystone_admin)]$ software deploy host-list +--------------+--------------+------------+------+------------------------------+ | Host | From Release | To Release | RR | State | +--------------+--------------+------------+------+------------------------------+ | controller-0 | 25.09.0 | 24.09.400 | True | deploy-host-rollback-pending | | controller-1 | 25.09.0 | 24.09.400 | True | deploy-host-rollback-pending | +--------------+--------------+------------+------+------------------------------+ .. _rollbackhost: #. Roll back host. Perform the following commands in the order: all worker nodes, all storage nodes, controller-1, and controller-0: .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ system host-lock [sysadmin@controller-0 ~(keystone_admin)]$ software deploy host-rollback [sysadmin@controller-0 ~(keystone_admin)]$ system host-unlock .. note:: For controllers, a :command:`system host-swact controller-#` will be required to lock and roll back the active controller. .. _verifydeploystate: #. Verify the deploy state and host deploy state. All the hosts must be in the ``deploy-host-rollback-deployed`` state and the deploy state should be ``deploy-host-rollback-done``. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy host-list +--------------+--------------+------------+------+-------------------------------+ | Host | From Release | To Release | RR | State | +--------------+--------------+------------+------+-------------------------------+ | controller-0 | 25.09.0 | 24.09.400 | True | deploy-host-rollback-deployed | | controller-1 | 25.09.0 | 24.09.400 | True | deploy-host-rollback-deployed | +--------------+--------------+------------+------+-------------------------------+ [sysadmin@controller-0 ~(keystone_admin)]$ software deploy show +--------------+------------+------+---------------------------+ | From Release | To Release | RR | State | +--------------+------------+------+---------------------------+ | 25.09.0 | 24.09.400 | True | deploy-host-rollback-done | +--------------+------------+------+---------------------------+ .. _deletecurrentdeploy: #. Delete the current deployment. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy delete Deploy deleted with success [sysadmin@controller-0 ~(keystone_admin)]$ software deploy show No deploy in progress Now, the system is ready for the next host software deployment. Rollback After Software Deploy Activate Fails --------------------------------------------- When :command:`software deploy activate` fails, follow the steps below to abort and roll back the manual host software deployment. .. rubric:: |proc| #. Verify current deploy state. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy show +--------------+------------+------+------------------------+ | From Release | To Release | RR | State | +--------------+------------+------+------------------------+ | 24.09.400 | 25.09.0 | True | deploy-activate-failed | +--------------+------------+------+------------------------+ #. Follow the steps from :ref:`step 2 ` to :ref:`step 7 ` in :ref:`Rollback After Successful Software Deploy Activate `. Rollback After Software Deploy Host Fails ---------------------------------------------------- When deploying software to a host (:command:`software deploy host `) fails, follow the steps below to abort and roll back the manual host software deployment. .. rubric:: |proc| #. Verify the current deploy state. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy show +--------------+------------+------+--------------------+ | From Release | To Release | RR | State | +--------------+------------+------+--------------------+ | 24.09.400 | 25.09.0 | True | deploy-host-failed | +--------------+------------+------+--------------------+ [sysadmin@controller-0 ~(keystone_admin)]$ software deploy host-list +--------------+--------------+------------+------+---------------------+ | Host | From Release | To Release | RR | State | +--------------+--------------+------------+------+---------------------+ | controller-0 | 25.09.0 | 24.09.400 | True | deploy-host-failed | | controller-1 | 25.09.0 | 24.09.400 | True | deploy-host-done | | compute-0 | 25.09.0 | 24.09.400 | True | deploy-host-pending | +--------------+--------------+------------+------+---------------------+ #. Abort the deploy. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy abort Deployment has been aborted #. Verify the deploy state. .. code-block:: none [sysadmin@controller-0 ~(keystone_admin)]$ software deploy host-list +--------------+--------------+------------+------+------------------------------+ | Host | From Release | To Release | RR | State | +--------------+--------------+------------+------+------------------------------+ | controller-0 | 25.09.0 | 24.09.400 | True | deploy-host-rollback-pending | +--------------+--------------+------------+------+------------------------------+ [sysadmin@controller-0 ~(keystone_admin)]$ software deploy host-list +--------------+--------------+------------+------+-------------------------------+ | Host | From Release | To Release | RR | State | +--------------+--------------+------------+------+-------------------------------+ | controller-0 | 25.09.0 | 24.09.400 | True | deploy-host-rollback-pending | | controller-1 | 25.09.0 | 24.09.400 | True | deploy-host-rollback-pending | | compute-0 | 25.09.0 | 24.09.400 | True | deploy-host-rollback-deployed | +--------------+--------------+------------+------+-------------------------------+ Follow :ref:`step 5 ` in :ref:`Rollback After Successful Software Deploy Activate `. Roll back all the hosts that are in ``deploy-host-rollback-pending`` until all the hosts are in ``deploy-host-rollback-deployed``. Then, follow :ref:`step 6 ` and :ref:`step 7 ` to complete the rollback. Rollback Before Software Deploy Host to Any Host ----------------------------------------------------------- If a host software deployment needs to be cancelled before the software is deployed to any host, that is, if the deploy state is either ``deploy-start-done`` or ``deploy-start-failed``, you can delete the pending deployment directly using :command:`software deploy delete`.