Postupgrade task
After a successful upgrade of your full cloud or hybrid deployment, if you don't want to roll back to a previous version, remove remnants of the Elasticsearch solution.
Removing Elasticsearch
CAUTION:
If you remove remnants of the Elasticsearch solution, you cannot roll back
to a previous version.
Complete the following steps to remove the
nasm-elasticsearch and common-datarouting pods from your full
cloud or hybrid 1.6.13 deployment.- Wait until the
noiornoihybridcustom resource (CR) for your upgrade moves to the reconciled phase. To ensure that version 1.6.13 is displayed for bothversionandreconciledVersion, run the oc get csv command. - To ensure that all jobs during the upgrade are completed, run the oc get jobs command.
- Locate the StatefulSet (STS) for all instances of
Elasticsearch.
oc get sts -l app.kubernetes.io\/name=elasticsearch NAME READY AGE ocm480-elasticsearch 1/1 82m - Delete the STS for all instances of
Elasticsearch.
oc delete sts -l app.kubernetes.io\/name=elasticsearch statefulset.apps "ocm480-elasticsearch" deleted - Wait for all replicas of Elasticsearch STS to terminate. The following command watches for
status transitions of the pods. After all pods transition, you can terminate the
command.
oc get po -w -l app.kubernetes.io\/name=elasticsearch - Delete the Elasticsearch curator
cronjob.
oc delete cronjob -l app.kubernetes.io\/name=ibm-common-elastic-curator cronjob.batch "ocm480-curator-pattern-metrics" deleted - Delete the common-datarouting deployment for all instances of
common-datarouting.
oc delete deploy -l app.kubernetes.io\/name=common-datarouting deployment.apps "ocm480-common-datarouting" deleted - Depending on the persistent volume claim (PVC) policy, the Elasticsearch PVC might need to be
manually removed. However, the Elasticsearch PVC is the final remnants of all data in Elasticsearch.
After you delete the PVC, you cannot roll back to previous
versions.
oc get pvc -l app.kubernetes.io\/name=elasticsearch NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE data-ocm480-elasticsearch-0 Bound pvc-4b08bbe4-6a9e-4016-b279-dfa395f98760 75Gi RWO rook-ceph-block 89m oc delete pvc -l app.kubernetes.io\/name=elasticsearch persistentvolumeclaim "data-ocm480-elasticsearch-0" deleted
Post-rolling back
If you upgraded to version 1.6.13 and did not remove remnants of the Elasticsearch solution, you
can roll back to the previous version. After you roll back to the previous version, decommission the
workloads that were deployed with version 1.6.13. If the workloads are decommissioned, when you
upgrade to version 1.6.13 after a roll back, the Elasticsearch data is migrated again. Before you
attempt another upgrade post-rolling back, complete the following steps.
- Delete any AIDL (ea-datalayer)
deployments.
oc delete deploy -l app.kubernetes.io/\component=aidl - Delete the AIDL curator
cronjob.
oc delete cronjob -l app.kubernetes.io/\component=aidl-curator - Delete the Elasticsearch migration job so that it can be reattempted when you next
upgrade.
oc delete job -l app.kubernetes.io/\component=elasticmigration