[openstack-dev] [nova] Can not rebuild boot-from-volume instance

Lee Yarwood lyarwood at redhat.com
Wed Jul 13 10:33:24 UTC 2016


On 12-07-16 15:12:24, zehua wrote:
> Hi, all
> I booted a new instance from a volume and then attached an other volume to it,
> and created image for the instance whos block_device_mapping like this:
> 
> 
> | block_device_mapping | [{"guest_format": null, "boot_index": 0, "delete_on_termination": false,        
> |                   | "no_device": null, "snapshot_id": "61c18329-420d-4765-ab5a-c626d9b1ebcd",
> |                   | "device_name": "/dev/vda", "disk_bus": "virtio", "image_id": null,             
> |                   | "source_type": "snapshot", "device_type": "disk", "volume_id": null,            
> |                   | "destination_type": "volume", "volume_size": 20}, {"guest_format": null,        
> |                   | "boot_index": null, "delete_on_termination": false, "no_device": null,           
> |                   | "snapshot_id": "438cd325-3fcd-4769-a3e9-c0a9aeaa2437", "device_name":    
> |                   | "/dev/vdb", "disk_bus": null, "image_id": null, "source_type": "snapshot",        
> |                   | "device_type": null, "volume_id": null, "destination_type": "volume",            
> |                   | "volume_size": 10}]
>                                                     
> There’s no problem when use the snapshot image to boot a new instance, that mergs
> block_device_mapping in image and one provied manually.
> But rebuilding instance from the image ignores the block_device_mapping attribute. Should we
> replace all origin volumes by new volumes provided byimage block_device_mapping attribute
> according to device name?

I *think* the following change is attempting to do this, however I'm
still not sure that this is the correct behaviour during a rebuild :

Replace root volume during rebuild
https://review.openstack.org/#/c/305079/

Lee
-- 
Lee Yarwood
Senior Software Engineer
Red Hat

PGP : A5D1 9385 88CB 7E5F BE64  6618 BCA6 6E33 F672 2D76



More information about the OpenStack-dev mailing list