glusterfs: Instance is not using the correct volume snapshot file after reboot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Thang Pham | ||
Icehouse |
Fix Released
|
Medium
|
Eric Harney |
Bug Description
Instance is not using the correct volume snapshot file after reboot.
Steps to recreate bug:
1. Create a volume
2. Attach volume to a running instance.
3. Take an online snapshot of the volume.
Note that the active volume used by the instance is now switched to volume-
4. Shutdown the instance.
5. Start the instance.
If you invoke virsh dumpxml <instance>, you will see that it is re-attaching the base volume ( volume-<uuid>) to the instance and not the snapshot volume (volume-
This bug will cause data corruption in the snapshot and volume.
It looks like the nova volume manager is using a stale copy of the block_device_
On power on, the nova manager (nova/compute/
1. start_instance
2. _power_on
3. _get_instance_
The structure for this method is:
def _get_instance_
if not bdms:
bdms = (block_
....
block_device_
Changed in cinder: | |
assignee: | nobody → Thang Pham (thang-pham) |
description: | updated |
Changed in nova: | |
importance: | Undecided → Medium |
tags: | added: drivers |
Changed in cinder: | |
status: | New → In Progress |
no longer affects: | cinder |
tags: | added: libvirt |
tags: | added: icehouse-backport-potential |
Changed in nova: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
tags: | removed: icehouse-backport-potential |
tags: | removed: in-stable-icehouse |
Changed in nova: | |
milestone: | juno-1 → 2014.2 |
This analysis does not sound quite right to me, but I could be missing something. connect_volume() uses data['name'] to determine the filename. This is populated with the info from the Cinder GlusterFS driver's initialize_ connection( ), which sets it correctly.
The responsibility for calculating which filename should be attached to the VM is purely on the Cinder side, Nova doesn't do that calculation.