Upgrading Informix to a newer refresh on Version 4.0
To obtain fixes, security updates, and new functionality, you must upgrade to the latest refresh of Informix. If Informix is already installed on top of Cloud Pak for Data Version 4.0, a project administrator can upgrade Informix to the latest refresh.
For a complete list of Informix refreshes available on Cloud Pak for Data Version 4.0, see Operator and operand versions.
- Permissions you need for this task
- You must be an administrator of the OpenShift® project (Kubernetes namespace) where Informix is installed.
- Information you need to confirm before you start this task
- Before you upgrade Informix, confirm the name of the project where Informix is installed.Informix might be installed in either:
- The project where Cloud Pak for Data is installed
- A project that is tethered to the project where Cloud Pak for Data is installed
- Information you need to complete this task
-
- You cannot change the storage that is associated with this installation. If you try to change the storage, the upgrade will fail.
Before you begin
Ensure that the cluster meets the minimum requirements for Informix. For details, see System requirements.
Additionally, ensure that a cluster administrator completed the required Upgrade preparation tasks for your environment. Specifically, verify that a cluster administrator completed the following tasks:
- The latest Cloud Pak for Data refresh is installed. For details, see Upgrading Cloud Pak for Data.
- For environments that use a private container registry, such as air-gapped environments, the Informix software images are mirrored to the private container registry. For details, see Mirroring images to your container registry.
- The catalog source for Informix is updated. For details, see Updating catalog source.
- The operator for Informix is upgraded. For details, see Upgrading operator subscriptions.
If these tasks are not complete, the Informix upgrade will fail.
Procedure
Complete the following tasks to upgrade Informix:
Upgrading the Informix service
The InformixService custom resource includes a version entry, so the Informix service can be upgraded after you install a newer version of the Informix Cloud Pak for Data operator on the cluster.
Ensure that both the Informix operators are updated by following these steps:
- For each command, ensure that you specify the appropriate Red Hat® OpenShift project (either ibm-common-services or
cpd-operators) for the --namespace (-n) argument.
- Run the following command to confirm that the Informix operator subscription was
triggered:
oc get sub -n operator-project ibm-informix-operator -o jsonpath='{.status.installedCSV} {"\n"}
Verify that the command returns ibm-informix-operator.v4.1.0 .
- Run the following command to confirm that the cluster service version (CSV) is
ready:
oc get csv -n operator-project ibm-informix-operator.v4.1.0 -o jsonpath='{.status.phase} : {.status.message} {"\n"}'
Verify that the command returns Succeeded : install strategy completed with no errors.
- Run the following command to confirm that the operator is
ready:
oc get deployments -n operator-project -l olm.owner="ibm-informix-operator.v4.1.0" -o jsonpath="{.items[0].status.availableReplicas} {'\n'}"
Verify that the command returns an integer greater than or equal to 1. If the command returns 0, wait for the deployment to become available.
- Run the following command to confirm that the Informix Cloud Pak for Data operator subscription was
triggered:
oc get sub -n operator-project ibm-informix-cp4d-operator -o jsonpath='{.status.installedCSV} {"\n"}'
Verify that the command returns ibm-informix-cp4d-operator.v4.1.0 .
- Run the following command to confirm that the cluster service version (CSV) is
ready:
oc get csv -n operator-project ibm-informix-cp4d-operator.v4.1.0 -o jsonpath='{ .status.phase } : {.status.message } {"\n"}'
Verify that the command returns Succeeded : install strategy completed with no errors.
- Run the following command to confirm that the operator is
ready:
oc get deployments -n operator-project -l olm.owner="ibm-informix-cp4d-operator.v4.1.0" -o jsonpath="{.items[0].status.availableReplicas} {'\n'}"
Verify that the command returns an integer greater than or equal to 1. If the command returns 0, wait for the deployment to become available.
- Run the following command to update the InformixService custom resource
object:
oc get deployments -n operator-project -l olm.owner="ibm-informix-cp4d-operator.v4.1.0" -o jsonpath="{.items[0].status.availableReplicas} {'\n'}"
Verify that the command returns an integer greater than or equal to 1. If the command returns 0, wait for the deployment to become available.
- Run the following command to confirm that the Informix operator subscription was
triggered:
- Upgrade the Informix service.
- Change to the project where you installed
Informix:
oc project project-name
- Run the oc patch command to upgrade the InformixService custom resource
version
attribute:
oc patch informixservice informixservice-cr --type=merge -p '{"spec":{"version":"4.1.0"}}'
- Change to the project where you installed
Informix:
Verifying the upgrade
The Informix operator continually
monitors the contents of the custom resource and updates the microservices that comprise Informix as needed. The InformixService microservice is defined by the informixservice-cr custom resource. Informix is upgraded when the InformixService status is Completed
.
To check the status of the upgrade:
- Change to the project where Informix is
installed:
oc project project-name
- Get the status of Informix (informixservice-cr):
oc get InformixService informixservice-cr -o jsonpath='{.status.informixStatus} {"\n"}'
Informix is ready when the command returns
Completed
.
Upgrading each Informix database deployment
- Preparations before upgrading to version 4.1.x
-
When you want to upgrade an Informix database deployment to a version 4.1.x from a version 4.0.y, you need to change ownership and permissions of some files and directories. This is needed because starting with version 4.1.0, Informix is installed in private-server mode.
In the steps given below, we will refer to the CR Name of Informix with informix-<crid> where <crid> is the numerical part of your CR informix-124…
The steps you need to perform are:- Note the number of active
replicas:
oc describe informix informix-<crid> | grep Replicas
- Scale down the informix
cluster:
oc patch informix informix-<crid> --type=merge -p '{"spec":{"replicas":1}}'
- Disable the liveness probe of the remaining server
pod:
oc annotate pod informix-<crid>-server-0 livenessprobe="disabled"
- Exec into the server
pod:
oc exec -it informix-<crid>-server-0 -- bash
- Shutdown the Informix instance:
onmode -yuk
- Change permissions of Informix
chunks:
cd /opt/informix/data/dbspaces chmod 600 *
- Change ownership and permissions of files in the
PVC(s):
cd /pvc chown -R informix:informix backup data shared chmod -R g-w backup data shared
- After the successful upgrade you will need to perform some more steps. For more information, refer After the upgrade from a version 4.0.x.
- Note the number of active
replicas:
- Upgrading the Informix database deployment
-
To upgrade each Informix database deployment:
- Change to the project where Informix is
installed:
oc project project-name
- Run the following command to get the list of all the Informix
deployments:
oc get informixes
The following table shows Informix database versions for different Informix Cloud Pak for Data versions:Informix Operand Version Informix Database Version Informix Cp4d Operator Case Version Informix Case Version 4.0.0 14.10.6 4.0.2 4.0.2 4.0.1 14.10.7 4.0.3 4.0.3 4.0.2 14.10.7W1 4.0.4 4.0.4 4.1.0 14.10.7W1 4.0.5 4.0.5 - Run the oc patch command to update the version
attribute, specifying the operand version number that you want to upgrade
to:
oc patch informix instance_id --type merge -p '{"spec":{"version":"4.1.0"}}'
Replace instance_id with the name of the Informix database deployment listed in step 2.
- Run the oc patch command to delete the image
attribute:
oc patch informix instance_id --type=json -p="[{'op': 'remove', 'path': /spec/image'}]"
Replace instance_id with the name of the Informix database deployment listed in step 2.
- Run the following commands to delete the satefulset created to run
the Informix server and Informix Connection
Manager:
oc delete statefulset instance_id-server
oc delete statefulset instance_id-cm
Replace instance_id with the name of the Informix database deployment listed in step 2.
- Change to the project where Informix is
installed:
- After the upgrade from a version 4.0.x
-
When you upgrade from a version 4.0.x, you will need to undo some preparation steps. You will also have to add a manual step because of a change in the user management.
-
The new user management stores the password in a secret named informix-<crid>-<username>-cpdauth.
If you happen to use a user admin to access your Informix database, you will need to copy its password to the Informix authentication secret with the following steps.
The content of the password key for the user admin needs to be copied into the key appassword of the informix-<crid>-auth secret. The easiest way of doing it is via the OpenShift web GUI:- Open the project in which you installed your Informix service: Home → Projects → Name of your project
- Open the Secrets in the Inventory pane of the project page.
- Open the informix-<crid>-admin-cpdauth secret.
- Copy the password by clicking on the Copy to clipboard icon.
- Go back to the Secrets page.
- Open the informix-<crid>-auth secret.
- Select Edit Secret action from the Action drop-down.
- Enter the copied password into the apppassword key.
- Save the change.
- Activate the liveness
probe:
oc annotate pod informix-<crid>-server-0 livenessprobe="enabled"
- Scale up to the saved <number> of
replicas:
oc patch informix informix-<crid> --type=merge -p '{"spec":{"replicas":<number>}}'
-
Recreate all services, stateful sets and deployments
- In the OpenShift web GUI open the Informix project: Home → Projects → Name of your project
- Click on Services in the Inventory pane. Delete all informix-<crid>-<servicename> services by clicking on the three dots icon to the right and select Delete Service.
- Return to the Projects page.
- Click on StatefulSets in the Inventory pane.
- Delete all informix-<crid>-<setname> stateful sets by clicking on the three dots icon to the right and select Delete StatefulSet.
- Return to the Projects page.
- Click on Deployments in the Inventory pane.
- Delete all informix-<crid>-<deploymentname>deployments by clicking on the three dots icon to the right and select Delete Deployment.
The deleted objects will be automatically recreated by the operator. This will bring them to the current version.
-
- Verifying the deployment upgrade
-
You can use a command or the web console to verify that the deployment was upgraded and is ready to use.
- CommandRun the following command and wait for the status to change to Completed:
oc get informix instance_id -o jsonpath='{.status.informixStatus} {"\n"}'
- Web console
From the database details page, wait for the database version to change.
- Command
Rolling back a deployment upgrade
It is not recommended to roll back to a version 4.0.y . Preferably, you use a backup taken before the upgrade and use it after having downgraded the Informix CP4D and Informix operators.
For a rollback within the version line 4.0.y or 4.1.x, you can use the following instructions:
You can rollback a deployment upgrade by restoring the Informix operand version in the Informix custom resource.
- Change to the project where Informix is
installed:
oc project project-name
- Run the following command to get the list of all the Informix
deployments:
oc get informixes
- Run the oc patch command to restore the version attribute,
specifying the operand version number that you want to rollback
to:
oc patch informix instance_id --type merge -p '{"spec":{"version":"4.0.0"}}'
Replace instance_id with the name of the Informix database deployment listed in step 2.
- Verify the version and status of the Informix service
(informixservice-cr):
oc get informix instance_id -o jsonpath='{.status.version}{"\n"}{.status.informixStatus}{"\n"}'
What to do next
Use your upgraded Informix deployments, or create new deployments.