Downgrading an Upgraded Instance

If, upon migration, you discover that your instance is unstable because FMW 11.1.1.9 binaries are incompatible your applications, you can use the command downgrade-service-instance to restore it to the FMW 11.1.1.7-based binaries.

Note:

Be aware of the following:
  • downgrade-service-instance replaces jrf-revert-to-ps6, introduced in JCS-SaaS Extension version 17.2.3. While the former command will still work, we recommend that you use the new commands going forward and reserve the former commands only for when you need to ensure backward compatibility.

  • This command only works with instances that have already been migrated to FMW 11.1.1.9 by using the upgrade-service-instance command. You cannot revert an instance that was originally provisioned in FMW 11.1.1.9

Using the Command

./javacloud -u userName -id identityDomain  -si serviceInstance -downgrade-service-instance
Parameter (Alias) Description
user (-u) The name used to authenticate the user.
identitydomain (-id) The name of the identity domain in which the service instance exists.
serviceinstance (-si) The name of the service instance you want to migrate.

Note:

For a list of optional parameters:
  1. Navigate to the $SDK_HOME/doc/index.html file (where SDK_HOME is the directory containing your JCS - SaaS Extension installation) or go to the SDK documentation via the “Welcome App”.

  2. Click CLI-Javacloud.jar.

  3. In the command list, search for downgrade-service-instance and click it to retrieve details about the command.

How Revert Works

downgrade-service-instance removes the configuration added during the migration process and then restarts the domain.

Use Case 1: Reverting an Instance

Assuming an instance was migrated to FMW 11.1.1.9 by using upgrade-service-instance, you can revert it to FMW 11.1.1.7, as demonstrated in this use case.

  1. First, we'll use the list-config command to verify that the instance we plan to migrate is in FMW 11.1.1.9; that is, uses JRF 11.1.1.9.0:
    $ ./javacloud -dc em2 -user joe.user@myco.com -id migration1234  -si migrationinst1234 -list-config -sv -v -search jrf
    
    The system responds:
    #==================================================================================================================================================================================#
    |                                                                            Listing one Simple Config                                                                             |
    |                                                      [Identity Domain=migrationtestid9, Service Instance=migrationtestsi9]                                                       |
    #=#=========================#==========#========#=======#========#================================================================================================#==========#=====#
    | |                         |          | Value  |Value  |Restart |                                                                                                |          |     |
    |#|          Name           |Value Type|Readable|Writabl|Required|                                          Description                                           |  Value   |Label|
    | |                         |          |        |   e   |        |                                                                                                |          |     |
    |=|=========================|==========|========|=======|========|================================================================================================|==========|=====|
    | |                         |          |        |       |        |It shows the current version of JRF which the instance is using. The possible values for this   |          |     |
    |1|oracle.common.jrf.version|STRING    |   Y    |       |        |config property are: (11.1.1.7.0,11.1.1.9.0).                                                   |11.1.1.9.0|     |
    | |                         |          |        |       |        |                                                                                                |          |     |
    +-+-------------------------+----------+--------+-------+--------+------------------------------------------------------------------------------------------------+----------+-----+
  2. Note that the Value is 11.1.1.9.0, indicating the JRF version is FMW 11.1.1.9, so next we'll use downgrade-service-instance to revert the instance to FMW 11.1.1.7:
    $ ./javacloud -dc em2 -user joe.user@myco.com -id migration1234  -si migrationinst1234 -downgrade-service-instance
    The system reponds:
    [INFO]    - The revert to PS6 has been performed.
     
    1:Job Id         - 9515
    -----------      - -----------------------
    ->               - Properties
    ------------     - -----------------------
    Status           - NEW
    Identity Domain  - migrationtestid9
    Service Instance - migrationtestsi9
    Application      -
    Start Time       - Thursday, March 30, 2017 12:08:14 AM PDT
    Operation        - Revert JRF to PS6
    -------------    - -----------------------
     
    [TIP]            - You can use the command "job-status" to monitor a job.
  3. You can see that the process returned a Job ID (9515). We'll use this number with the -list-job-logs -jobid command to check see which logs have been completed for this migration. These logs are useful in tracking the activity within the process:
    $ ./javacloud -dc em2 -user joe.user@myco.com -id migration1234  -si migrationinst1234 -list-job-logs -jobid 9515
    The system responds with this list of the two job logs produced for this migration:
    #=======================================================================#
    |                      Listing 2 job(id=9515) logs                      |
    #=#===========================#============================#============#
    |#|         Log Name          |  Last Updated Description  |Content Type|
    |=|===========================|============================|============|
    |1|validate-instance-migration|4 minutes and 55 seconds ago|text/plain  |
    |-+---------------------------+----------------------------+------------|
    |2|exec-revert-script         |4 minutes and 10 seconds ago|text/plain  |
    +-+---------------------------+----------------------------+------------+
    
  4. Next, we'll run list-config again to verify that the revert has completed and the instance is again using JRF 11.1.1.7.0:
    $ ./javacloud -dc em2 -user joe.user@myco.com -id migration1234  -si migrationinst1234 -list-config -sv -v -search jrf
    The system responds:
    #==================================================================================================================================================================================#
    |                                                                            Listing one Simple Config                                                                             |
    |                                                      [Identity Domain=migrationtestid9, Service Instance=migrationtestsi9]                                                       |
    #=#=========================#==========#========#=======#========#================================================================================================#==========#=====#
    | |                         |          | Value  |Value  |Restart |                                                                                                |          |     |
    |#|          Name           |Value Type|Readable|Writabl|Required|                                          Description                                           |  Value   |Label|
    | |                         |          |        |   e   |        |                                                                                                |          |     |
    |=|=========================|==========|========|=======|========|================================================================================================|==========|=====|
    | |                         |          |        |       |        |It shows the current version of JRF which the instance is using. The possible values for this   |          |     |
    |1|oracle.common.jrf.version|STRING    |   Y    |       |        |config property are: (11.1.1.7.0,11.1.1.9.0).                                                   |11.1.1.7.0|     |
    | |                         |          |        |       |        |                                                                                                |          |     |
    +-+-------------------------+----------+--------+-------+--------+------------------------------------------------------------------------------------------------+----------+-----+ 
    The Value is 11.1.1.7.0, indicating the revert to FMW 11.1.1.7 is successful.
  5. Finally, we'll open the configuration shell and use the list-token-issuer-trust command to verify the revert:
    $ ./javacloud.jar  -dc em2 -user joe.user@myco.com -id migration1234  -si migrationinst1234   -config-shell
    The system responds:
    [INFO]    - Java Cloud Service - SaaS Extension config  shell.
                Initializing ...
    Please exit and re-enter the shell if the prompt does not appear within a few seconds. You can type "exit" to exit the shell.
    Then, enter the config-shell command:
    Config-shell:>list-token-issuer-trust
    The system responds:
    migration1234
    www.oracle.com

Use Case 2: Reverting an Instance Originally Provisioned in FMW 11.1.1.9 to FMW 11.1.1.7

In this use case, we try take an instance that was provisioned in FMW 11.1.1.9--that is, it never ran on FMW 11.1.1.7--and revert it to FMW 11.1.1.7. Since JCS-SaaS Extension does not allow this type of revert, this case should fail.

  1. First, we'll use the list-config command to verify that the instance we plan to migrate is in FMW 11.1.1.9; that is, uses JRF 11.1.1.9.0:
    $ ./javacloud -dc em2 -user joe.user@myco.com -id migration1234  -si migrationinst5678 -list-config -sv -v -search jrf
    The system responds:
    #==================================================================================================================================================================================#
    |                                                                            Listing one Simple Config                                                                             |
    |                                                      [Identity Domain=migrationtestid9, Service Instance=migrationtestsi9]                                                       |
    #=#=========================#==========#========#=======#========#================================================================================================#==========#=====#
    | |                         |          | Value  |Value  |Restart |                                                                                                |          |     |
    |#|          Name           |Value Type|Readable|Writabl|Required|                                          Description                                           |  Value   |Label|
    | |                         |          |        |   e   |        |                                                                                                |          |     |
    |=|=========================|==========|========|=======|========|================================================================================================|==========|=====|
    | |                         |          |        |       |        |It shows the current version of JRF which the instance is using. The possible values for this   |          |     |
    |1|oracle.common.jrf.version|STRING    |   Y    |       |        |config property are: (11.1.1.7.0,11.1.1.9.0).                                                   |11.1.1.9.0|     |
    | |                         |          |        |       |        |                                                                                                |          |     |
    +-+-------------------------+----------+--------+-------+--------+------------------------------------------------------------------------------------------------+----------+-----+
    Note that the Value is 11.1.1.9.0, indicating the JRF version is FMW 11.1.1.9.
  2. Now we'll use -jrf-revert-to-ps6 and try to revert the instance to FMW 11.1.1.7:
    $ ./javacloud -dc em2 -user joe.user@myco.com -id migration1234  -si migrationinst5678 -downgrade-service-instance
    The system responds:
    It is not possible to perform the operation JRF Revert
    To PS6 over this instance, as it has been created originally with the JRF
    Version 11.1.1.9.0
  3. To further verify that the revert failed, we'll try to migrate the instance from FMW 11.1.1.7 to FMW 11.1.1.9:
    $ ./javacloud -dc em2 -user joe.user@myco.com -id migration1234  -si migrationinst1234 -upgrade-service-instance
    The system responds:
    [ERROR]   - The instance migration1234.migrationinst5678 already is running with JRF
                11.1.1.9.0 version.
    This indicates that the instance migrationinst5678 was never reverted.