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

TALM performs "afterCompletion" actions while blocked

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • CNF RAN Sprint 275
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      When a CGU is blocked by another CGU, TALM will perform the "afterCompletion" actions while in the blocked state. The actions should not execute until the CGU has completed.

      Version-Release number of selected component (if applicable):

      CSV: topology-aware-lifecycle-manager.v4.18.0
      registry.redhat.io/openshift4/topology-aware-lifecycle-manager-rhel9-operator@sha256:bd2bf0ef13ae56a483ac80d5979dabe6a12e6675888044edda419a063b7fcf64

      How reproducible:

      100%

      Steps to Reproduce:

       1. Create 2 CGUs. The second has an afterCompletion action to delete a label. The second CGU should be blocked on the first.

      apiVersion: ran.openshift.io/v1alpha1
      kind: ClusterGroupUpgrade
      metadata:
        name: upgrade-18
        namespace: default
      spec:
        actions:
          afterCompletion:
            deleteClusterLabels:
              upgrade-version-4-18: ""
            deleteObjects: true
          beforeEnable:
            deleteClusterLabels:
              upgrade-version-4-17: ""
        backup: false
        clusters:
        - cnfdf02
        enable: true
        managedPolicies:
          - core-upgrade-prep-18
          - core-upgrade-ocp-18
          - core-upgrade-olm-18
          - core-upgrade-validate-18
        preCaching: false
        preCachingConfigRef: {}
        remediationStrategy:
          maxConcurrency: 1
          timeout: 240
      
      ---
      
      apiVersion: ran.openshift.io/v1alpha1
      kind: ClusterGroupUpgrade
      metadata:
        name: upgrade-finish
        namespace: default
      spec:
        actions:
          afterCompletion:
            deleteClusterLabels:
              upgrade-finish: ""
            deleteObjects: true
        backup: false
        clusters:
        - cnfdf02
        enable: true
        managedPolicies:
          # These policies unpause the MCP
          - core-upgrade-workers-1-storage
          - core-upgrade-workers-2
          - core-upgrade-workers-3
        preCaching: false
        preCachingConfigRef: {}
        remediationStrategy:
          maxConcurrency: 1
          timeout: 240
        blockingCRs:
        - name: upgrade-18
          namespace: default    

      2. Apply the first CGU, then the second. The first should take some time to complete.
      3. Note that the label is removed from the managedcluster while the second CGU remains blocked 

      Actual results:

      ManagedCluster has the "upgrade-finish" label removed as soon as I add it and immediately if I re-add it.

      Expected results:

      Label remains on cluster until the second CGU completes.

      Additional info:

          

       

              saskari@redhat.com Saeid Askari
              rhn-support-imiller Ian Miller
              None
              None
              Dwaine Gonyier Dwaine Gonyier
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: