yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #15666
[Bug 1304695] Re: glusterfs: Instance is not using the correct volume snapshot file after reboot
** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => juno-1
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1304695
Title:
glusterfs: Instance is not using the correct volume snapshot file
after reboot
Status in OpenStack Compute (Nova):
Fix Released
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-<uuid>.<snapshot-uuid>.
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-<uuid>.<snapshot-uuid>). The expected behavior is to have the snapshot volume re-attach to the instance.
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_mapping. The block_device_mapping needs to be refreshed in order for the updated volume snapshot to be used.
On power on, the nova manager (nova/compute/manager.py ) does:
1. start_instance
2. _power_on
3. _get_instance_volume_block_device_info
The structure for this method is:
def _get_instance_volume_block_device_info(self, context, instance, refresh_conn_info=False, bdms=None):
if not bdms:
bdms = (block_device_obj.BlockDeviceMappingList.
get_by_instance_uuid(context, instance['uuid']))
block_device_mapping = (
driver_block_device.convert_volumes(bdms) +
driver_block_device.convert_snapshots(bdms) +
driver_block_device.convert_images(bdms))
....
block_device_obj.BlockDeviceMappingList.get_by_instance_uuid() goes and queries the database to construct the bdms, which will contain stale data.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1304695/+subscriptions