6.2 Rollback Tasks

To roll back from Policy 23.4.9 to a previous version:

Note:

  • No configuration should be performed during rollback.
  • Caution:

    Do not exit from helm rollback command manually. After running the helm rollback command, it takes some time (depending upon number of pods to rollback) to rollback all of the services. In the meantime, you must not press "ctrl+c" to come out from helm rollback command. It may lead to anomalous behavior.
  • Ensure that no Policy pod is in the failed state.
  1. Run the following command to check the revision you must roll back to:
    helm history <release_name> -n <release_namespace>

    Where,

    • <release_name> is the release name used by the Helm command.
    • <release_namespace> is the namespace where Policy is deployed.

    For example:

    helm history occnp --namespace occnp
  2. If you are rolling back from Policy 23.2.4, perform the following tasks for audit registration to be successful and audit cycle to continue as expected:
    1. Run the following command to find if JSON element "handleNullAsStale":false exists in audit_req_data column for a service.

      select * from AuditRegistrations\G
    2. If the JSON element exits, copy the JSON object string from column audit_reg_data and update it with the JSON element "handleNullAsStale":false or "handleNullAsStale":true element being removed and then use the updated JSON string for the column audit_reg_data in the below UPDATE command.

      UPDATE occnp_audit_service.auditregistrations SET audit_req_data='{audit_req_data}' where service_name='{servicename}';

      {audit_req_data} should be the updated column data and {servicename} should be the value of the column service_name.

    3. Run the following command to verify that the element is no longer in the JSON value.
      select * from AuditRegistrations\G
    4. Verify that the audit process is functioning as expected.
  3. Run the command to rollback to the required revision:
    helm rollback <release_name> <revision_number> --namespace <release_namespace>

    Where, <revision_number> is the release number to which Policy needs to be rolled back.

    For example:

    helm rollback occnp 1 --namespace occnp
  4. If the rollback fails, see Upgrade or Rollback Failure in Oracle Communications Cloud Native Core, Converged Policy Troubleshooting Guide.