Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2029785

Summary: CVO panic when an edge is included in both edges and conditionaledges
Product: OpenShift Container Platform Reporter: Yang Yang <yanyang>
Component: Cluster Version OperatorAssignee: W. Trevor King <wking>
Status: CLOSED ERRATA QA Contact: Yang Yang <yanyang>
Severity: high Docs Contact:
Priority: high    
Version: 4.10CC: aos-bugs, bleanhar, wking
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:32:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
CVO log file none

Description Yang Yang 2021-12-07 10:07:45 UTC
Created attachment 1845044 [details]
CVO log file

Description of problem:

If a cincinnati graph contains an edge which is included in both edges and conditionaledges, CVO panic

Snipped CVO log:

3093 W1207 08:39:42.971959       1 cincinnati.go:206] Update to 4.10.0-0.nightly-2021-12-06-162419 listed as both a conditional and unco     nditional update; preferring the conditional update.
3094 I1207 08:39:42.971989       1 cvo.go:582] Finished syncing available updates "openshift-cluster-version/version" (142.33791ms)
3095 E1207 08:39:42.972092       1 runtime.go:78] Observed a panic: runtime.boundsError{x:0, y:0, signed:true, code:0x0} (runtime error:      index out of range [0] with length 0)
3096 goroutine 169 [running]:
3097 k8s.io/apimachinery/pkg/util/runtime.logPanic({0x196f5a0, 0xc0013b4be8})
3098         /go/src/github.com/openshift/cluster-version-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0x85
3099 k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc001a7dd90})
3100         /go/src/github.com/openshift/cluster-version-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x75
3101 panic({0x196f5a0, 0xc0013b4be8})
3102         /usr/lib/golang/src/runtime/panic.go:1038 +0x215
3103 github.com/openshift/cluster-version-operator/pkg/cincinnati.Client.GetUpdates({{0xca, 0x13, 0x92, 0x7c, 0xb6, 0xf0, 0x47, 0x7f, 0x     86, 0xc6, ...}, ...}, ...)
3104         /go/src/github.com/openshift/cluster-version-operator/pkg/cincinnati/cincinnati.go:205 +0x3230



Version-Release number of the following components:
4.10.0-0.nightly-2021-12-03-213835

How reproducible:
Always

Steps to Reproduce:
1.Install a cluster
2.Patch to use my dummy cincinnati graph
# oc patch clusterversion/version --patch '{"spec":{"upstream":"https://raw.githubusercontent.com/shellyyang1989/upgrade-cincy/master/cincy-conditional-edge.json"}}' --type=merge

3.

Actual results:
CVO panic

Expected results:
CVO works fine

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 3 Yang Yang 2021-12-13 03:28:19 UTC
Verified with 4.10.0-0.nightly-2021-12-11-034522

Steps to verify it:
1. Install a cluster
# oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.nightly-2021-12-11-034522   True        False         32m     Cluster version is 4.10.0-0.nightly-2021-12-11-034522

2. Patch to use a dummy cincinnati graph which contains an edge in both edge and conditionalEdge
# oc patch clusterversion/version --patch '{"spec":{"upstream":"https://raw.githubusercontent.com/shellyyang1989/upgrade-cincy/master/cincy-conditional-edge.json"}}' --type=merge
clusterversion.config.openshift.io/version patched

3. Check cvo pod
# oc get pod -n openshift-cluster-version
NAME                                        READY   STATUS    RESTARTS   AGE
cluster-version-operator-6b5d49475f-tcrm5   1/1     Running   0          55m

CVO is not panic any more. Moving it to verified state.

Comment 7 errata-xmlrpc 2022-03-10 16:32:20 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 (Moderate: OpenShift Container Platform 4.10.3 security 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/RHSA-2022:0056