Bug 2051105

Summary: DataSources, managed by DataImportCron, are not reconciled when edited
Product: Container Native Virtualization (CNV) Reporter: Ruth Netser <rnetser>
Component: StorageAssignee: Arnon Gilboa <agilboa>
Status: CLOSED ERRATA QA Contact: Yan Du <yadu>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.10.0CC: agilboa, alitke, cnv-qe-bugs, mrashish, pelauter, yadu
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: CNV v4.10.0-669 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-02-06 10:43:19 UTC
Description of problem:
When a DataSource, which is managed by CDI, is edited, it is not reconciled.

Version-Release number of selected component (if applicable):
CNV 4.10.0, CDI v4.10.0-84

How reproducible:
100%

Steps to Reproduce:
1. enableCommonBootImageImport should be True
2. Edit a managed DataSource (e.g. centos-stream8):
   Change the referenced PVC name

Actual results:
DataSource is not reconciled and continues to reference the updated name

Expected results:
DataSource should be reconciled

Additional info:
$ oc get das -n openshift-virtualization-os-images centos-stream8 -oyaml 
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataSource
metadata:
  creationTimestamp: "2022-02-02T12:01:02Z"
  generation: 44
  labels:
    app.kubernetes.io/component: storage
    app.kubernetes.io/managed-by: cdi-controller
    app.kubernetes.io/name: data-sources
    app.kubernetes.io/part-of: hyperconverged-cluster
    app.kubernetes.io/version: 4.10.0
    cdi.kubevirt.io/dataImportCron: centos-stream8-image-cron
  name: centos-stream8
  namespace: openshift-virtualization-os-images
  resourceVersion: "8288364"
  uid: c28735bc-50f1-46f4-94c9-94de8e8d5f84
spec:
  source:
    pvc:
      name: dummy
      namespace: openshift-virtualization-os-images
status:
  conditions:
  - lastHeartbeatTime: "2022-02-06T10:03:40Z"
    lastTransitionTime: "2022-02-06T10:03:40Z"
    message: DataVolume not found
    reason: NotFound
    status: "False"
    type: Ready

Comment 1 Adam Litke 2022-02-08 12:29:07 UTC
Peter, asking for blocker+ on this.  It's a simple fix but I'd like to have it to ensure strict reconciliation of managed resources.

Comment 2 Yan Du 2022-02-14 13:11:49 UTC
Test on CNV v4.10.0-671
Issue have been fixed

Comment 5 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