7 Rolling Back the Upgrade

If the upgrade fails, you can rollback the failed upgrade, fix the issue, and then retry the upgrade. You can also rollback if the upgrade was successful but you subsequently have functional issues.

To rollback the OAA installation perform the following steps:

  1. Check the history of the OAA management container chart using the following command:
     helm history oaamgmt -n <namespace>
    For example:
     helm history oaamgmt -n oaans
    The output will look similar to the following:
    
    REVISION        UPDATED      STATUS          CHART                                      APP VERSION     DESCRIPTION
    1               <date>       superseded      oaa-mgmt-1.0.0-12.2.1.4.1-<release-date>   0.1.0           Install complete 
    2               <date>       superseded      oaa-mgmt-1.0.0-12.2.1.4.1-<relase-date+1>  0.1.0           Upgrade complete    
    
  2. Rollback the management container using the following command:

    Note:

    This command must be run outside the management container.
    helm rollback oaamgmt -n <namespace>
    For example:
    helm rollback oaamgmt -n oaans
  3. Check the history of the OAA management charts to show the rollback has occurred:
    helm history oaamgmt -n <namespace>
    For example:
    helm history oaamgmt -n oaans
    The output will look similar to the following:
    
    REVISION        UPDATED      STATUS          CHART                                      APP VERSION     DESCRIPTION
    1               <date>       superseded      oaa-mgmt-1.0.0-12.2.1.4.1-<release-date>   0.1.0           Install complete 
    2               <date>       superseded      oaa-mgmt-1.0.0-12.2.1.4.1-<release-date+1> 0.1.0           Upgrade complete
    3               <date>       deployed        oaa-mgmt1.0.0-12.2.1.4.1-<release-date>    0.1.0           Rollback to 1
    
  4. Revert the installOAA.properties file to the version used before the upgrade took place:
    cd <NFS_CONFIG_PATH>
    cp installOAA.properties installOAA.properties.<release-date+1>
    cp installOAA.properties.<release-date> installOAA.properties
  5. Connect to the OAA management pod, for example:
    kubectl exec -n oaans -ti oaamgmt-oaa-mgmt-6f4c9cd56f-std6l -- /bin/bash
    This will take you into a bash shell inside the OAA management pod:
    [oracle@oaamgmt-oaa-mgmt-6f4c9cd56f-std6l /]$
  6. Edit the /u01/oracle/logs/status.info file and update any properties that will affect the downgrade. For example, if the vault needs to be updated or recreated, set VAULTINSTALL=false. The properties you need to update will depend on what changes were made during that upgrade. If you are unsure contact Oracle Support for advice.
  7. Run the following command inside the management container to update the OAA install:
    [oracle@oaamgmt-oaa-mgmt-6f4c9cd56f-std6l /]$ cd ~
    [oracle@oaamgmt-oaa-mgmt-6f4c9cd56f-std6l ~]$ ./OAA.sh -f installOAA.properties
  8. Run the following command to confirm the installation was successfully downgraded:
     helm history <deployment-name> -n <namespace>
    Where <deployment-name> is the value of the common.deployment.name in your installOAA.properties. For example:
    helm history oaainstall -n oaans
    The output will look similar to the following:
    
    REVISION  UPDATED STATUS     CHART                                  APP VERSION DESCRIPTION    
    2         <date>  superseded oaa-1.0.0-12.2.1.4.1-<release-date>    0.1.0       Upgrade complete 
    3         <date>  superseded oaa-1.0.0-12.2.1.4.1-<release-date+1>  0.1.0       Upgrade complete   
    4         <date>  deployed   oaa-1.0.0-12.2.1.4.1-<release-date>    0.1.0       Upgrade complete
  9. Run the following command to check the pods are now using the previous image:
    kubectl get deploy -o wide -n <namespace> |awk '{print $7}'
    For example:
    kubectl get deploy -o wide -n oaans |awk '{print $7}'
    The output will look similar to the following:
    IMAGES
          container-registry.example.com/repository/oaa-factor-email:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-factor-fido:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-svc:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-admin:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-drss:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-factor-kba:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-policy:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-factor-push:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/risk-engine:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/risk-cc:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-factor-sms:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-spui:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-factor-totp:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-factor-yotp:12.2.1.4.1-<release-date>
          container-registry.example.com/repository/oaa-mgmt:12.2.1.4.1-<release-date>