[openstack-dev] Discuss the option delete_on_termination

Christopher Yeoh cbkyeoh at gmail.com
Thu Jan 9 06:51:08 UTC 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140109/e2a76903/attachment.html>


More information about the OpenStack-dev mailing list