Bug 1914932

Summary: Put correct resource name in relatedObjects
Product: OpenShift Container Platform Reporter: Alexander Constantinescu <aconstan>
Component: NetworkingAssignee: Alexander Constantinescu <aconstan>
Networking sub component: openshift-sdn QA Contact: Anurag saxena <anusaxen>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: anusaxen, dbrahane, wking, xxia, zzhao
Version: 4.7Keywords: TestBlocker
Target Milestone: ---Flags: dbrahane: needinfo-
dbrahane: needinfo-
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1916601 (view as bug list) Environment:
Last Closed: 2021-02-24 15:51:51 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:
Bug Depends On: 1916586    
Bug Blocks: 1916601    

Description Alexander Constantinescu 2021-01-11 14:08:49 UTC
Description of problem:

The related objects fields parsed by the CNO when reconciling the CRD network.operator.openshift.io is wrong and is causing issues when parsing metrics from this CRD. 

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

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 2 Anurag saxena 2021-01-15 17:33:42 UTC
@dbrahane Could you help verifying it? Thanks. Apparently from the linked PR, we are changing Resource 'network` to `networks`. Can be evident in `oc get cco network -o yaml`. 
Should be present in 4.7.0-0.nightly-2021-01-15-100321 and up. Thanks

Comment 3 Alexander Constantinescu 2021-01-19 09:43:58 UTC
Actually sorry for the bad description. I didn't imagine this bug turning out to be as important as it was. 

Essentially what happened was that during the 4.7 feature cycle we wanted to export the network.operator.openshift.io CRD (which the CNO manages) to must-gather, however the PR that implemented that used the resource name "network" for that CRD, which was wrong. The correct resource name is "networks". The effect of that isn't just that the must-gather is not exported, but due to a variety of reasons, the CRD is also deleted by the CNO's garbage collection when any 4.6 -> 4.7 -> 4.6 upgrade happened. 

It can be verified by either doing a `oc get crd network.operator.openshift.io -o yaml | grep resource` and checking that it's "networks" and comparing that to the code: https://github.com/openshift/cluster-network-operator/pull/945/files 

Alternatively the upgrade + downgrade 4.6 -> 4.7 -> 4.6 should work now.


Comment 4 Anurag saxena 2021-01-19 14:40:32 UTC
Thanks for more info on that Alex.
@dbrahane I guess upgrade + downgrade 4.6 -> 4.7 -> 4.6 would be a good test to verify this. WDYT

Comment 5 Xingxing Xia 2021-01-20 01:19:24 UTC
Bug 1906936 is said as TestBlocker in 1906936#c4 but is closed as DUP of this bug's 4.6 clone bug 1916601. The 4.6 clone bug 1916601 is blocked by this bug, therefore adding TestBlocker to this bug as driving-down purpose.

Comment 6 zhaozhanqi 2021-01-21 06:18:22 UTC
upgrade and downgrade may be blocked by this bug https://bugzilla.redhat.com/show_bug.cgi?id=1916586

Comment 10 errata-xmlrpc 2021-02-24 15:51:51 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.7.0 security, bug fix, and enhancement 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.