snapshot doesn't flush dirty data

Bug #1934241 reported by jichenjc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

libvirt driver

Login a deployed VM and write some files, for example:
```
[lynn@host-172-26-105-43 ~]$ ls -lrt
...
-rw-rw-r--. 1 lynn lynn 677 Jun 29 06:30 sum
-rw-rw-r--. 1 lynn lynn 38 Jun 29 06:30 sum3.md5
[lynn@host-172-26-105-38 ~]$
```

then *right* after the file created, trigger the snapshot action of the VM
after that, deploy a new VM through the created image

found some files missing (e.g sum3.md5 file)
```
[lynn@host-172-26-105-43 ~]$ ls -lrt
...
-rw-rw-r--. 1 lynn lynn 648 Jun 29 06:30 sum
[lynn@host-172-26-105-43 ~]$
```

I checked the code and seems no flush operation in live or cold snapshot (cold seems suspend the VM only)
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L2952

is it by design or best practice ?

Revision history for this message
QingFeng Hao (johnnyhao) wrote :

I encountered this problem too for both live and cold snapshot.
But if I shutdown the VM with 'virsh shutdown' or stop in the UI, the data can by synced to disk.
So I don't know why openstack doesn't use this in cold snapshot.

Revision history for this message
Lee Yarwood (lyarwood) wrote :

You need to use the QEMU guest agent within the guestOS to quiesce the disks fully during a snapshot:

https://docs.openstack.org/nova/latest/admin/configuration/hypervisor-kvm.html#guest-agent-support

Changed in nova:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.