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:
- Check the history of the OAA
management container chart using the following
command:
For example:helm history oaamgmt -n <namespace>
The output will look similar to the following:helm history oaamgmt -n oaans
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
- Rollback the management container
using the following command:
Note:
This command must be run outside the management container.
For example:helm rollback oaamgmt -n <namespace>
helm rollback oaamgmt -n oaans
- Check the history of the OAA
management charts to show the rollback has
occurred:
For example:helm history oaamgmt -n <namespace>
The output will look similar to the following:helm history oaamgmt -n oaans
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
- 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
- Connect to the OAA management pod,
for
example:
This will take you into a bash shell inside the OAA management pod:kubectl exec -n oaans -ti oaamgmt-oaa-mgmt-6f4c9cd56f-std6l -- /bin/bash
[oracle@oaamgmt-oaa-mgmt-6f4c9cd56f-std6l /]$
- 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, setVAULTINSTALL=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. - 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
- Run the following command to confirm
the installation was successfully
downgraded:
Wherehelm history <deployment-name> -n <namespace>
<deployment-name>
is the value of thecommon.deployment.name
in yourinstallOAA.properties
. For example:
The output will look similar to the following:helm history oaainstall -n oaans
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
- Run the following command to check the pods are now using the previous
image:
For example:kubectl get deploy -o wide -n <namespace> |awk '{print $7}'
The output will look similar to the following:kubectl get deploy -o wide -n oaans |awk '{print $7}'
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>