Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-16984

RFE Change channel and desiredUpdate version at same time using ClusterCurator doesn't work

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • Moderate

      Description of problem:

      Since the issue [1] was solved with the commit [2], it is possible to upgrade the channel and the desiredUpdate version at same time using ClusterCurator, skipping availableUpdates version checking if force upgrade annotation exists. The force upgrade annotation is "cluster.open-cluster-management.io/upgrade-allow-not-recommended-versions: 'true'".

      This annotation will change the spec.desiredUpdate.image of the cluster version from the digest of the current version to the tag "quay.io/openshift-release-dev/ocp-release:" + desiredUpdate + "-multi" as described in the code [2]. It also will apply desiredUpdate.force.true. At this point, the upgrade to the new version from the new channel is launched correctly. 

      Actually, the problem that we're having is just after that step. Once the previous upgrade is launched, ClusterVersion ends up having spec.desiredUpdate.image: "quay.io/openshift-release-dev/ocp-release:" + desiredUpdate + "-multi" and losing status.desired.channels. This changes will cause that we won't be able to launch a new ClusterCurator to upgrade the cluster to a new version because there aren't channels in status.desired.

      It should be solved updating the spec.desiredUpdate.image of ClusterVersion to the digest image related to the current OCP version. However, we also had to remove the ClusterCurator after fixing spec.desiredUpdate.image  to be able to relaunch ClusterCurator. In any case, upgrades  should be doable through ClusterCurator after the first was done with the annotation (cluster.open-cluster-management.io/upgrade-allow-not-recommended-versions: 'true').  

      On the other hand, we believe that changing spec.desiredUpdate.image to the -multi tag can bring other issues. For instance, we directly lose the list of channels to select in the ClusterVersion. Even we were able, in a lab, to have a ClusterVersion without version:

      apiVersion: config.openshift.io/v1
      kind: ClusterVersion
      metadata:
        creationTimestamp: "2025-01-09T08:30:19Z"
        generation: 20
        name: version
        resourceVersion: "285335"
        uid: 452cd3f3-5fd3-4a2b-87b5-923c84dfa040
      spec:
        channel: candidate-4.16
        clusterID: 0010ed45-c7cd-4c6c-8fec-e1347821b0bd
        desiredUpdate:
          image: quay.io/openshift-release-dev/ocp-release:4.16.29-multi
          version: ""

      It seems that the commit [2] does not take into account some conditions and it may need to be refactored.

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

      How reproducible: 100%

      Steps to Reproduce:

      1.  
      2.  
      3. ...

      Actual results:

      ClusterVersion ends up having spec.desiredUpdate.image: "quay.io/openshift-release-dev/ocp-release:" + desiredUpdate + "-multi" and losing status.desired.channels.

      Expected results:

      ClusterVersion should have a digest image and not loose status.desired.channels.

      Additional info:

      [1] - https://issues.redhat.com/browse/ACM-9334

      [2] - https://github.com/stolostron/cluster-curator-controller/pull/195

              fxiang@redhat.com Feng Xiang
              rhn-support-jomarque Jose Manuel Marquez
              Feng Xiang Feng Xiang
              David Huynh David Huynh
              Joshua Packer Joshua Packer
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: