Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-3289

rollback.sh script has failed being run just after 1-prepare.sh, and CRW application remained not available

XMLWordPrintable

    • False
    • None
    • False
    • Release Notes
    • Hide
      = Updated migration-rollback script

      Before this update, the `rollback.sh` script failed to roll back the migration from Dev Spaces to CodeReady Workspaces when `rollback.sh` was run directly after `1-prepare.sh`. After this update, the `rollback.sh` script successfully rolls the migration back directly after `1-prepare.sh`.
      Show
      = Updated migration-rollback script Before this update, the `rollback.sh` script failed to roll back the migration from Dev Spaces to CodeReady Workspaces when `rollback.sh` was run directly after `1-prepare.sh`. After this update, the `rollback.sh` script successfully rolls the migration back directly after `1-prepare.sh`.
    • Bug Fix
    • Done
    • Hide

      Run the following command instead of running `rollback.sh`:

      oc scale deployment "${PRE_MIGRATION_PRODUCT_IDENTITY_PROVIDER_DEPLOYMENT_NAME}" --replicas=1 -n "${INSTALLATION_NAMESPACE}"
      oc wait --for=condition=ready pod -l app.kubernetes.io/component="${PRE_MIGRATION_PRODUCT_IDENTITY_PROVIDER_DEPLOYMENT_NAME}",app.kubernetes.io/name="${PRE_MIGRATION_PRODUCT_SHORT_ID}" -n ${INSTALLATION_NAMESPACE} --timeout=120s
      
      oc scale deployment "${PRE_MIGRATION_PRODUCT_DEPLOYMENT_NAME}" --replicas=1 -n "${INSTALLATION_NAMESPACE}"
      oc wait --for=condition=ready pod -l app.kubernetes.io/component="${PRE_MIGRATION_PRODUCT_DEPLOYMENT_NAME}",app.kubernetes.io/name="${PRE_MIGRATION_PRODUCT_SHORT_ID}" -n ${INSTALLATION_NAMESPACE} --timeout=120s
      
      Show
      Run the following command instead of running `rollback.sh`: oc scale deployment "${PRE_MIGRATION_PRODUCT_IDENTITY_PROVIDER_DEPLOYMENT_NAME}" --replicas=1 -n "${INSTALLATION_NAMESPACE}" oc wait -- for =condition=ready pod -l app.kubernetes.io/component= "${PRE_MIGRATION_PRODUCT_IDENTITY_PROVIDER_DEPLOYMENT_NAME}" ,app.kubernetes.io/name= "${PRE_MIGRATION_PRODUCT_SHORT_ID}" -n ${INSTALLATION_NAMESPACE} --timeout=120s oc scale deployment "${PRE_MIGRATION_PRODUCT_DEPLOYMENT_NAME}" --replicas=1 -n "${INSTALLATION_NAMESPACE}" oc wait -- for =condition=ready pod -l app.kubernetes.io/component= "${PRE_MIGRATION_PRODUCT_DEPLOYMENT_NAME}" ,app.kubernetes.io/name= "${PRE_MIGRATION_PRODUCT_SHORT_ID}" -n ${INSTALLATION_NAMESPACE} --timeout=120s

      rollback.sh script [1] has failed being run just after 1-prepare.sh, and CRW application remained not available:

      [INFO] New subscription starting CSV: crwoperator.v2.15.4-0.1658786714.p.
      Warning: resource subscriptions/codeready-workspaces is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by oc apply. oc apply should only be used on resources created declaratively by either oc create --save-config or oc apply. The missing annotation will be patched automatically.
      subscription.operators.coreos.com/codeready-workspaces configured
      [INFO] Waiting 30s for the new codeready-workspaces operator creation.
      error: timed out waiting for the condition on subscriptions/codeready-workspaces

      Full log: rollback_after_1-prepare.log

      [1] https://github.com/eclipse-che/che-docs/blob/bd0efcb1b90c270221dbd3f3ef19ebeb95c812dd/modules/administration-guide/examples/proc_che-rolling-the-upgrade-back-from-che-7-49-to-che-7-41-on-openshift.adoc

        1. rollback_after_1-prepare.log
          8 kB
          Dmytro Nochevnov
        2. Screenshot from 2022-08-24 16-34-16.png
          60 kB
          Dmytro Nochevnov

              abazko Anatolii Bazko
              dnochevn Dmytro Nochevnov
              Jana Vrbkova Jana Vrbkova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: