Bug 2037290

Summary: Dataimportcron keeps re-creating when enable the feature gate
Product: Container Native Virtualization (CNV) Reporter: Yan Du <yadu>
Component: SSPAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED ERRATA QA Contact: Israel Pinto <ipinto>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.10.0CC: agilboa, akrejcir, cnv-qe-bugs, dholler, ksimon, rnetser
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kubevirt-ssp-operator-container-v4.10.0-39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-16 16:06: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:
Bug Depends On:    
Bug Blocks: 2035008, 2036483    

Description Yan Du 2022-01-05 11:42:48 UTC
Description of problem:
Dataimportcron keeps re-creating when enable the feature gate

Version-Release number of selected component (if applicable):
CNV-4.10.0-551
hyperconverged-cluster-operator-container-v4.10.0-105
virt-cdi-operator-container-v4.10.0-70

How reproducible:
Always

Steps to Reproduce:
1. Enable the feature gate in hco
    enableCommonBootImageImport: true
2. Check the dataimportcron
3.

Actual results:
The dic rhel-imagecron and rhel9-image-cron keep re-creating
$ oc get dic
NAME                 AGE
centos8-image-cron   157m
fedora-image-cron    157m
rhel8-image-cron     4s
rhel9-image-cron     3s

$ oc get dataimportcrons.cdi.kubevirt.io rhel9-image-cron -w
NAME               AGE
rhel9-image-cron   2s
rhel9-image-cron   6s
rhel9-image-cron   6s
rhel9-image-cron   0s
rhel9-image-cron   1s
rhel9-image-cron   2s
rhel9-image-cron   4s
rhel9-image-cron   5s
rhel9-image-cron   0s
rhel9-image-cron   1s
rhel9-image-cron   1s
rhel9-image-cron   5s
rhel9-image-cron   5s
rhel9-image-cron   0s
rhel9-image-cron   1s
rhel9-image-cron   1s
rhel9-image-cron   4s
rhel9-image-cron   4s
rhel9-image-cron   0s
rhel9-image-cron   1s
rhel9-image-cron   1s
rhel9-image-cron   2s
rhel9-image-cron   6s
rhel9-image-cron   7s
rhel9-image-cron   0s
rhel9-image-cron   1s
rhel9-image-cron   2s
rhel9-image-cron   2s
rhel9-image-cron   4s
rhel9-image-cron   4s
rhel9-image-cron   0s
rhel9-image-cron   1s
rhel9-image-cron   1s
rhel9-image-cron   3s
rhel9-image-cron   3s
rhel9-image-cron   0s
rhel9-image-cron   1s
rhel9-image-cron   1s
rhel9-image-cron   4s
rhel9-image-cron   4s


Expected results:
Should not be keeping re-creating

Additional info:

Comment 1 Yan Du 2022-01-05 13:29:39 UTC
Arnon, could you figure out what is happening and work with SSP members to fix?

Comment 2 Arnon Gilboa 2022-01-05 14:42:55 UTC
Yan,
Andrej (SSP) took it and will try to reproduce. He'll ask you for more info if needed.

Comment 3 Andrej Krejcir 2022-01-13 11:44:29 UTC
While looking into this bug, I have found that both CDI and SSP set these labels on the DataImportCron:
SSP:
  "app.kubernetes.io/component": "templating",
  "app.kubernetes.io/managed-by": "ssp-operator",

CDI:
  "app.kubernetes.io/component": "storage",
  "app.kubernetes.io/managed-by": "cdi-controller",


Arnon, I assumed these labels are set by the operator that creates and reconciles the resource. Is it not the case?


These changing labels caused the recreation loop, which is a bug, and I will post a fix soon.

Comment 4 Arnon Gilboa 2022-01-13 12:00:35 UTC
Andrej, it seems you are right.
I'll remove DataImportCron CDI labeling.
Also remove DataSources CDI labeling?

Comment 5 Yan Du 2022-01-18 04:08:35 UTC
Test on CNV-v4.10.0-593, kubevirt-ssp-operator-container-v4.10.0-39, issue have been fixed.

$ oc get dic -n openshift-virtualization-os-images
NAME                        AGE
centos-stream8-image-cron   107m
centos-stream9-image-cron   107m
fedora-image-cron           107m
rhel8-image-cron            107m
rhel9-image-cron            107m

Comment 10 errata-xmlrpc 2022-03-16 16:06: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 (Moderate: OpenShift Virtualization 4.10.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:0947