Bug 2091309 - While disabling a golden image via HCO, user should not be required to enter the whole spec.
Summary: While disabling a golden image via HCO, user should not be required to enter ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Installation
Version: 4.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.11.0
Assignee: Nahshon Unna-Tsameret
QA Contact: Debarati Basu-Nag
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-28 18:54 UTC by Debarati Basu-Nag
Modified: 2023-11-13 08:16 UTC (History)
3 users (show)

Fixed In Version: CNV v4.11.0-446
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-14 19:35:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt hyperconverged-cluster-operator pull 1987 0 None Merged Fix BZ 2091309 and 2088849: don't force the user to copy DIC to disable it 2022-06-07 12:49:30 UTC
Github kubevirt hyperconverged-cluster-operator pull 1990 0 None Merged [release-1.7] Fix BZ 2091309 and 2088849: don't force the user to copy DIC to disable it 2022-06-07 12:49:12 UTC
Red Hat Issue Tracker CNV-18678 0 None None None 2023-11-13 08:16:24 UTC
Red Hat Product Errata RHSA-2022:6526 0 None None None 2022-09-14 19:35:14 UTC

Comment 1 Nahshon Unna-Tsameret 2022-06-01 10:31:43 UTC
We'll have to fix examples in the documentation to be more clear.

But it does says:
"Copy the required dtaImportCronTemplate object from the list in the status field (not including the status field), and change or add the desired fields."

Comment 2 Debarati Basu-Nag 2022-06-10 20:28:37 UTC
Verified against CNV-v4.11.0-459:
Added the following entry to hco.spec.dataImportCronTemplates:
  - metadata:
      annotations:
        cdi.kubevirt.io/storage.bind.immediate.requested: "true"
        dataimportcrontemplate.kubevirt.io/enable: "false"
      name: rhel9-image-cron
  featureGates:

(cnv-tests) [cnv-qe-jenkins@iuo-dbn-411-56xcn-executor cnv-tests]$ kubectl get hco kubevirt-hyperconverged -n openshift-cnv -o json | jq '.status.dataImportCronTemplates[] | .metadata["name"]'
"centos-7-image-cron"
"centos-stream8-image-cron"
"centos-stream9-image-cron"
"fedora-image-cron"
"rhel8-image-cron"
(cnv-tests) [cnv-qe-jenkins@iuo-dbn-411-56xcn-executor cnv-tests]$ 

(cnv-tests) [cnv-qe-jenkins@iuo-dbn-411-56xcn-executor cnv-tests]$ kubectl get ssp ssp-kubevirt-hyperconverged -n openshift-cnv -o json | jq '.spec.commonTemplates.dataImportCronTemplates[] | .metadata["name"]'
"centos-7-image-cron"
"centos-stream8-image-cron"
"centos-stream9-image-cron"
"fedora-image-cron"
"rhel8-image-cron"
(cnv-tests) [cnv-qe-jenkins@iuo-dbn-411-56xcn-executor cnv-tests]$

Comment 3 Debarati Basu-Nag 2022-06-10 21:00:01 UTC
Verified against CNV-v4.11.0-459:

No ability to enter non "true/false" values for annotation: dataimportcrontemplate.kubevirt.io/enable
(cnv-tests) [cnv-qe-jenkins@iuo-dbn-411-56xcn-executor cnv-tests]$ kubectl edit hco kubevirt-hyperconverged -n openshift-cnv
error: hyperconvergeds.hco.kubevirt.io "kubevirt-hyperconverged" could not be patched: admission webhook "validate-hco.kubevirt.io" denied the request: dataImportCronTemplate spec is empty for an enabled DataImportCronTemplate
You can run `kubectl replace -f /tmp/kubectl-edit-3863868585.yaml` to try this update again.
(cnv-tests) [cnv-qe-jenkins@iuo-dbn-411-56xcn-executor cnv-tests]$ kubectl edit hco kubevirt-hyperconverged -n openshift-cnv
error: hyperconvergeds.hco.kubevirt.io "kubevirt-hyperconverged" could not be patched: admission webhook "validate-hco.kubevirt.io" denied the request: the dataimportcrontemplate.kubevirt.io/enable annotation of a dataImportCronTemplate must be either "true" or "false"
You can run `kubectl replace -f /tmp/kubectl-edit-67402019.yaml` to try this update again.
(cnv-tests) [cnv-qe-jenkins@iuo-dbn-411-56xcn-executor cnv-tests]$

Comment 6 errata-xmlrpc 2022-09-14 19:35:03 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 (Important: OpenShift Virtualization 4.11.0 Images security and bug fix 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:6526


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