Bug 1840652

Summary: Upgrade indication is missing
Product: Container Native Virtualization (CNV) Reporter: Nahshon Unna-Tsameret <nunnatsa>
Component: SSPAssignee: Omer Yahud <oyahud>
Status: CLOSED ERRATA QA Contact: Israel Pinto <ipinto>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.3.0CC: cnv-qe-bugs, fdeutsch, ncredi, oyahud, rnetser
Target Milestone: ---   
Target Release: 2.4.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: kubevirt-ssp-operator-container-v2.4.0-61, 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:09 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-27 12:03:10 UTC
Description of problem:
SSP operators do not signal the completion of upgrade to HCO.


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


How reproducible:
Read SSP CRs


Actual results:
SSP CRs should include upgrade indication

Expected results:
SSP CRs does not contain any upgrade indication

Additional info:
This bug is applied to the following operators:
* kubevirtnodelabellerbundles
* kubevirtmetricsaggregations
* kubevirtcommontemplatesbundles
* kubevirttemplatevalidators

Implementation Proposal:
1. Add new parameter to the csv-generator --hco-kv-io-version and use it to set a new environment variable HCO_KV_IO_VERSION in all SSP operators.
2. upon successful completion of deployment, set the new "hco.kubevirt.io/version" CR annotation to the value of the HCO_KV_IO_VERSION environment variable.
3. upon successful completion of upgrade, set the new "hco.kubevirt.io/version" CR annotation to the value of the HCO_KV_IO_VERSION environment variable

Comment 3 Omer Yahud 2020-07-07 08:38:41 UTC
This can be verified along with https://bugzilla.redhat.com/show_bug.cgi?id=1853133

Comment 4 Ruth Netser 2020-07-08 13:32:06 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 now have observedVersion, operatorVersion and targetVersion to indicate the state of an upgarde:


$ 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 kubevirtcommontemplatesbundles -n openshift -oyaml|grep Version
apiVersion: v1
- apiVersion: ssp.kubevirt.io/v1
    - apiVersion: ssp.kubevirt.io/v1
    - apiVersion: ssp.kubevirt.io/v1
          f:observedVersion: {}
          f:operatorVersion: {}
          f:targetVersion: {}
    - apiVersion: ssp.kubevirt.io/v1
    resourceVersion: "185251"
    observedVersion: v2.4.0
    operatorVersion: v2.4.0
    targetVersion: v2.4.0
  resourceVersion: ""


$ oc get kubevirtmetricsaggregations -n openshift-cnv  -oyaml|grep Version
apiVersion: v1
- apiVersion: ssp.kubevirt.io/v1
    - apiVersion: ssp.kubevirt.io/v1
    - apiVersion: ssp.kubevirt.io/v1
          f:observedVersion: {}
          f:operatorVersion: {}
          f:targetVersion: {}
    - apiVersion: ssp.kubevirt.io/v1
    - apiVersion: hco.kubevirt.io/v1alpha1
    resourceVersion: "119186"
    observedVersion: v2.4.0
    operatorVersion: v2.4.0
    targetVersion: v2.4.0
  resourceVersion: ""


$ oc get kubevirtnodelabellerbundles -n openshift-cnv  -oyaml|grep Version
apiVersion: v1
- apiVersion: ssp.kubevirt.io/v1
    - apiVersion: ssp.kubevirt.io/v1
    - apiVersion: ssp.kubevirt.io/v1
          f:observedVersion: {}
          f:operatorVersion: {}
          f:targetVersion: {}
    - apiVersion: ssp.kubevirt.io/v1
    - apiVersion: hco.kubevirt.io/v1alpha1
    resourceVersion: "121158"
    observedVersion: v2.4.0
    operatorVersion: v2.4.0
    targetVersion: v2.4.0
  resourceVersion: ""


$ oc get kubevirttemplatevalidators -n openshift-cnv  -oyaml|grep Version
apiVersion: v1
- apiVersion: ssp.kubevirt.io/v1
    - apiVersion: ssp.kubevirt.io/v1
    - apiVersion: ssp.kubevirt.io/v1
          f:observedVersion: {}
          f:operatorVersion: {}
          f:targetVersion: {}
    - apiVersion: ssp.kubevirt.io/v1
    - apiVersion: hco.kubevirt.io/v1alpha1
    resourceVersion: "121250"
    observedVersion: v2.4.0
    operatorVersion: v2.4.0
    targetVersion: v2.4.0
  resourceVersion: ""

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