Bug 2156928

Summary: garbage collection in data import cron fail when garbage collector disable
Product: Container Native Virtualization (CNV) Reporter: dalia <dafrank>
Component: StorageAssignee: Arnon Gilboa <agilboa>
Status: CLOSED ERRATA QA Contact: Yan Du <yadu>
Severity: medium Docs Contact:
Priority: high    
Version: 4.12.0CC: yadu
Target Milestone: ---   
Target Release: 4.12.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v4.12.1-3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-28 20:06:27 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 dalia 2022-12-29 16:09:14 UTC
Description of problem:
When garbage collector disabled (TTL set to -1), the data import cron garbage collection won't work.

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

How reproducible:
100%

Steps to Reproduce:
1. disable garbage collector via hco:
  oc patch cdi cdi-kubevirt-hyperconverged --patch '{"spec": {"config": {"dataVolumeTTLSeconds": -1}}}' --type merge`

2. Create a new data import cron with DataImportCron.Spec.ImportsToKeep set to 1

3. wait for the DV to reach success

4. update the image stream digest

5. wait for a new DV to be created 


Actual results: 
2 DV in success status


Expected results: 
once the new DV reach success the old one should be deleted

Comment 1 Yan Du 2023-02-01 02:15:12 UTC
Verify on CNV v4.12.1-3

DataImportCron.Spec.ImportsToKeep works when garbage collector disabled (TTL set to -1)

Comment 7 errata-xmlrpc 2023-02-28 20:06:27 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 (OpenShift Virtualization 4.12.1 Images), 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/RHEA-2023:1023