Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1364137

Summary: make VM template should be blocked while importing this VM.
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Sharon Gratch <sgratch>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.2.2CC: bugs, michal.skrivanek, nsimsolo, tjelinek
Target Milestone: ovirt-4.1.1Flags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+
Target Release: 4.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:43:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Video capture of this issue
none
vdsm.log.gz
none
engine.log.gz none

Description Nisim Simsolo 2016-08-04 14:19:13 UTC
Description of problem:
When importing VM from an external provider, during "locked" VM, before copying disks phase, it is possible to make a template from that VM.
This option should be blocked when VM is locked (when import is in copying disks phase, this option changed to grayed out).
VM created from disk template will run with a corrupted disk image.

Version-Release number of selected component (if applicable):
ovirt-engine-4.0.2.2-0.1.el7ev
vdsm-4.18.9-1.el7ev.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.20.x86_64
libvirt-client-1.2.17-13.el7_2.5.x86_64
sanlck-3.2.4-3.el7_2.x86_64

How reproducible:
Consistently

Steps to Reproduce:
1. import VM from an external provider.
2. Wait for padlock icon to appear on VM and make a template from this VM.
3.

Actual results:
Template is being created.
VM created from this template failed to load because of missing boot parameters.

Expected results:
Make template option should be blocked during the import process.

Additional info:
Video capture of this issue attached.
engine and vdsm logs attached.

Comment 1 Nisim Simsolo 2016-08-04 14:20:38 UTC
Created attachment 1187525 [details]
Video capture of this issue

Comment 2 Nisim Simsolo 2016-08-04 14:25:46 UTC
Created attachment 1187529 [details]
vdsm.log.gz

Comment 3 Nisim Simsolo 2016-08-04 14:26:35 UTC
Created attachment 1187537 [details]
engine.log.gz

Comment 4 Tomas Jelinek 2016-08-05 05:58:33 UTC
Should be enough to add a validate() and updateActionAvailability() for VMs which are locked. Fix should be trivial, targeting to 4.1 and if it will all go well we may backport.

Comment 5 Nisim Simsolo 2017-02-12 15:05:56 UTC
Verification builds:
ovirt-engine-4.1.1-0.1.el7
libvirt-client-2.0.0-10.el7_3.4.x86_64
vdsm-4.19.4-1.el7ev.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64
sanlock-3.4.0-1.el7.x86_64
virt-v2v-1.32.7-3.el7_3.2.x86_64