Rollback from 2.0.1.2 version to previous 2.0.x.x version

About this task

To roll back from OneDB version 2.0.1.2 (helm chart version 0.4.27) to previous 2.0.x.x version, helm rollback command is not supported . Follow these steps to rollback to previous release:

Procedure

  1. Identify current primary server pod name. For this, login to both onedb-server-0 and onedb-server-1 pods to check on current primary server pod name:
    Example:
    $ kubectl exec -it onedb-server-0  bash
    [informix@onedb-server-0 ~]$ onstat -
    
    HCL OneDB Server Version 2.0.1.2 -- On-Line (Prim) -- Up 1 days 14:09:24 -- 793248 Kbytes
    2022-03-25 19:37:34
    

    If onstat banner show that it’s a primary server(Prim), then note down the pod name.

    Alternate method to get primary server pod name:

    $ kubectl describe configmap <helm release name>-onedb-clusterinfo |grep holderIdentity
                    {"holderIdentity":"onedb-server-0","leaseDurationSeconds":360000,"acquireTime":"2022-03-25T19:21:10Z","renewTime":"2022-03-25T19:21:10Z","...
    
  2. Create /opt/hcl/backup/${ONEDB_BACKUPTAG}/primaryhost file and add pod name to the primaryhost file:
    Example: 
    $ kubectl exec -it onedb-server-0  bash
    $ echo "onedb-server-0" > /opt/hcl/backup/${ONEDB_BACKUPTAG}/primaryhost
    
  3. Uninstall 0.4.27 helm chart and wait for all pods to be terminated:
    Example: 
    $ helm uninstall <helm release name>
    
  4. Install previous release chart using command ‘helm install <helm release name> …’ and wait for the OneDB pods to be in “Running” state and verify OneDB server and replication state using onstat -g dri command.