+++ This bug was initially created as a clone of Bug #2051693 +++ Description of problem: Deleted DataSource (which has a golden image and was opted-in/out with cdi label) is not reconciled Version-Release number of selected component (if applicable): CNV 4.10.0, SSP v4.10.0-47 How reproducible: 100% Steps to Reproduce: 1. opt out from enableCommonBootImageImport 2. import fedora golden image (named "fedora" under "openshift-virtualization-os-images" namespace) 3. opt in to enableCommonBootImageImport 4. Add "cdi.kubevirt.io/dataImportCron: 'true'" label to fedora DataSource (make sure the DataSource is updated with auto-updated fedora DV) 5. Delete the label 6. Delete fedora DataSource Actual results: The DataSource is not recreated Expected results: DataSource should be reconciled. workaround - opt out -> opt in Additional info: --- Additional comment from Andrej Krejcir on 2022-02-08 09:37:07 UTC --- Currently, when the label is added to DataSource, SSP removes annotations from the DataSource that mark it as owned by SSP. As a result SSP operator will not watch and react to changes on this DS. CDI watches the DS and recreates it, if it is deleted. But when the label is removed, then CDI does not recreate it anymore. I will try to solve this. --- Additional comment from Andrej Krejcir on 2022-02-08 09:55:23 UTC --- I think we cannot solve this without adding a new annotation to DataSource, because without it, there would be race between SSP and CDI: 1. User adds label cdi.kubevirt.io/dataImportCron: 'true' to DataSource 2. SSP creates DataImportCron 3. CDI updated the DataSource 4. User removes the label from DS 5. Now there is a race: - If DIC is modified in any way, it triggers CDI reconciliation and the label is added back to DS - SSP wants to remove the DIC, because DS does not have the label. I will add a new annotation to DataSource, that will specify if auto-update should be enabled for it.
Because bug 2051693 is already fixed, this bug is not required anymore.