[ops] [cinder] [nova] How can I understand if "Delete volume on instance delete" was selected ?

melanie witt melwittt at gmail.com
Thu Jun 4 15:40:11 UTC 2020


On 6/4/20 06:51, Massimo Sgaravatto wrote:
> Hi
> 
> I need to delete an instance  created from volume, but I don't want to 
> delete such volume.
> How can I know if the option "Delete volume on instance delete" was 
> selected when creating such instance ?
> I can't find any information in openstack server/volume show outputs

What you want to see is the 'delete_on_termination' field which was 
added in API microversion 2.3 [1] and with OSC, you need to pass the 
needed microversion to the CLI, for example:

openstack --os-compute-api-version 2.3 server show <server>

And as of API microversion 2.85 [2], it's possible to change the value 
of 'delete_on_termination' if desired.

If you're on an older version than has 2.85 and 'delete_on_termination' 
is True, then maybe you could migrate the volume in cinder before 
deleting the instance as a way to preserve the volume?

Hope this helps,
-melanie

[1] 
https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#maximum-in-kilo
[2] 
https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id78



More information about the openstack-discuss mailing list