Bug 2149671 - [4.10] Backup program integration: DataVolume/PVC restore should not require PVC initially owned by DV
Summary: [4.10] Backup program integration: DataVolume/PVC restore should not require...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.10.8
Assignee: Michael Henriksen
QA Contact: Yan Du
URL:
Whiteboard:
Depends On: 2149669
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-30 14:53 UTC by Michael Henriksen
Modified: 2023-03-14 16:09 UTC (History)
3 users (show)

Fixed In Version: v4.10.8-8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2149669
Environment:
Last Closed: 2023-03-14 16:09:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 2494 0 None Merged [release-1.43] Queue DataVolumes referred to in "populatedFor" PVC annotations 2023-01-10 13:20:18 UTC
Red Hat Issue Tracker CNV-23030 0 None None None 2022-11-30 15:12:41 UTC
Red Hat Product Errata RHEA-2023:1233 0 None None None 2023-03-14 16:09:34 UTC

Description Michael Henriksen 2022-11-30 14:53:34 UTC
+++ This bug was initially created as a clone of Bug #2149669 +++

Description of problem:

When a DataVolume/PVC is being restored by a backup program (say Velero) the following should be true:

1.  DataVolume has "cdi.kubevirt.io/storage.prePopulated" annotation
2.  PVC has "cdi.kubevirt.io/storage.populatedFor" annotation
3.  Doesn't matter if DV or PVC is restored first
4.  PVC does not have to initially be owned by the DataVolume

This bug deals with 4


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


How reproducible:


Steps to Reproduce:
1.  Create DataVolume

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  annotations:
    cdi.kubevirt.io/storage.prePopulated: populated-dv
  name: populated-dv
  namespace: default
spec:
  pvc:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 2Gi
    storageClassName: rook-ceph-block
    volumeMode: Filesystem
  source:
    http:
      url: http://doesnotexist/disk.img

2. Create PVC

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    cdi.kubevirt.io/storage.populatedFor: populated-dv
  name: populated-dv
  namespace: default
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 2Gi
  storageClassName: rook-ceph-block
  volumeMode: Filesystem


Actual results:

DataVolume will stay pending until DV is reconciled again 


Expected results:

DataVolume will go to succeeded phase


Additional info:

Comment 3 Yan Du 2023-01-12 03:17:52 UTC
Test on OCP-4.10.48 + CNV v4.10.8-8, issue have been fixed.

$ oc get dv
NAME           PHASE       PROGRESS   RESTARTS   AGE
populated-dv   Succeeded   N/A                   24s

Comment 9 errata-xmlrpc 2023-03-14 16:09:32 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.10.8 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:1233


Note You need to log in before you can comment on or make changes to this bug.