Bug 1022570 - nova: instance is killed and restarted during snapshot
Summary: nova: instance is killed and restarted during snapshot
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 4.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 4.0
Assignee: Xavier Queralt
QA Contact: Ami Jeain
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-23 14:38 UTC by Dafna Ron
Modified: 2019-09-09 15:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-29 12:58:54 UTC
Target Upstream Version:


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


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1243727 0 None None None Never

Description Dafna Ron 2013-10-23 14:38:44 UTC
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 16:13:44 UTC
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 16:25:00 UTC
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 16:56:31 UTC
(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.