Remove Reboot-Required Software Updates¶
Updates in the Applied or Partial-Apply states can be removed if necessary, for example, when they trigger undesired or unplanned effects on the cluster.
About this task
Rolling back updates is conceptually identical to installing updates. A roll-back operation can be commanded for an update in either the Applied or the Partial-Apply states. As the update is removed, it goes through the following state transitions:
- Applied or Partial-Apply to Partial-Remove
An update in the Partial-Remove state indicates that it has been removed from zero or more, but not from all, the applicable hosts.
Use the command sw-patch remove to trigger this transition.
- Partial-Remove to Available
Use the command sudo sw-patch host-install-async <hostname> repeatedly targeting each one of the applicable hosts in the cluster. The transition to the Available state is complete when the update is removed from all target hosts. The update remains in the update storage area as if it had just been uploaded.
The command sudo sw-patch host-install-async <hostname> both installs and removes updates as necessary.
The following example describes removing an update that applies only to the controllers. Removing updates can be done using the Horizon Web interface, also, as discussed in Install Reboot-Required Software Updates Using Horizon.
Log in as Keystone user admin to the active controller.
Verify the state of the update.
~(keystone_admin)]$ sudo sw-patch query Patch ID Patch State ========================= =========== STLX-00004-PATCH_0001 Applied
In this example the update is listed in the Applied state, but it could be in the Partial-Apply state as well.
Remove the update.
~(keystone_admin)]$ sudo sw-patch remove STLX-00004-PATCH_0001 STLX-00004-PATCH_0001 has been removed from the repo
The update is now in the Partial-Remove state, ready to be removed from the impacted hosts where it was already installed.
Query the updating status of all hosts in the cluster.
~(keystone_admin)]$ sudo sw-patch query-hosts Hostname IP Address Patch Current Reboot Required Release State ============ =============== ============= =============== ======= ===== worker-0 192.168.204.179 Yes No nn.nn idle worker-1 192.168.204.173 Yes No nn.nn idle controller-0 192.168.204.3 No No nn.nn idle controller-1 192.168.204.4 No No nn.nn idle storage-0 192.168.204.213 Yes No nn.nn idle storage-1 192.168.204.181 Yes No nn.nn idle
In this example, the controllers have updates ready to be removed, and therefore must be rebooted.
Remove all pending-for-removal updates from controller-0.
Swact controller services away from controller-0.
Run the updating (patching) sequence.
~(keystone_admin)]$ sudo sw-patch host-install-async <controller-0>
Remove all pending-for-removal updates from controller-1.
Swact controller services away from controller-1.
Run the updating sequence.
~(keystone_admin)]$ sudo sw-patch host-install-async <controller-1>
The cluster is up to date now. All updates have been removed, and the update STLX-00004-PATCH_0001 can be deleted from the storage area if necessary.