Fixes snapshotting of instances booted from volume
When an instance was booted from a volume, the block device mapping
entry has volume_id set. If it was booted from a snapshot it has
volume_id and snapshot_id set. When we snapshot the instance, it
should be snapshotting the volume in both cases.
This patch fixes the faulty logic that was causing snapshotting to
only happen in the case the instance was booted from a snapshot.
It also includes a (formerly failing) test to verify that the volume
commands are actually called and the new snapshot is set properly.
Reviewed: https:/ /review. openstack. org/13541 github. com/openstack/ nova/commit/ 9562ee3ce71301f a0e4de0c167d6cc 1cf83ed9a6
Committed: http://
Submitter: Jenkins
Branch: master
commit 9562ee3ce71301f a0e4de0c167d6cc 1cf83ed9a6
Author: Vishvananda Ishaya <email address hidden>
Date: Sun Sep 23 16:17:35 2012 +0000
Fixes snapshotting of instances booted from volume
When an instance was booted from a volume, the block device mapping
entry has volume_id set. If it was booted from a snapshot it has
volume_id and snapshot_id set. When we snapshot the instance, it
should be snapshotting the volume in both cases.
This patch fixes the faulty logic that was causing snapshotting to
only happen in the case the instance was booted from a snapshot.
It also includes a (formerly failing) test to verify that the volume
commands are actually called and the new snapshot is set properly.
Fixes bug 1055076
Change-Id: Icdd2ab7f3e2d43 a0564aea132fe70 7a592fe4e75