Bug 1022570 - nova: instance is killed and restarted during snapshot
nova: instance is killed and restarted during snapshot
Status: CLOSED NOTABUG
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
4.0
x86_64 Linux
unspecified Severity high
: ---
: 4.0
Assigned To: Xavier Queralt
Ami Jeain
storage
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-23 10:38 EDT by Dafna Ron
Modified: 2013-10-29 13:02 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-29 08:58:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
logs (11.20 MB, application/x-gzip)
2013-10-23 10:38 EDT, Dafna Ron
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1243727 None None None Never

  None (edit)
Description Dafna Ron 2013-10-23 10:38:44 EDT
Created attachment 815441 [details]
logs

Description of problem:

when I create a snapshot type image from a running instance, I can see that libvirt domain is killed and restarted. 
I am not sure this is a correct behaviour. 

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

openstack-nova-compute-2013.2-0.25.rc1.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. configure cinder to work with gluster as backend 
2. boot an instance from an image 
3. create a snapshot from the instance 

Actual results:

libvirt server is killed and restarted during the create snapshot 

Expected results:

I don't think that libvirt server should be killed 

Additional info: logs

[root@cougar07 ~(keystone_admin)]# virsh -r list 
 Id    Name                           State
----------------------------------------------------
 12    instance-00000036              running

[root@cougar07 ~(keystone_admin)]# virsh -r list 
 Id    Name                           State
----------------------------------------------------

[root@cougar07 ~(keystone_admin)]# virsh -r list 
 Id    Name                           State
----------------------------------------------------

[root@cougar07 ~(keystone_admin)]# virsh -r list 
 Id    Name                           State
----------------------------------------------------
 13    instance-00000036              shut off

[root@cougar07 ~(keystone_admin)]# virsh -r list 
 Id    Name                           State
----------------------------------------------------
 13    instance-00000036              running
Comment 1 Xavier Queralt 2013-10-23 12:13:44 EDT
This is a known behaviour of nova compute.

Until openstack-nova-2013.2-4 (which I think will be puddled soon) nova will use the so called "cold snapshots" which require the instance to be stopped. Nova will save the state of the instance and stop this one to bring it back after the snapshot of the disk has been taken. That will also causes bug 1022596, which is understandable as there is no instance to connect to during the snapshot.

The other type of snapshot which RHOS will be using after the mentioned packages are added to the repositories is live snapshots. These require a specific functionality in qemu and libvirt (which has been backported to the version we ship in RHEL 6.5). With live snaps the instance is never stopped and the vnc connection is never lost!
Comment 2 Dave Allan 2013-10-29 12:25:00 EDT
Xavier, I believe I'm reading that as the instance is stopped during the snapshot create, which really has nothing to do with the libvirt 
server which is not stopped.  Is that right?
Comment 3 Xavier Queralt 2013-10-29 12:56:31 EDT
(In reply to Dave Allan from comment #2)
> Xavier, I believe I'm reading that as the instance is stopped during the
> snapshot create, which really has nothing to do with the libvirt 
> server which is not stopped.  Is that right?

Right Dave, only the instance is stopped when doing an snapshot. In libvirt words, the domain is saved and destroyed with managedsave to prevent writes during the snapshot process. That's why it disappears for a moment from the listed domains in virsh.

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