Bug 2055314 - CVO does not recognize the channel change if desired version and channel changed at the same time
Summary: CVO does not recognize the channel change if desired version and channel chan...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.9.z
Assignee: Lalatendu Mohanty
QA Contact: Yang Yang
URL:
Whiteboard:
: 2055310 (view as bug list)
Depends On: 1990635
Blocks: 2055310
TreeView+ depends on / blocked
 
Reported: 2022-02-16 16:44 UTC by OpenShift BugZilla Robot
Modified: 2022-03-16 11:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-16 11:39:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-version-operator pull 742 0 None open [release-4.9] Bug 2055314: Fixing the sync issue when desired version and channel changed at the same time 2022-02-16 16:44:43 UTC
Red Hat Product Errata RHBA-2022:0798 0 None None None 2022-03-16 11:39:33 UTC

Comment 1 Lalatendu Mohanty 2022-02-22 15:48:42 UTC
*** Bug 2055310 has been marked as a duplicate of this bug. ***

Comment 2 Yang Yang 2022-02-28 07:49:46 UTC
Performing PR pre-merge verification as below:

1. Launch a cluster by using cluster-bot
   launch openshift/cluster-version-operator#742 gcp

# oc get clusterversion
NAME      VERSION                                                  AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.9.0-0.ci.test-2022-02-28-055004-ci-ln-3dsr0jb-latest   True        False         11m     Cluster version is 4.9.0-0.ci.test-2022-02-28-055004-ci-ln-3dsr0jb-latest

2. Prepare a dummy cincinnati graph json

{
  "nodes": [
    {
      "version": "4.9.0-0.ci.test-2022-02-28-055004-ci-ln-3dsr0jb-latest",
      "payload": "registry.build01.ci.openshift.org/ci-ln-3dsr0jb/release@sha256:43b670ce26a460ef6e46c63741694fcafb046fbf3111fb7ef1fefdd1dd39efe4",
      "metadata": {
	"io.openshift.upgrades.graph.release.channels": "channel-a,channel-b"
      }
    },
    {
      "version": "4.10.0-rc.5",
      "payload": "registry.ci.openshift.org/ocp/release@sha256:5ebccbbcbeeb3987f9ee3fa7f593c5e24bdd89efd9c6b2e6d525346e4a235ced",
      "metadata": {
	"io.openshift.upgrades.graph.release.channels": "channel-a,channel-b"
      }
    }
  ],
  "edges": [
    [0,1]
  ]
}


3. Patch to update upstream and desired update at the same time

#oc patch clusterversion version --type json -p '[{"op": "add", "path": "/spec/upstream", "value": "https://raw.githubusercontent.com/shellyyang1989/upgrade-cincy/master/cincy3.json"}, {"op": "add", "path": "/spec/channel", "value": "channel-a"}, {"op": "add", "path": "/spec/desiredUpdate", "value": {"version": "4.10.0-rc.5"}}]'
clusterversion.config.openshift.io/version patched

4. Check cv

# oc get clusterversion -oyaml
apiVersion: v1
items:
- apiVersion: config.openshift.io/v1
  kind: ClusterVersion
  metadata:
    creationTimestamp: "2022-02-28T05:57:30Z"
    generation: 3
    name: version
    resourceVersion: "30810"
    uid: 15eab731-07d1-49e3-86b2-3160a8fd2c2a
  spec:
    channel: channel-a
    clusterID: 34184194-03b9-4c50-8aca-14f53eb0562b
    desiredUpdate:
      version: 4.10.0-rc.5
    upstream: https://raw.githubusercontent.com/shellyyang1989/upgrade-cincy/master/cincy3.json
  status:
    availableUpdates:
    - channels:
      - channel-a
      - channel-b
      image: registry.ci.openshift.org/ocp/release@sha256:5ebccbbcbeeb3987f9ee3fa7f593c5e24bdd89efd9c6b2e6d525346e4a235ced
      version: 4.10.0-rc.5
    conditions:
    - lastTransitionTime: "2022-02-28T06:38:22Z"
      status: "True"
      type: RetrievedUpdates
    - lastTransitionTime: "2022-02-28T06:18:30Z"
      message: Done applying 4.9.0-0.ci.test-2022-02-28-055004-ci-ln-3dsr0jb-latest
      status: "True"
      type: Available
    - lastTransitionTime: "2022-02-28T06:18:30Z"
      status: "False"
      type: Failing
    - lastTransitionTime: "2022-02-28T06:38:22Z"
      message: 'Working towards 4.10.0-rc.5: downloading update'
      reason: DownloadingUpdate
      status: "True"
      type: Progressing
    desired:
      channels:
      - channel-a
      - channel-b
      image: registry.ci.openshift.org/ocp/release@sha256:5ebccbbcbeeb3987f9ee3fa7f593c5e24bdd89efd9c6b2e6d525346e4a235ced
      version: 4.10.0-rc.5
    history:
    - completionTime: null
      image: registry.ci.openshift.org/ocp/release@sha256:5ebccbbcbeeb3987f9ee3fa7f593c5e24bdd89efd9c6b2e6d525346e4a235ced
      startedTime: "2022-02-28T06:38:22Z"
      state: Partial
      verified: false
      version: 4.10.0-rc.5
    - completionTime: "2022-02-28T06:18:30Z"
      image: registry.build01.ci.openshift.org/ci-ln-3dsr0jb/release@sha256:43b670ce26a460ef6e46c63741694fcafb046fbf3111fb7ef1fefdd1dd39efe4
      startedTime: "2022-02-28T05:57:30Z"
      state: Completed
      verified: false
      version: 4.9.0-0.ci.test-2022-02-28-055004-ci-ln-3dsr0jb-latest
    observedGeneration: 3
    versionHash: 4thv-EgawMk=
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

5. Check upgrade status
# oc get clusterversion
NAME      VERSION       AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-rc.5   True        False         10m     Cluster version is 4.10.0-rc.5

The upgrade is not blocked by invalid version.

Comment 3 Angie Wang 2022-03-02 16:29:02 UTC
Hello @lmohanty, a follow-up with this BZ tatus. Looks like this PR is close to merge. Just need /cherry-pick-approved label! Not sure who should add that label? We desire this fix in CVO 4.9 to support OCP 4.9 to 4.10 upgrade for our Telco RAN solution.

Comment 4 Angie Wang 2022-03-02 16:29:32 UTC
Hello @lmohanty, a follow-up with this BZ status. Looks like this PR is close to merge. Just need /cherry-pick-approved label! Not sure who should add that label? We desire this fix in CVO 4.9 to support OCP 4.9 to 4.10 upgrade for our Telco RAN solution.

Comment 9 errata-xmlrpc 2022-03-16 11:39:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.9.24 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:0798


Note You need to log in before you can comment on or make changes to this bug.