From f2bd410c475b382f16fd47384a0e7051ca937969 Mon Sep 17 00:00:00 2001 From: David Vallee Delisle Date: Tue, 16 Oct 2018 04:09:49 -0400 Subject: [PATCH] cinder-manage object delete --db-only Adds the option to delete objects only from DB. Objects: - volumes - backups Change-Id: I7c8bc1ec1d4c1e74c1197930fe5e5667e26bfbd5 Blueprint: cinder-delete-from-db --- specs/stein/delete-from-db.rst | 132 +++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 specs/stein/delete-from-db.rst diff --git a/specs/stein/delete-from-db.rst b/specs/stein/delete-from-db.rst new file mode 100644 index 00000000..5a5d8c66 --- /dev/null +++ b/specs/stein/delete-from-db.rst @@ -0,0 +1,132 @@ +.. + This work is licensed under a Creative Commons Attribution 3.0 Unported + License. + + http://creativecommons.org/licenses/by/3.0/legalcode + +================================================== +Object deletion from DB without driver interaction +================================================== + +https://blueprints.launchpad.net/cinder/+spec/cinder-delete-from-db + + +Problem description +=================== + +It's impossible to delete a volume, a backup or a snapshot when the service is +not available. There's no way to bypass driver interaction. + +Use Cases +========= + +Sometimes, OpenStack admins are pulling the plugs off some storage backends to +use a new one. They realize later that they need to cleanup the various +objects. + + +Proposed change +=============== + +With cinder-manage, we will have a --db-only switch under the volume delete +command. The snapshots are deleted in cascade. We will also implement backup +subcommand that acts like the volume subcommand. + +Alternatives +------------ + +The only known workaround is to manually update multiple tables and set the +status to 'deleted' to various objects. + +Data model impact +----------------- + +None + +REST API impact +--------------- + +None + +Security impact +--------------- + +None + +Active/Active HA impact +----------------------- + +None + +Notifications impact +-------------------- + +None + +Other end user impact +--------------------- + +These commands will be available to operators: + +.. code-block:: console + + cinder-manage volume delete [--db-only] + cinder-manage backup delete [--db-only] + +Performance Impact +------------------ + +None + +Other deployer impact +--------------------- + +None + +Developer impact +---------------- + +None + +Implementation +============== + +Assignee(s) +----------- + +Primary assignee: David Vallee Delisle + +Work Items +---------- + +The following changes will be done under cinder-manage command: +* Add a --db-only switch to the volume delete command. +* Add a backup delete subcommand with --db-only support. +* The snapshots are deleted in cascade when a volume is deleted. + +The following changes will be done in the rpcapis: +* Add a db_only argument in the delete function + +The following changes will be done in the manages: +* Add a db_only argument in the delete function + +Dependencies +============ + +None + +Testing +======= + +Create tests to validate the delete volume and the delete backup are really +deleting. + +Documentation Impact +==================== + +Man page for cinder-manage and any associated documentation will be updated. + +References +========== + +None