Bug 2044398

Summary: SSP should not update DataSource managed by DataImportCron
Product: Container Native Virtualization (CNV) Reporter: Ruth Netser <rnetser>
Component: SSPAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED ERRATA QA Contact: Ruth Netser <rnetser>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.10.0CC: cnv-qe-bugs, dholler, gouyang, ycui
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kubevirt-ssp-operator v4.10.0-45 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-16 16:06:49 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 Ruth Netser 2022-01-24 14:17:03 UTC
Description of problem:
We found out that currently SSP reconciles edited/deleted DataSources.
For example: If a DataSource was updated by CDI and then a user manually updates it, SSP currently reconciles the resource, reverting any changes done by CDI.

Our purposed solution is to label a DataSource with its managing DataImportCron if and only if the DataImportCron controller is the one responsible for its updates, so SSP will not update it

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Guohua Ouyang 2022-01-27 01:27:24 UTC
I tested with v4.10.0-617/kubevirt-ssp-operator-container-v4.10.0-41, it seems not the issue is not fixed.
Reproduce steps:
1. the auto-update boot source feature is enabled by default, the template boot source field is "Red Hat" on UI.
2. disable the auto-update boot source feature
3. upload a golden image to RHEL8 template manually, specify test provider "test".
4. enable the feature again
5. the RHEL8 template boot source changed to "Red Hat", it override the manual uploaded golden image.

Comment 3 Ruth Netser 2022-02-15 14:10:59 UTC
Verified with SSP operator v4.10.0-48 (along with bug 2051693)

Tested:
- Feature disabled - DAS is reconciled when deleted/edited
- Feature enabled (auto-update DV) - DAS and DIC are reconciled when deleted/edited
- Feature enabled (dangling DAS) - DAS is reconciled when deleted/edited
- Feature enabled, existing PVC (without dic label) - DAS is reconciled when deleted/edited, DIC is not created
- Feature enabled, existing PVC (without dic label) - delete existing PVC - DIC is created, auto-update DV is imported
- Feature enabled, existing PVC (add dic label) - DIC is created, DAS and DIC are reconciled when deleted/edited
- Feature enabled, existing PVC (add -> delete dic label) - DAS is reconciled when deleted/edited; DIC is deleted

Comment 7 errata-xmlrpc 2022-03-16 16:06:49 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