5 Rolling Back OCCM
Note:
It is advisable to back up the OCCM configmap before performing an upgrade or rollback. However, in the event of a rollback, any configurations or certificates created during the upgrade will be lost. Therefore, having a backup allows you to reapply these configurations or certificates in future upgrades. During an upgrade, the existing configurations or certificates are preserved.To back up the OCCM configuration, see OCCM Configuration Backup. For restoring the configuration from a backup, see OCCM Configuration Restore.
This chapter provides information about rolling back the OCCM deployment to the previous release.
You can rollback OCCM from a source release to a target release using CLI procedures as outlined in the following table:
Upgrade /Rollback Task | References | Supported for CLI |
---|---|---|
OCCM Rollback | Yes |
Perform the following steps to rollback OCCM:
- Perform OCCM Configuration Restore.
To restore the OCCM configuration, log in to to the deployment cluster and run the following command to restore the configmap:
kubectl apply -f occm-config-map_24.2.0_backup.json
- OCCM Rollback
5.1 Supported Rollback Paths
This section describes the supported rollback paths for OCCM:
Table 5-1 OCCM Rollback Sequence
Source Version | Target Version | Rollback Sequence | Comments |
---|---|---|---|
24.3.x | 24.2.x or 24.1.x |
|
|
5.2 Prerollback Tasks
Note:
- No configuration should be performed during rollback.
- Do not exit from helm rollback command manually. After running the Helm rollback command, it takes some time (depending upon number of PODs to rollback) to roll back all of the services. In the meantime, you must not press "ctrl+c" to come out from helm rollback command. It may lead to anomalous behavior.
OCCM Configuration Restore
To restore the OCCM configuration:
- Run the following command to get the
configmap:
$ kubectl get cm -n <namespace>
Example:$ kubectl get cm occm-occm -n occm
- Run the following command to delete the
configmap:
kubectl delete cm <configmap name> -n <namespace>
Example:$ kubectl delete cm occm-occm -n occm
- Run the following command to apply the backup
configmap:
kubectl apply -f occm-config-map_24.2.0_backup.json -n occm
5.3 Rollback Tasks
This section describes the procedure to roll back OCCM:
Note:
You must use the existing release name for rollback.- Run the following command to check which revision you need to roll
back:
$ helm history <release_name> --namespace <release_namespace>
For example:$ helm history occm --namespace namspace1
- Run the following command to roll back to the required
revision:
For example:$ helm rollback <release_name> <revision_number> --namespace <release_namespace>
$ helm rollback occm 1 --namespace namespace1