Bug 1788109 - VM created from VM Template with identical name fails to boot due to DV name collision
Summary: VM created from VM Template with identical name fails to boot due to DV name ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.4.0
Assignee: Tomas Jelinek
QA Contact: Nelly Credi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-06 13:05 UTC by Radim Hrazdil
Modified: 2020-04-17 11:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-17 11:27:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Radim Hrazdil 2020-01-06 13:05:05 UTC
Description of problem:
When a user creates a VM template with a datavolume and then creates a VM from this template with the same name, the VM's DV fails to be created due to name collision.

The error message is the following:
Error creating DataVolume unique2-rootdisk: admission webhook "datavolume-validate.cdi.kubevirt.io" denied the request: Destination PVC already exists

Version-Release number of selected component (if applicable):
OCP 4.4
not reproducible on 4.3

How reproducible:
100%

Steps to Reproduce:
1. Create a VM Template from URL called 'x'
2. Create a VM using template 'x', name it 'x' as well
3. Start the VM

Actual results:
VM ends up in VM Error state

Expected results:
Should be able to boot

Additional info:

Comment 1 Tomas Jelinek 2020-01-13 12:11:47 UTC
since it is not reproducible on 4.3, targeting 4.4

Comment 2 Yaacov Zamir 2020-02-23 08:29:46 UTC
Can't reproduce on current master :-(

I created a template named "fedora-01" using a container "'kubevirt/fedora-cloud-container-disk-demo:latest'"
the devices part looks like:
```
              disks:
                - name: rootdisk
                  bootOrder: 1
                  disk:
                    bus: virtio
              inputs:
                - bus: virtio
                  name: tablet
                  type: tablet
              interfaces:
                - name: nic0
                  model: virtio
                  masquerade: {}
```

Then I created a VM called "fedora-01" using that template, It runs.

Radim, what am I missing, to I need to do something with the datavolumes ?

Comment 3 Radim Hrazdil 2020-02-24 13:00:24 UTC
Yaacov,

with a container, there is no issue.
The issue was when I selected template from URL source, called the vm template 'x', and then created a VM from this VM template called 'x' as well.

However, I tried to reproduce it on current 4.4 environment and the issue is no longer present. The datavolume of the created VM is now called x-rootdisk-clone, which doesn't clash with the VM Template diks.
Moving to verified.
4.4.0-0.nightly-2020-02-22-102956


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