Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-29463

Able to set Rollback stage after Prep stage. This should be blocked.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.15
    • LCA operator
    • None
    • No
    • False
    • Hide

      None

      Show
      None

      After successfully completing the Prep stage, I accidentally patched the ibu with Rollback stage.

       

      Here's the output of the ibu yaml:

       

      oc get ibu upgrade -o yaml
      apiVersion: [lca.openshift.io/v1alpha1](http://lca.openshift.io/v1alpha1)
      kind: ImageBasedUpgrade
      metadata:
        annotations:
          [kubectl.kubernetes.io/last-applied-configuration](http://kubectl.kubernetes.io/last-applied-configuration): |
            {"apiVersion":"[lca.openshift.io/v1alpha1](http://lca.openshift.io/v1alpha1)","kind":"ImageBasedUpgrade","metadata":{"annotations":{},"name":"upgrade"},"spec":{"extraManifests":[{"name":"extra-manifests-cm0","namespace":"openshift-lifecycle-
      agent"},{"name":"extra-manifests-cm1","namespace":"openshift-lifecycle-agent"}],"oadpContent":[{"name":"oadp-cm-backup","namespace":"openshift-adp"}],"seedImageRef":{"image":"[quay.io/achuzhoy/ibu-seedimage-sno0](http://quay.io/achuzhoy/ibu-seedimage-sno0):
      4.15.0-rc.5-oadp","version":"4.15.0-rc.5"},"stage":"Idle"}}
        creationTimestamp: "2024-02-13T15:08:23Z"
        generation: 4
        name: upgrade
        resourceVersion: "194171"
        uid: b783867e-3e23-47e8-a758-599001773d67
      spec:
        additionalImages:
          name: ""
          namespace: ""
        autoRollbackOnFailure: {}
        extraManifests:
      * name: extra-manifests-cm0
          namespace: openshift-lifecycle-agent
      * name: extra-manifests-cm1
          namespace: openshift-lifecycle-agent
        oadpContent:
      * name: oadp-cm-backup
          namespace: openshift-adp
        seedImageRef:
          image: [quay.io/achuzhoy/ibu-seedimage-sno0:4.15.0-rc.5-oadp](http://quay.io/achuzhoy/ibu-seedimage-sno0:4.15.0-rc.5-oadp)
          version: 4.15.0-rc.5
        stage: Rollback
      status:
        conditions:
      * lastTransitionTime: "2024-02-13T21:31:23Z"
          message: In progress
          observedGeneration: 3
          reason: InProgress
          status: "False"
          type: Idle
      * lastTransitionTime: "2024-02-13T21:36:24Z"
          message: Prep completed
          observedGeneration: 3
          reason: Completed
          status: "False"
          type: PrepInProgress
      * lastTransitionTime: "2024-02-13T21:36:24Z"
          message: Prep completed successfully
          observedGeneration: 3
          reason: Completed
          status: "True"
          type: PrepCompleted
      * lastTransitionTime: "2024-02-13T21:38:34Z"
          message: Upgrade not started or already finalized
          observedGeneration: 4
          reason: InvalidTransition
          status: "False"
          type: RollbackInProgress
        observedGeneration: 4

       

      If we get the ibu without '-o yaml', we get:

       

      oc get ibu upgrade 
      NAME      AGE     DESIRED STAGE   STATE               DETAILS
      upgrade   6h34m   Prep            InvalidTransition   Abort or finalize not allowed 

       

      Which appears like it has issues.

       

      We should either not allow the switch of the stage in this case, or invest in documenting this state and details.

       

       

              jche@redhat.com Jun Chen
              achuzhoy@redhat.com Alexander Chuzhoy
              Periyamaruthu Mohanraj Periyamaruthu Mohanraj
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: