Bug 1914947 - HPP golden images - DV shoudld not be created with WaitForFirstConsumer
Summary: HPP golden images - DV shoudld not be created with WaitForFirstConsumer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 2.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 2.6.0
Assignee: Bartosz Rybacki
QA Contact: dalia
URL:
Whiteboard:
: 1916829 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-11 14:47 UTC by Ruth Netser
Modified: 2021-03-10 11:23 UTC (History)
7 users (show)

Fixed In Version: virt-cdi-operator v2.6.0-19
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1915694 (view as bug list)
Environment:
Last Closed: 2021-03-10 11:22:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 1560 0 None closed Add a DV/PVC annotation "storage.bind.immediate.requested" 2021-02-19 00:14:04 UTC
Red Hat Product Errata RHSA-2021:0799 0 None None None 2021-03-10 11:23:17 UTC

Description Ruth Netser 2021-01-11 14:47:12 UTC
Description of problem:
When creating an HPP golden image, the DV is pending (WaitForFirstConsumer).
This flow is Ok for DVs to be directly consumed by VMs.
However, in this case there is no VM associated with this DV it will not be populated. 

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

How reproducible:
100%

Steps to Reproduce:
1. Create golden image PVC


Actual results:
DV is pending (WaitForFirstConsumer)

Expected results:
DV and PVC should be created and import should succeed.

Additional info:

Comment 2 Peter Lauterbach 2021-01-12 14:52:39 UTC
Unlocks the critical autoclone flow for local storage.

Comment 3 Adam Litke 2021-01-12 14:54:59 UTC
Tomas, We would like to add support for an annotation to DVs which would allow them to populate immediately.  Would you be able to get a fix into the UI where you add this annotation to certain DVs that you create?

Comment 4 Tomas Jelinek 2021-01-12 15:24:26 UTC
well, the code freeze is this friday. After that only to the 4.7.1. When do you expect the annotation be ready on backend?

Comment 5 Adam Litke 2021-01-12 16:37:11 UTC
Bartosz has settled on the annotation name in the PR that is linked to this bug.  It is "cdi.kubevirt.io/storage.bind.immediate.requested".  If you apply this annotation to any DVs that are created that are not going to be associated with a VM then this should resolve the issue.  It is safe for you to commit this change now because unrecognized annotations are simply ignored.  Please do not use this annotation for DVs which are to be attached to a VM right away as that would bypass the WFFC logic which we do want to have in those cases.  

Thomas, does this make sense?  Should we open a blocker 2.6.0 bug on the UI to state the requirements?

Comment 6 Tomas Jelinek 2021-01-13 09:02:34 UTC
OK, makes sense, will clone this BZ to the UI and add the annotation

Comment 7 Adam Litke 2021-01-15 19:01:00 UTC
*** Bug 1916829 has been marked as a duplicate of this bug. ***

Comment 9 dalia 2021-01-24 13:29:09 UTC
verified on CNV 2.6, Containerized Data Importer v2.6.0

*******************************************

$ oc create -f golden_dv.yaml

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: golden-dv
  namespace: openshift-virtualization-os-images
  annotations:
          cdi.kubevirt.io/storage.bind.immediate.requested: "true"
spec:
  source:
    http:
      url:  https://github.com/cirros-dev/cirros/releases/download/0.5.1/cirros-0.5.1-x86_64-lxc.tar.xz
  pvc:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 12Gi
    storageClassName: hostpath-provisioner
    volumeMode: Filesystem
  contentType: kubevirt


$ oc get dv -n openshift-virtualization-os-images
NAME             PHASE       PROGRESS   RESTARTS   AGE
golden-dv   Succeeded   100.0%                9m16s

Comment 12 errata-xmlrpc 2021-03-10 11:22:46 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 2.6.0 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-2021:0799


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