Upgrading the external etcd store created with the Db2 or Db2 Warehouse etcd image
You can upgrade the external etcd store to use the latest etcd image packaged with Db2.
Before you begin
About this task
The following steps in this procedure use a Db2uCluster resource as an example in the commands and code samples. However, you can perform this procedure on a Db2uInstance as well. Db2uInstance commands are provided where necessary in the steps.
Before you start the upgrade procedure, perform the rolling upgrade for your Db2uCluster or Db2uInstance resources in your HADR topology first. Ensure that Governor has been stopped on both the primary and standby deployments.
Note: If your deployment uses the restricted-v2 SCC, commands that require switching users or
elevated privileges are not supported. Perform all steps as the Db2 instance user within the
container. For more information, see Deploying Db2 or Db2
Warehouse with non-root deployment.
- Set environment variables for your deployments:
Db2uCluster names can be obtained with theDB2UCLUSTER_PRIMARY="db2-hadr-primary" DB2UCLUSTER_STANDBY="db2-hadr-standby" PROJECT_PRIMARY="zen" PROJECT_STANDBY="zen"oc get db2uclustercommand in the namespace where the deployments are located. For a Db2uInstance, you can obtain names withoc get db2uinstance. Primary and Standby are the current HADR primary and principal standby deployments respectively. - Run the stop governor command on your deployments.Note: Governor does not run on auxiliary standbys. This step isn't necessary on auxiliary deployments.
First, run the command on your principal standby deployment:
Then, run the command on your primary deployment:oc exec -it c-${DB2UCLUSTER_STANDBY}-db2u-0 -n ${PROJECT_STANDBY} -- sv stop governoroc exec -it c-${DB2UCLUSTER_PRIMARY}-db2u-0 -n ${PROJECT_PRIMARY} -- sv stop governor
Note: The script uses the version of the provided Db2uCluster or Db2uInstance CR to determine the
proper etcd image to use. If your Db2 or Db2 Warehouse custom resource has not been upgraded yet, upgrade first and then come back to
generate the latest specification.