Bug 2029785 - CVO panic when an edge is included in both edges and conditionaledges
Summary: CVO panic when an edge is included in both edges and conditionaledges
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: W. Trevor King
QA Contact: Yang Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-07 10:07 UTC by Yang Yang
Modified: 2022-03-10 16:32 UTC (History)
3 users (show)

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


Attachments (Terms of Use)
CVO log file (334.27 KB, text/plain)
2021-12-07 10:07 UTC, Yang Yang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-version-operator pull 707 0 None open Bug 2029785: pkg/cincinnati: Fix panic for conditional edges overlapping with unconditional edges 2021-12-07 18:57:06 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:32:41 UTC

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


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