the snapshot of a volume-backed instance cannot be used to boot a new instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Unassigned | ||
Havana |
Fix Released
|
High
|
Unassigned |
Bug Description
After the changes in the block device mappings introduced for Havana, if we try to create an snapshot of a volume-backed instance the resulting image cannot be used to boot a new instance due to conflicts with the bootindex between the block_device_
The steps to reproduce are:
$ glance image-create --name f20 --disk-format qcow2 --container-format bare --min-disk 2 --is-public True --min-ram 512 --copy-from http://
$ cinder create --image-id <uuid of the new image> --display-name f20 2
$ nova boot --boot-volume <uuid of the new volume> --flavor m1.tiny test-instance
$ nova image-create test-instance test-snap
This will create an snapshot of the volume and an image in glance with a block_device_
| Property 'block_
When we try latter to use this image to boot a new instance, the API won't let us because both, the device in the image bdm and the image (which is empty) are considered to be the boot device:
$ nova boot --image test-snap --flavor m1.nano test-instance2
ERROR: Block Device Mapping is Invalid: Boot sequence for the instance and image/block device mapping combination is not valid. (HTTP 400) (Request-ID: req-3e502a29-
If we check the internal flow we can see that nova considers the image to be the boot device even thought the image itself doesn't define any local disk but only a block_device_
To be able to generate proper images from volume-backed instances we should:
1. copy only the relevant keys from the original block_device_
2. prevent nova from adding a new block device for the image if this one doesn't define any local disk
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
importance: | Critical → High |
Changed in nova: | |
status: | Fix Committed → Fix Released |
tags: | removed: in-stable-havana |
Changed in nova: | |
milestone: | icehouse-1 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/54633
Review: https:/