Bug 2180279 - VM cannot be started while creating from a template which has 2nd disk added
Summary: VM cannot be started while creating from a template which has 2nd disk added
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.13.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.13.0
Assignee: Aviv Turgeman
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-21 05:56 UTC by Guohua Ouyang
Modified: 2023-05-18 02:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-18 02:58:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 1181 0 None open Bug 2180279: VM cannot be started while creating from a template which has 2nd disk added 2023-03-22 13:47:29 UTC
Red Hat Issue Tracker CNV-27125 0 None None None 2023-03-21 05:59:23 UTC
Red Hat Product Errata RHSA-2023:3205 0 None None None 2023-05-18 02:58:29 UTC

Description Guohua Ouyang 2023-03-21 05:56:49 UTC
Description of problem:
VM cannot be started while creating from a template which has 2nd disk added.
1. If the storage class is HPP, below annotation is missing in the VM PVC: "cdi.kubevirt.io/storage.bind.immediate.requested: 'true'" 
2. If the storage class is OCS, the error for the VM is: Failed to create DataVolume: the namespace of the provided object does not match the namespace sent on the request

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


How reproducible:


Steps to Reproduce:
1. clone a template from centos7
2. add 2nd disk to the template
3. create vm from the template

Actual results:
VM is not able to be started

Expected results:
VM is started

Additional info:

Comment 1 Guohua Ouyang 2023-03-21 08:02:06 UTC
It's a regression from 4.12.

And this problem only happens while creating VM not from 'openshift' namespace.

Comment 2 Guohua Ouyang 2023-03-21 08:38:21 UTC
Another scenario is:
1. clone a template, create vm from it in 'default' ns is fine
2. clone a template, edit the rootdisk, save it without actually change anything, create vm from it in 'default' ns, vm is not in stopped status because of error: Failed to create DataVolume: the namespace of the provided object does not match the namespace sent on the request

The difference between the two templates are "storageClassName: hostpath-csi-basic"m one template has it and one doesn't.
      dataVolumeTemplates:
        - metadata:
            namespace: openshift
            name: '${NAME}'
          spec:
            storage:
              resources:
                requests:
                  storage: 30Gi
              storageClassName: hostpath-csi-basic
            preallocation: false
            sourceRef:
              kind: DataSource
              name: '${DATA_SOURCE_NAME}'
              namespace: '${DATA_SOURCE_NAMESPACE}'

Comment 3 Guohua Ouyang 2023-03-22 00:34:39 UTC
(In reply to Guohua Ouyang from comment #2)
> Another scenario is:
> 1. clone a template, create vm from it in 'default' ns is fine
> 2. clone a template, edit the rootdisk, save it without actually change
> anything, create vm from it in 'default' ns, vm is not in stopped status
> because of error: Failed to create DataVolume: the namespace of the provided
> object does not match the namespace sent on the request
> 
> The difference between the two templates are "storageClassName:
> hostpath-csi-basic"m one template has it and one doesn't.
>       dataVolumeTemplates:
>         - metadata:
>             namespace: openshift


It looks the 'namespace: openshift' is the problem, edit the disk will add this line to the template which prevent disk clone.

Comment 5 errata-xmlrpc 2023-05-18 02:58:23 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.13.0 Images security, bug fix, and enhancement 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-2023:3205


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