18 Rolling Back Your Patch Set Upgrade

Learn how to roll back your Oracle Communications Billing and Revenue Management (BRM) cloud native upgrade to a previous patch set release.

Topics in this document:

In this document, the patch set release you are rolling back from is called the new release. The patch set release you are rolling back to is called the old release. For example, if you are rolling back the Patch Set 8 upgrade to the Patch Set 7 release, Patch Set 8 is the new release and Patch Set 7 is the old release.

Note:

The steps in this document assume that you have already downloaded the old and new Patch Set releases.

Rolling Back Your Upgrade of BRM Server

To roll back your upgrade of the BRM cloud native server:

  1. Install the old release of BRM cloud native server.

    1. Initialize the database schema for the old release:

      helm install oldInitDbRelease -n oldInitDbNameSpace oc-cn-init-db-helm-chart --values oc-cn-init-db-helm-chart/override_values.yaml

      where oldInitDbRelease is the release name for the old version of oc-cn-init-db-helm-chart, and oldInitDbNameSpace is the namespace for the old version of oc-cn-init-db-helm-chart.

    2. Deploy the BRM Helm chart for the old release:

      helm install oldBrmRelease -n oldBrmNameSpace oc-cn-helm-chart --values oc-cn-helm-chart/override_values.yaml --wait --timeout 1200s

      where oldBrmRelease is the release name for the old version of oc-cn-helm-chart, and oldBrmNameSpace is the namespace for the old version of oc-cn-helm-chart.

  2. Back up the DD* database tables for the old release:

    CREATE TABLE DD_OBJECTS_T_PSO AS SELECT * FROM DD_OBJECTS_T;
    CREATE TABLE DD_FIELDS_T_PSO AS SELECT * FROM DD_FIELDS_T;
    CREATE TABLE DD_OBJECTS_FIELDS_T_PSO as select * from DD_OBJECTS_FIELDS_T;
    CREATE TABLE DD_TYPES_T_PSO as select * from DD_TYPES_T;
    CREATE TABLE BRM_PS_T_PSO as select * from BRM_PS_T;

    where O is the patch set release number you are rolling back to. For example, if you are rolling back from Patch Set 6 to Patch Set 5, O would be 5.

  3. Upgrade your BRM server to the new release.

    1. In your override_values.yaml files for both oc-cn-init-db-helm-chart and oc-cn-helm-chart, set the ocbrm.is_upgrade key to true.

    2. Deploy the BRM database initializer Helm chart for the new release:

      helm install newInitDbRelease -n newInitDbNameSpace oc-cn-init-db-helm-chart --values oc-cn-init-db-helm-chart/override_values.yaml

      where newInitDbRelease is the release name for the new version of oc-cn-init-db-helm-chart, and newInitDbNameSpace is the namespace for the new version of oc-cn-init-db-helm-chart.

    3. Deploy the BRM Helm chart for the new release:

      helm upgrade newBrmRelease -n newBrmNameSpace oc-cn-helm-chart --values oc-cn-helm-chart/override_values.yaml --wait --timeout 1200s

      where newBrmRelease is the release name for the new version of oc-cn-helm-chart, and newBrmNameSpace is the namespace in which to create the new version of oc-cn-helm-chart.

    4. Check the revision history:

      helm history oldBrmRelease -n oldBrmNameSpace

      If successful, you will see something similar to this:

      REVISION   UPDATED                    STATUS        CHART APP               VERSION        DESCRIPTION 
      1          Thu May  5 07:12:46 2030   superseded    oc-cn-helm-chart-1.0    12.0.0.4.0     Install complete
      2          Thu May  5 08:32:09 2030   deployed      oc-cn-helm-chart-1.0    12.0.0.5.0     Upgrade complete
  4. Back up the DD* database tables for the new release:

    CREATE TABLE DD_OBJECTS_T_PSN AS SELECT * FROM DD_OBJECTS_T;
    CREATE TABLE DD_FIELDS_T_PSN AS SELECT * FROM DD_FIELDS_T;
    CREATE TABLE DD_OBJECTS_FIELDS_T_PSN as select * from DD_OBJECTS_FIELDS_T;
    CREATE TABLE DD_TYPES_T_PSN as select * from DD_TYPES_T;
    CREATE TABLE BRM_PS_T_PSN as select * from BRM_PS_T;

    where N is the patch set release number you are rolling back from. For example, if you are rolling back from Patch Set 6 to Patch Set 5, N would be 6.

  5. Roll back your BRM server from the new release to the old release.

    1. Roll back your BRM Helm release to the previous revision:

      helm rollback newBrmRelease 1 -n newBrmNameSpace
    2. Retrieve the history for the BRM Helm release:

      helm history newBrmNameSpace -n newBrmNameSpace

      If successful, you will see something similar to this:

      REVISION   UPDATED                    STATUS        CHART APP               VERSION        DESCRIPTION 
      1          Thu May  5 07:12:46 2030   superseded    oc-cn-helm-chart-1.0    12.0.0.4.0     Install complete
      2          Thu May  5 08:32:09 2030   superseded    oc-cn-helm-chart-1.0    12.0.0.5.0     Upgrade complete
      3          Thu May  5 08:35:49 2030   deployed      oc-cn-helm-chart-1.0    12.0.0.4.0     Rollback to 1
  6. Restore the DD* database tables from the old release, and then start the pods.

    1. Drop the DD* database tables for the new release:

      drop table DD_OBJECTS_T; 
      drop table DD_FIELDS_T; 
      drop table DD_OBJECTS_FIELDS_T; 
      drop table DD_TYPES_T; 
      drop table brm_ps_t;
    2. Rename the backed up DD* database tables you created in step 2 to their original names:

      RENAME DD_OBJECTS_T_PSO TO DD_OBJECTS_T;
      RENAME DD_FIELDS_T_PSO TO DD_FIELDS_T;
      RENAME DD_OBJECTS_FIELDS_T_PSO TO DD_OBJECTS_FIELDS_T;
      RENAME DD_TYPES_T_PSO TO DD_TYPES_T;
      RENAME BRM_PS_T_PSO TO BRM_PS_T;
      where O is the patch set release number you are rolling back to. For example, if you are rolling back from Patch Set 6 to Patch Set 5, O would be 5.
  7. Run the /oms/sys/dm_oracle/data/create_procedures_AL32UTF8.plb script through a brm-apps job.

    1. Add the following lines to the oc-cn-helm-chart/brmapps_scripts/loadme.sh script:

      #!/bin/sh 
      
      cd /oms/sys/dm_oracle/data; sqlplus $ORACLE_USER_PIN/$ORACLE_USER_PIN@$ORACLE_SID <create_procedures_AL32UTF8.plb
      exit 0;
    2. In the override-values.yaml file for oc-cn-helm-chart, set ocbrm.brm_apps.job to true.

    3. Run the helm upgrade command for the old release of the BRM Helm chart:

      helm upgrade oldBrmRelease oc-cn-helm-chart --values OverrideValuesFile -n oldBrmNameSpace
  8. (Optional) Create an account and run billing.

  9. Upgrade your BRM Server to the new release.

    1. In your override-values.yaml files for both oc-cn-init-db-helm-chart and oc-cn-helm-chart, set the ocbrm.is_upgrade key to true.

    2. Deploy the BRM database initializer Helm chart for the new release:

      helm install newInitDbRelease -n newInitDbNameSpace oc-cn-init-db-helm-chart --values oc-cn-init-db-helm-chart/override_values.yaml
    3. Deploy the BRM Helm chart for the new release:

      helm upgrade newBrmRelease -n newBrmNameSpace oc-cn-helm-chart --values oc-cn-helm-chart/override_values.yaml --wait --timeout 1200s
  10. Restore the DD* database tables from the new release, and then start the pods.

    1. Create a backup of the current DD* database tables from the new release:

      CREATE TABLE DD_OBJECTS_T_PSN_2 AS SELECT * FROM DD_OBJECTS_T; 
      CREATE TABLE DD_FIELDS_T_PSN_2 AS SELECT * FROM DD_FIELDS_T; 
      CREATE TABLE DD_OBJECTS_FIELDS_T_PSN_2 as select * from DD_OBJECTS_FIELDS_T; 
      CREATE TABLE DD_TYPES_T_PSN_2 as select * from DD_TYPES_T; 
      CREATE TABLE BRM_PS_T_PSN_2 as select * from BRM_PS_T;

      where N is the patch set release number you are rolling back from. For example, if you are rolling back from Patch Set 6 to Patch Set 5, N would be 6.

    2. Drop the current DD* database tables from the new release:

      drop table DD_OBJECTS_T; 
      drop table DD_FIELDS_T; 
      drop table DD_OBJECTS_FIELDS_T; 
      drop table DD_TYPES_T;
    3. Rename the backed up DD* database tables that you created in step 4 to their original names:

      RENAME DD_OBJECTS_T_PSN TO DD_OBJECTS_T; 
      RENAME DD_FIELDS_T_PSN TO DD_FIELDS_T; 
      RENAME DD_OBJECTS_FIELDS_T_PSN TO DD_OBJECTS_FIELDS_T; 
      RENAME DD_TYPES_T_PSN TO DD_TYPES_T; 

      where N is the patch set release number you are rolling back from. For example, if you are rolling back from Patch Set 6 to Patch Set 5, N would be 6.

    4. Delete the dm-oracle and cm pods:

      kubectl -n newBrmRelease delete pod dm-oracle
      kubectl -n newBrmRelease delete pod cm
  11. Test that the rollback was successful by creating an account and running billing.

Rolling Back Your Upgrade of PDC

You can roll back a PDC upgrade using one of these options:

Rolling Back Your BRM and PDC Upgrades

The following shows steps for rolling back your BRM and PDC Patch Set 8 upgrade to BRM and PDC Patch Set 7, but you can use these steps to roll back any patch set release.

To roll back your BRM and PDC upgrades from Patch Set 8 to Patch Set 7:

  1. Deploy both BRM and PDC Patch Set 7:

    helm install oldBrmRelease oc-cn-helm-chart --values oldOverrideValuesFile -n oldBrmNameSpace

    where:

    • oldBrmRelease is the Helm release name for Patch Set 7.

    • oldBrmNameSpace is the name for your BRM Patch Set 7 namespace.

    • oldOverrideValuesFile is the override-values.yaml file for Patch Set 7.

  2. Back up your BRM Patch Set 7 database tables:

    CREATE TABLE DD_OBJECTS_T_PSO AS SELECT * FROM DD_OBJECTS_T;
    CREATE TABLE DD_FIELDS_T_PSO AS SELECT * FROM DD_FIELDS_T;
    CREATE TABLE DD_OBJECTS_FIELDS_T_PSO as select * from DD_OBJECTS_FIELDS_T;
    CREATE TABLE DD_TYPES_T_PSO as select * from DD_TYPES_T;
    CREATE TABLE BRM_PS_T_PSO as select * from BRM_PS_T;

    where O is the patch set release number you are rolling back to. For example, if you are rolling back from Patch Set 8 to Patch Set 7, O would be 7.

  3. Back up your PDC Patch Set 7 database schema. Refer to the Oracle database documentation for information about backing up the schema.

  4. Upgrade your BRM server and PDC to Patch Set 8 by following these instructions:

  5. Back up your BRM Patch Set 8 database tables:

    CREATE TABLE DD_OBJECTS_T_PSN AS SELECT * FROM DD_OBJECTS_T;
    CREATE TABLE DD_FIELDS_T_PSN AS SELECT * FROM DD_FIELDS_T;
    CREATE TABLE DD_OBJECTS_FIELDS_T_PSN as select * from DD_OBJECTS_FIELDS_T;
    CREATE TABLE DD_TYPES_T_PSN as select * from DD_TYPES_T;
    CREATE TABLE BRM_PS_T_PSN as select * from BRM_PS_T;

    where N is the patch set release number you are rolling back from. For example, if you are rolling back from Patch Set 8 to Patch Set 7, N would be 8.

  6. Back up your PDC Patch Set 8 database schema. Refer to the Oracle database documentation for information about backing up the schema.

  7. Drop your PDC Patch Set 7 database schema. Refer to the Oracle database documentation for information about dropping the schema.

  8. Rename your PDC Patch Set 7 back up schema files to Patch Set 7 version. For example:

    • Rename PDCPS7bkup.dmp to PDCPS7

    • Rename PDCPS_XREFPS7bkup.dmp to PDCPS_XREFPS7

  9. Roll back to the BRM and PDC Patch Set 7 release:

    helm rollback oldReleaseName oldRevisionNumber -n oldNameSpace

    where:

    • oldReleaseName is the release name for Patch Set 7 .

    • oldRevisionNumber is the value from the Helm history command.

    • oldNameSpace is the Patch Set 7 namespace.

BRM and PDC are rolled back. The PDC schema will point to Patch Set 7.

Manually Rolling Back Your PDC Upgrade

If you already rolled back your BRM upgrade, you can also roll back the PDC upgrade manually. For example, after rolling back your BRM Patch Set 8 upgrade to BRM Patch Set 7, you can manually roll back your PDC Patch Set 8 upgrade to PDC Patch Set 7.

The following shows steps for rolling back PDC Patch Set 8 to PDC Patch Set 7, but you can use these steps to roll back any patch set release.

Note:

Perform this procedure only if you already rolled back your BRM upgrade to an old patch set or interim patch set release.

To manually roll back your PDC upgrade from Patch Set 8 to Patch Set 7:

  1. If you have not already done so, back up your PDC Patch Set 7 database schema. Refer to the Oracle database documentation for information about backing up your schema.

  2. Back up your PDC Patch Set 8 database schema. Refer to the Oracle database documentation for information about backing up your schema.

  3. Drop the PDC schema user and PDC XREF schema user for Patch Set 8.

  4. Create the PDC schema user and PDC XREF schema user for Patch Set 7.

  5. Import the PDC Patch Set 7 schema into your database. Refer to the Oracle database documentation for information about importing schemas.

  6. Run the helm upgrade command to update to the Patch Set 7 release:

    helm upgrade oldBrmRelease oc-cn-helm-chart --values oldOverrideValuesFile -n oldBrmNameSpace

    where:

    • oldBrmRelease is the Helm release name for Patch Set 7.

    • oldOverrideValuesFile is the override-values.yaml file for Patch Set 7.

    • oldBrmNameSpace is the name for your BRM Patch Set 7 namespace.

Rolling Back Your Upgrade of ECE

The following procedure assumes that you have upgraded ECE from Patch Set 5 (Revision 1), to Patch Set 6 (Revision 2), and then to Patch Set 7 (Revision 3). To roll back your upgrade from Patch Set 7 to Patch Set 6, you would do this:

  1. Check the revision history of the ECE release:

    helm history ECEReleaseName -n BrmNamespace

    You should see something similar to this:

    REVISION   UPDATED                    STATUS        CHART APP               VERSION        DESCRIPTION 
    1          Thu May  5 07:12:46 2030   superseded    oc-cn-helm-chart-1.0    12.0.0.5.0     Initial install
    2          Thu May  5 08:32:09 2030   superseded    oc-cn-helm-chart-1.0    12.0.0.6.0     Upgraded successfully
    3          Thu May  5 09:50:00 2030   deployed      oc-cn-helm-chart-1.0    12.0.0.7.0     Upgraded successfully
  2. Roll back the release to ECE 12.0 Patch Set 6:

    helm rollback ECEReleaseName 2 -n BrmNamespace

    If successful, you will see this:

    Rollback was a success! Happy Helming!
  3. Check the revision history of the ECE release:

    helm history ECEReleaseName -n BrmNamespace

    If successful, you should see something similar to this:

    REVISION   UPDATED                    STATUS        CHART APP               VERSION        DESCRIPTION 
    1          Thu May  5 07:12:46 2030   superseded    oc-cn-helm-chart        12.0.0.5.0     Initial install
    2          Thu May  5 08:32:09 2030   superseded    oc-cn-helm-chart        12.0.0.6.0     Upgraded successfully
    3          Thu May  5 09:50:00 2030   superseded    oc-cn-helm-chart        12.0.0.7.0     Upgraded successfully
    4          Thu May  5 11:25:00 2030   deployed      oc-cn-helm-chart        12.0.0.6.0     Roll back to 2