Rolling back interim fix on Engineering Lifecycle Management instance by using Kubernetes CLI

To rollback the interim fix on the Engineering Lifecycle Management instance, you need the Engineering Lifecycle Management operator to the version that supports the old interim fix. You can rollback by using the Kubernetes CLI method.

Before you begin

  • Require the appropriate permissions to roll back the Engineering Lifecycle Management instance. For more information about the user roles, see User roles mapping in Engineering Lifecycle Management on Hybrid Cloud.
  • Complete the following steps to see the available Engineering Lifecycle Management version that you want to roll back. The identified Engineering Lifecycle Management version must be supported by the Engineering Lifecycle Management operator.
    kubectl get elm -n <namespace-name>
    kubectl get elm <elm-instance-name> -o jsonpath='Installed ELM Version : {.spec.version} {"\n"}Available ELM Versions : {.status.versions.available.versions} {"\n"}{.status.upgradeStatus.conditions[].message}' -n <namespace-name>

    Replace the namespace-name and elm-instance-name. For example

    kubectl get elm -n example
    kubectl get elm example-elm <elm-instance-name> -o jsonpath='Installed ELM Version : {.spec.version} {"\n"}Available ELM Versions : {.status.versions.available.versions} {"\n"}{.status.upgradeStatus.conditions[].message}' -n example

Procedure

  1. Log in to the kubernetes and connect to your project.
  2. Patch the Engineering Lifecycle Management instance. Cluster administrator or user with the necessary permissions needs to patch the Engineering Lifecycle Management instance version to the available upgrade version.
  3. Get Engineering Lifecycle Management instance.
    kubectl get elm -n <namespace-name>
    Replace the namespace-name
    kubectl get elm -n example
  4. Rollback Engineering Lifecycle Management instance
    kubectl patch elm <elm-instance-name> --patch '{"spec":{"version":"<available-elm-version>"}}' --type=merge -n <namespace-name>

    Replace the elm-instance-name and namespace-name. For example

    kubectl patch elm example-elm --patch '{"spec":{"version":"7.1.0_iFix002"}}' --type=merge -n example
    The Engineering Lifecycle Management operator starts the rollback process. The following stages are completed during the process.
    • Rollback validations
    • Rollback
    • Engineering Lifecycle Management instance post rollback validations
    • Application Diagnostics
  5. Monitor the rollback progress in the Upgrade Events table and Application Events table. Once the rollback process completes, you can see the Completed status for all four stages in the Upgrade Events table. If any error message appears, resolve the error by following the troubleshooting information that is provided in Troubleshooting of upgrade errors
    kubectl get elm <elm-instance-name> -o jsonpath='Application Events : {"\n\n"}{range .status.applicationsStatus.conditions[*]}Application - {.type}{"\t"}Status - {.status}{"\t"}Message - {.message}{"\n"}{end}{"\n\n"}Upgrade Events : {"\n\n"}{range .status.upgradeStatus.conditions[*]}Status - {.status}{"\t"}Message - {.message}{"\n"}{end}' -n <namespace>

    Replace the elm-instance-name and namespace-name in the following command. For example

    kubectl get elm/example-elm -o jsonpath='Application Events : {"\n\n"}{range .status.applicationsStatus.conditions[*]}Application - {.type}{"\t"}Status - {.status}{"\t"}Message - {.message}{"\n"}{end}{"\n\n"}Upgrade Events : {"\n\n"}{range .status.upgradeStatus.conditions[*]}Status - {.status}{"\t"}Message - {.message}{"\n"}{end}' -n example
  6. Verify that the Engineering Lifecycle Management instance after the rollback process completes. On the successful rollback, you see the installed Engineering Lifecycle Management version is older then the latest available.
    kubectl get elm <elm-instance-name> -o jsonpath='Installed ELM Version : {.spec.version} {"\n"}{.status.upgradeStatus.conditions[].message}' -n <namespace-name>

    Replace the elm-instance-name and namespace-name in the following command. For example

    kubectl get elm example-elm -o jsonpath='Installed ELM Version : {.spec.version} {"\n"}{.status.upgradeStatus.conditions[].message}' -n example
  7. Get the JTS URL and open in browser. The JAS login page opens
    kubectl get elm <elm-instance-name> -o jsonpath='{.spec.hostName}/{.spec.applications.JTS.contextRoot}' -n <namespace-name>

    Replace the elm-instance-name and namespace-name in the following command. For example

    kubectl get elm example-elm -o jsonpath='{.spec.hostName}/{.spec.applications.JTS.contextRoot}' -n example
    Important: Use the login credentials that have administrative privileges in the application.
  8. Click Settings > Manage Server. On the Status Summary page, verify that the Engineering Lifecycle Management version appears in the Build Information section. In the left page, click Diagnostics. Ensure that no error is listed on the page.