Is it possible to lock/preserve an instance from accidental deletion?
- Platform9 Managed OpenStack - All Versions
Yes, there is a way to prevent accidental deletion on instances performed by non-admin users by using the following command.
$ openstack server lock <server> [<server> ...]
However, administrators can still perform several actions mentioned in OpenStack documentation, on the server even though the server is locked.
Note: By default, only owner or administrator can lock the sever, and administrator can overwrite owner's lock along with the locked_reason if it is specified.
Unlock will unlock a server in locked state so additional operations can be performed on the server by non-admin users. By default, only owner or administrator can unlock the server.
A soft delete functionality is work in progress in the pipeline and is currently targeted for a 4.6 release; which may allow one to retain the actual data despite accidental delete requests.