Bug 2066086

Summary: DataImportCrons do not automatically recover from unconfigured default storage class
Product: Container Native Virtualization (CNV) Reporter: Arnon Gilboa <agilboa>
Component: StorageAssignee: Arnon Gilboa <agilboa>
Status: CLOSED ERRATA QA Contact: Yan Du <yadu>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.10.0CC: alitke, cnv-qe-bugs, yadu
Target Milestone: ---   
Target Release: 4.10.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v4.10.1-6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-18 20:27:26 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 Arnon Gilboa 2022-03-20 15:57:35 UTC
Description of problem:
DataImportCrons do not automatically recover from unconfigured default storage class

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

How reproducible:
Always

Steps to Reproduce:
@alitke installed CNV v4.10.0 on a cluster with OCS where there was no default sc defined.

Actual results:
As expected, auto import process could not complete because PVCs cannot be created without a default storage class.

Even after defining default SC there are still the following messages in the cdi logs and there are no PVCs.

{"level":"error","ts":1647610839.6949024,"logger":"controller.datavolume-controller","msg":"Reconciler error","name":"centos-stream9-8112d4195e45","namespace":"openshift-virtualization-os-images","error":"DataVolume spec is missing accessMode"..}

Expected results:
Resolve the situation automatically and create the PVC when default SC is defined.

Additional info:
This behavior has nothing to do with DataImportCrons, but the regular DV controller flow where DV is not reconciled due to SC update.

In 4.10.0, the way to resolve it manually is to delete the Pending DV/s after setting the default SC. The DIC controller will then immediately re-create the DV using the default SC.

The trivial way to auto-resolve it is by forcing a reconcile in such cases (by RequeueAfter, skipping the repeating event/log after the first one). Another (wiser) option is by watching the SCs for updates.

Comment 1 Adam Litke 2022-03-25 11:59:42 UTC
Retargeting to 4.10.1 as this is a pretty serious usability issue with a relatively simple fix.  We should be able to deliver this.

Comment 2 Yan Du 2022-04-06 12:54:29 UTC
Test on CNV-v4.10.1-50, issue has been fixed.

Comment 8 errata-xmlrpc 2022-05-18 20:27:26 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.1 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:4668