[nova][glance][cinder] How to do consistent snapshots with quemu-guest-agent
Teckelmann, Ralf, NMU-OIP
ralf.teckelmann at bertelsmann.de
Wed Aug 14 08:41:28 UTC 2019
Hello,
Working me through documentation and articles I am totally lost on the matter.
All I want to know is:
- if issueing "openstack snapshot create ...."
- if klicking "create Snaphost" in Horizon for an instance
will secure a consistent snapshot (of all volumes in question).
With "consistent", I mean that all the data in memory are written to the disc before starting a snapshot.
I hope someone can clear up, if using the setup described in the following is sufficient to achieve this goal or if I have to do something in addition.
If you have any question I am eager to answer as fast as possible.
Setup:
We have a Stein-based OpenStack deployment with cinder backed by ceph.
Instances are created with cinder volumes. Boot volumes are based on an image having the properties:
- hw_qemu_guest_agent='yes'
- os_require_quiesce='yes'
The image is ubuntu 16.04 or 18.04 with quemu-guest-agent package installed and service running (no additional configuration besides distro-default):
qemu-guest-agent.service - LSB: QEMU Guest Agent startup script
Loaded: loaded (/etc/init.d/qemu-guest-agent; bad; vendor preset: enabled)
Active: active (running) since Wed 2019-08-14 07:42:21 UTC; 9min ago
Docs: man:systemd-sysv-generator(8)
CGroup: /system.slice/qemu-guest-agent.service
└─2300 /usr/sbin/qemu-ga --daemonize -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0
Aug 14 07:42:21 ulthwe systemd[1]: Starting LSB: QEMU Guest Agent startup script...
Aug 14 07:42:21 ulthwe systemd[1]: Started LSB: QEMU Guest Agent startup script.
I can see the socket on the compute node and send pings successfully:
~# ls /var/lib/libvirt/qemu/*.sock
/var/lib/libvirt/qemu/org.qemu.guest_agent.0.instance-0000248e.sock
root at pcevh2404:~# virsh qemu-agent-command instance-0000248e '{"execute":"guest-ping"}'
{"return":{}}
I can also send freeze and thaw successfully:
~# virsh qemu-agent-command instance-0000248e '{"execute":"guest-fsfreeze-freeze"}'
{"return":1}
~# virsh qemu-agent-command instance-0000248e '{"execute":"guest-fsfreeze-thaw"}'
{"return":1}
Sending a simple write (echo "bla" > blub.file) in the "frozen" state will be blocked until "thaw" as expected.
Best regards
Ralf T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190814/38fd82d1/attachment-0001.html>
More information about the openstack-discuss
mailing list