This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 877978 - engine: we are able to create live snapshot and suspend vm
engine: we are able to create live snapshot and suspend vm
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
high Severity high
: ---
: 3.2.0
Assigned To: Maor
Dafna Ron
storage
: ZStream
Depends On:
Blocks: 902484 915537
  Show dependency treegraph
 
Reported: 2012-11-19 06:07 EST by Dafna Ron
Modified: 2016-02-10 11:47 EST (History)
11 users (show)

See Also:
Fixed In Version: sf5
Doc Type: Bug Fix
Doc Text:
Cause: Race between live snapshot and VM hibernate, cause results which might be undefined. Fix: The proposed fix is adding hibernateVM lock on the VM to avoid this behaviour.
Story Points: ---
Clone Of:
: 902484 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
logs (1.46 MB, application/x-gzip)
2012-11-19 06:07 EST, Dafna Ron
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 11232 None None None Never
oVirt gerrit 11267 None None None Never

  None (edit)
Description Dafna Ron 2012-11-19 06:07:37 EST
Created attachment 647695 [details]
logs

Description of problem:

engine does not lock the vm right away which allowed me to create a live snapshot and move the vm to hibernate at the same time. 
once that happens it appears that both actions succeeded but if we try to create a second snapshot we get the following error in vdsm: 

Thread-299::ERROR::2012-11-19 12:49:18,041::libvirtvm::1812::vm.Vm::(snapshot) vmId=`10796f9e-6b75-43fa-984a-bcdd4f6d562f`::The base volume doesn't exist: {'device': 'disk', 'domainID': '59022168-9350-41d1-9e6f-5ef87b6bcd42', 'volumeID': '9ddcecc2-5560-442a-9ac9-eb2be49e7112', 'imageID': 'c2a9831d-cb22-45a5-bffa-622d43d27d53'}

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

si24.2
vdsm-cli-4.9.6-43.0.el6_3.noarch

How reproducible:

100%

Steps to Reproduce:
1. create and run a vm
2. create live snapshot -> hibernate the vm
3. run the vm -> try to create a second snpahsot
  
Actual results:

both actions appear to succeed. but if we try to create a second snapshot we get error from vdsm 

Expected results:

we should fail to hibernate the vm once we started a snapshot

Additional info:logs


this is the vm: 

[root@gold-vdsd ~]# vdsClient -s 0 list table
10796f9e-6b75-43fa-984a-bcdd4f6d562f   4297  RHEL_Clone           Up    

please note that it was running on hsm and the error is on the hsm log and not the spm log
Comment 4 Maor 2013-01-21 12:13:46 EST
The proposed fix was to add locks when hibernate a VM and when creating a snapshot.

There is another issue which I encountered, that when the VM was already at hibernate state I tried to create a snapshot, and when the VM was Up again after hibernation the VM disks were still running upon the original volume and not the new created one.

I suspect that the VDSM exception origin was from that issue,
although I tried to reproduce it, but all worked fine for me (accept the bug I encountered).

I think that this bug should be split to two,
one for the race between create snapshot and hibernate
and the other on run VM after a snapshot was created while it was suspended.
What do you think?
Comment 5 Ayal Baron 2013-01-21 13:30:26 EST
(In reply to comment #4)
> The proposed fix was to add locks when hibernate a VM and when creating a
> snapshot.
> 
> There is another issue which I encountered, that when the VM was already at
> hibernate state I tried to create a snapshot, and when the VM was Up again
> after hibernation the VM disks were still running upon the original volume
> and not the new created one.
> 
> I suspect that the VDSM exception origin was from that issue,
> although I tried to reproduce it, but all worked fine for me (accept the bug
> I encountered).
> 
> I think that this bug should be split to two,
> one for the race between create snapshot and hibernate

Ack.

> and the other on run VM after a snapshot was created while it was suspended.
> What do you think?

Is this reproducible? if so then please file a bug.
Comment 9 Dafna Ron 2013-02-05 08:41:56 EST
verified that lock exists on sf5
Comment 11 Itamar Heim 2013-06-11 04:48:48 EDT
3.2 has been released
Comment 12 Itamar Heim 2013-06-11 04:48:48 EDT
3.2 has been released
Comment 13 Itamar Heim 2013-06-11 04:49:11 EDT
3.2 has been released
Comment 14 Itamar Heim 2013-06-11 04:53:46 EDT
3.2 has been released
Comment 15 Itamar Heim 2013-06-11 05:24:24 EDT
3.2 has been released

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