[Openstack] How to soft-delete an instance ?

Sekhar Vajjhala sekharv01 at gmail.com
Thu May 8 14:03:21 UTC 2014


Hi Mauro,

Thanks for the info. It worked but here are a few of the things that  found
in the process. I am using Havana not devstack.

1. It appears there is no way to list instances that are in SOFT_DELETE
state using the nova command.
    a. The command "nova list --deleted" does not work; -The --deleted
option in "nova list --deleted" is not recognized
        error: unrecognized arguments: --deleted
    b. The command "nova list --status SOFT_DELETED" does not show the
instance in the status.

2. Even though the soft deleted instance can't be displayed, it can be
restored using nova command.  However, UUID not name must be used to
restore.

Sekhar



On Tue, May 6, 2014 at 3:56 PM, Mauro S M Rodrigues <
maurosr at linux.vnet.ibm.com> wrote:

>  You will have to set reclaim_instance_interval > 0 on your nova.conf and
> all delete actions will be soft by default (unless you force delete it).
>
> --
> mauro(sr)
>
>
>
>
> On 05/06/2014 03:36 PM, Sekhar Vajjhala wrote:
>
>  The following VM state are documented in
> https://wiki.openstack.org/wiki/VMState .
>
>  SOFT_DELETED: VM is no longer running on compute, but the disk image
> remains and can be brought back.
> HARD_DELETED: From quota and billing’s perspective, the VM no longer
> exists. VM will eventually be destroyed running on compute, disk images too.
>
>  But how do you do soft delete through API or the nova command ?
> 1. nova restore <server> - "Restore a soft-deleted server " . But I don't
> see a nova command to do a soft delete ( only a nova force-delete ).
> 2. From API , POST  /v2/​{tenant_id}​/servers/​{server_id}​/action with
> action = forceDelete will delete the server. Again, no way to soft delete
> the instance.
>
>  --
> Sekhar Vajjhala
>
>
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
>
> --
>   --  mauro(sr)
>
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>


-- 
Sekhar Vajjhala | m : 603-785-8993
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140508/d124c483/attachment.html>


More information about the Openstack mailing list