In some cases you might want to enable the hostIPC option for the OpenShift® cluster where you installed Db2® so that you can tune kernel parameters for worker
nodes on the cluster.
About this task
The hostIPC option might be suitable for your environment when:
- You want to use a restricted SCC.
- You do not want to enable unsafe sysctls on the cluster.
- You want to use the OpenShift Machine
Config Operator or NodeTuning
Operator to tune the worker IPC kernel parameters.
Perform this procedure after you install the Db2 service but before you deploy a Db2 database.
Procedure
-
Set the Db2 operator replica to 0 by
running the following command:
oc patch deployment ibm-db2oltp-cp4d-operator-controller-manager --patch '{"spec": {"replicas": 0}}' -n operator_namespace
Where operator_namespace is the OpenShift project (namespace) that contains the
Db2 operator.
- Open the db2u-json-cm
ConfigMap object in edit mode:
oc edit cm db2u-json-cm -n=namespace
- Type
/host-ipc to locate the host-ipc section of the
ConfigMap.
- Under the
ibm-db2oltp.json data option change host-ipc
to true:
- Save the change and exit the
ConfigMap.
- Delete the zen-database-core pod in order for the
ConfigMap changes to
be re-mounted to the volume.
oc delete po $(oc get po -n=namespace | grep zen-database-core | awk {'print $1'}) -n=namespace
Note: If you reinstall or upgrade the Db2
service, you must perform these steps again.
- Deploy the Db2 database
instance.
- Set the Db2 operator replica to 1
by running the following command:
oc patch deployment ibm-db2oltp-cp4d-operator-controller-manager --patch '{"spec": {"replicas": 1}}' -n cpd_operator_namespace
Where cpd_operator_namespace is the OpenShift project (namespace) that contains the
Cloud Pak for Data operator.