[openstack-dev] Discuss the option delete_on_termination

Christopher Yeoh cbkyeoh at gmail.com
Thu Jan 9 04:12:35 UTC 2014


On Thu, Jan 9, 2014 at 9:25 AM, 黎林果 <lilinguo8212 at gmail.com> wrote:

> Hi All,
>
>    Attach a volume when creating a server, the API contains
> 'block_device_mapping', such as:
> "block_device_mapping": [
>             {
>                 "volume_id": "<VOLUME_ID>",
>                 "device_name": "/dev/vdc",
>                 "delete_on_termination": "true"
>             }
> ]
>
> It allows the option 'delete_on_termination', but in the code it's
> hardcoded to True. Why?
>

I don't think it does hardcode it to true. The API appears to be passing it
down
correctly. I can see one case of delete_on_termination being set to true,
though thats
for ephemeral or swap volumes.


>     Another situation, attach a volume to an exists server, there is
> not the option 'delete_on_termination'.
>
>   Should we add the 'delete_on_termination' when attach a volume to an
> exists server or modify the value from the params?
>
>
I think adding delete_on_termination option when attaching a volume to an
existing server
is reasonable. Perhaps add it to the v3 API?

Regards,

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140109/bbb9dd8b/attachment.html>


More information about the OpenStack-dev mailing list