Postgres cluster custom resource is not created during upgrade

When you upgrade to IBM Cloud Pak foundational services version 4.6 or later while using Postgres cluster as a database, the common-service-db Postgres cluster custom resource (CR) might not be successfully created. This issue might occur if you apply a patch for the license key of the embedded EDB PostgreSQL database on an old version of IBM Cloud Pak foundational services.

Important: This issue can occur when you upgrade to one of the following versions of IBM Cloud Pak foundational services: 4.6.2 to 4.6.7, 4.7.x, 4.8.x and 4.9.x. This issue is fixed in IBM Cloud Pak foundational services version 4.6.8, 4.10.0 and later. For more information, see Embedded EDB PostgreSQL database license key expires on October 1st, 2024 used for IBM Cloud Pak operators.

Symptom

Cause

When you apply a patch for the license key of the embedded EDB PostgreSQL database on an old IBM Cloud Pak foundational services version, the label operator.ibm.com/opreq-control: 'false' is added to the create-postgres-license-config job. This label is preventing Operand Deployment Lifecycle Manager (ODLM) from running the job with the latest image to add an annotation on postgresql-operator-controller-manager-config secret. This annotation is required to successfully create the common-service-db Postgres cluster CR.

Resolving the problem

To resolve the issue, delete the existing create-postgres-license-config job and re-create it. Complete the following steps:

  1. Delete the create-postgres-license-config job.

     oc delete job create-postgres-license-config -n <namespace-where-foundational services-operator-are-installed>
    
  2. Delete the ODLM pod to re-create the create-postgres-license-config job.

     oc delete pod -n <namespace-where-foundational services-operator-are-installed> -l name=operand-deployment-lifecycle-manager
    
  3. Make sure that the create-postgres-license-config job is created and that the job successfully completes.

     oc get job create-postgres-license-config -n <namespace-where-foundational services-operator-are-installed>
    

    You might see the following output:

     NAME                         COMPLETIONS   DURATION   AGE
     create-postgres-license-config   1/1           1s         1m
    
  4. Wait for the common-service-db Postgres cluster CR to be successfully created.

     oc get cluster.postgresql.k8s -n <namespace-where-foundational services-are-installed> | grep common-service-db
    

    You might see the following output:

     common-service-db      161d   2           2       Cluster in healthy state                     common-service-db-2
    

    {: pre}