Bug 1835242

Summary: Can't query SSP CRs after upgrade from 2.3 to 2.4
Product: Container Native Virtualization (CNV) Reporter: Nahshon Unna-Tsameret <nunnatsa>
Component: SSPAssignee: Karel Šimon <ksimon>
Status: CLOSED ERRATA QA Contact: Israel Pinto <ipinto>
Severity: high Docs Contact:
Priority: high    
Version: 2.3.0CC: cnv-qe-bugs, fdeutsch, ncredi, oyahud, rnetser
Target Milestone: ---   
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kubevirt-ssp-operator-container-v2.4.0-64, hco-bundle-registry-container-v2.3.0-435 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-28 19:10:07 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:

Description Nahshon Unna-Tsameret 2020-05-13 13:21:52 UTC
Description of problem:
SSP CRD names were changed from 2.3 to 2.4, but the old CRDs are not removed when deleting the old version. That creates two set of CRDs with different names, and blocks querying the DRs.


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

How reproducible:


Steps to Reproduce:
1. deploy CNV 2.3
2. upgrade to CNV 2.4
3. query SSP CRs, e.g.
```
# oc get kubevirtnodelabellerbundles --all-namespaces
No resources found.
# oc get kubevirtmetricsaggregations --all-namespaces
No resources found.
# oc get kubevirtcommontemplatesbundles --all-namespaces
No resources found.
# oc get kubevirttemplatevalidators --all-namespaces
No resources found.

```

Actual results:
1. No resource found
2. When querying the CRDs, K8s returns two result for each CRD

Expected results:
1. CR is returned
2. When querying an SSP CRD, only one result is returned

Additional info:

Comment 1 Omer Yahud 2020-05-21 07:54:39 UTC
Should be solved along with https://bugzilla.redhat.com/show_bug.cgi?id=1832283.
Once 283 is verified, this should be retested

Comment 3 Ruth Netser 2020-07-08 13:08:33 UTC
Verified:  OCP 4.5.0-rc.6, upgrade from 2.3.0 - > 2.4.0 (SSP v2.4.0-66) ends successfully.

SSP CRs and CRDs exist on the clustser:

$ oc get crd -n openshift-cnv|grep ssp
kubevirtcommontemplatesbundles.ssp.kubevirt.io                   2020-07-08T11:06:33Z
kubevirtmetricsaggregations.ssp.kubevirt.io                      2020-07-08T11:06:34Z
kubevirtnodelabellerbundles.ssp.kubevirt.io                      2020-07-08T11:06:34Z
kubevirttemplatevalidators.ssp.kubevirt.io                       2020-07-08T11:06:34Z

$ oc get kubevirtnodelabellerbundles --all-namespaces
NAMESPACE       NAME                                    AGE
openshift-cnv   node-labeller-kubevirt-hyperconverged   111m

$ oc get kubevirtmetricsaggregations --all-namespaces
NAMESPACE       NAME                                          AGE
openshift-cnv   metrics-aggregation-kubevirt-hyperconverged   111m

$ oc get kubevirtcommontemplatesbundles --all-namespaces
NAMESPACE   NAME                                       AGE
openshift   common-templates-kubevirt-hyperconverged   111m

$ oc get kubevirttemplatevalidators --all-namespaces
NAMESPACE       NAME                                         AGE
openshift-cnv   template-validator-kubevirt-hyperconverged   111m

Comment 6 errata-xmlrpc 2020-07-28 19:10:07 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, 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-2020:3194