Bug 906213

Summary: image creation doesn't lock vms
Product: Red Hat Enterprise Virtualization Manager Reporter: Qixiang Wan <qwan>
Component: vdsmAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: abaron, amureini, bazulay, hateya, iheim, lpeer, ykaul
Target Milestone: ---   
Target Release: 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-03 13:57:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Qixiang Wan 2013-01-31 06:56:05 UTC
Description of problem:
image creation should lock vms, but the vm is in 'Down' status during that period.

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

rhevm-3.1.0-43.el6ev.noarch
vdsm-4.9.6-45.1.el6_3.x86_64

How reproducible:
100%

Found this with NFS storage, not sure whether it happen with other storage types, and don't have more newer version of RHEV env to check this issue on hand.

Steps to Reproduce:
1. Create a vm in rhevm
2. Attach a disk to the vm
  
Actual results:

disk status is "Locked" and vm status is "Down"

Expected results:
VM should be locked while 


Additional info:

Comment 1 Ayal Baron 2013-02-03 13:57:33 UTC
When creating a new image the VM is by design not locked as you can perform other actions. The only thing locked is the disk.

Comment 2 Qixiang Wan 2013-02-04 02:38:52 UTC
(In reply to comment #1)
> When creating a new image the VM is by design not locked as you can perform
> other actions. The only thing locked is the disk.

That doesn't make sense, so user need to check both the VM status and disk status before booting up the vm? And I checked with RHEV 3.0, creating image does lock the vm as "image_locked", but not for RHEV 3.1.

I'm just want to confirm developer is aware of this change, thanks.

Comment 3 Ayal Baron 2013-02-07 08:10:38 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > When creating a new image the VM is by design not locked as you can perform
> > other actions. The only thing locked is the disk.
> 
> That doesn't make sense, so user need to check both the VM status and disk
> status before booting up the vm? And I checked with RHEV 3.0, creating image
> does lock the vm as "image_locked", but not for RHEV 3.1.

You are correct that in 3.0 that was the behaviour.  we changed the semantics to allow running more operations in parallel.
User doesn't have to check anything, engine does it for the user.  You will not be able to run a VM when the disk is locked.

> 
> I'm just want to confirm developer is aware of this change, thanks.