[openstack-dev] Discuss the option delete_on_termination

黎林果 lilinguo8212 at gmail.com
Thu Jan 9 09:00:03 UTC 2014


Oh, I see. Thank you very much.
It's just hard coded for attaching volume and swapping volume.

How to deal the bp:
https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option
?

2014/1/9 Christopher Yeoh <cbkyeoh at gmail.com>:
> On Thu, Jan 9, 2014 at 2:35 PM, 黎林果 <lilinguo8212 at gmail.com> wrote:
>>
>> Hi Chris,
>> Thanks for you reply.
>>
>> It's not only hard coded for swap volumes. In function
>> '_create_instance' which for creating instance of nova/compute/api.py,
>> the '_prepare_image_mapping' function will be called. And it hard code
>> to True, too.
>>
>> values = block_device.BlockDeviceDict({
>>                 'device_name': bdm['device'],
>>                 'source_type': 'blank',
>>                 'destination_type': 'local',
>>                 'device_type': 'disk',
>>                 'guest_format': guest_format,
>>                 'delete_on_termination': True,
>>                 'boot_index': -1})
>>
>
> Just before that in _prepare_image_mapping is:
>
>             if virtual_name == 'ami' or virtual_name == 'root':
>                 continue
>
>             if not block_device.is_swap_or_ephemeral(virtual_name):
>                 continue
>
>
> Chris
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



More information about the OpenStack-dev mailing list