Update block_device_info to contain swap and ephemeral disks
An ephemeral or swap disk is attached to an instance on boot
as follows: nova boot --flavor FLAVOR --image IMAGE_ID
--swap 512 --ephemeral size=2 INSTANCE. When a hard reboot is
performed on the instance, nova fails to recreate the
appropriate libvirt XML definition, containing the ephemeral
disk. This is because the correct block_device_info dict that
is passed to the compute manager's reboot_instance method does
not contain swap or ephemeral disk key values that are necessary
to recreate those disks. In addition to nova boot, the correct
block_device_info dict is also needed by nova rebuild, reboot,
resize, and migrate to recreate those disks. This patch updates
_get_instance_volume_block_device_info (renamed
_get_instance_block_device_info) to return the swap and ephemeral
disk key values, in addition to the block_device_mapping it
already returns today.
Change-Id: Iec329d1c12a48ea90ba9d57decd0996fde6544f0
Closes-Bug: #1305423
(cherry picked from commit f087a6f77ef1338bb8d10943d2a18712220c3c44)
Reviewed: https:/ /review. openstack. org/100362 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b5913892869 ba98fecd4f8d597 eb55defee905e7
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit b5913892869ba98 fecd4f8d597eb55 defee905e7
Author: Thang Pham <email address hidden>
Date: Sun Apr 27 00:28:35 2014 -0400
Update block_device_info to contain swap and ephemeral disks
An ephemeral or swap disk is attached to an instance on boot device_ info dict is also needed by nova rebuild, reboot, instance_ volume_ block_device_ info (renamed instance_ block_device_ info) to return the swap and ephemeral mapping it
as follows: nova boot --flavor FLAVOR --image IMAGE_ID
--swap 512 --ephemeral size=2 INSTANCE. When a hard reboot is
performed on the instance, nova fails to recreate the
appropriate libvirt XML definition, containing the ephemeral
disk. This is because the correct block_device_info dict that
is passed to the compute manager's reboot_instance method does
not contain swap or ephemeral disk key values that are necessary
to recreate those disks. In addition to nova boot, the correct
block_
resize, and migrate to recreate those disks. This patch updates
_get_
_get_
disk key values, in addition to the block_device_
already returns today.
Change-Id: Iec329d1c12a48e a90ba9d57decd09 96fde6544f0 bb8d10943d2a187 12220c3c44)
Closes-Bug: #1305423
(cherry picked from commit f087a6f77ef1338