Feature #42619
closedrbd namespace deletion should support deleting all RBDs of that namespace
0%
Description
Currently, trying to remove a namespace that contains RBDs simply fails with rbd: namespace contains images which must be deleted first.
, leaving the administrator with the task to manually remove all RBDs in there first.
It would be nice if there was a way to forcibly remove the namespace including all of its RBDs.
Updated by Lenz Grimmer over 4 years ago
- Related to Subtask #24410: [namespaces] management APIs and CLI commands added
Updated by Lenz Grimmer over 4 years ago
- Related to Feature #42620: rbd namespace support should support moving RBDs out of a namespace or into a different one added
Updated by Jason Dillaman over 4 years ago
- Status changed from New to Need More Info
Given all the trouble we have in life regarding "--yes-i-really-really-really-really-mean-it" style optionals, this doesn't seem like a good idea to me. If you took the *nix design choice of simple, composable commands, you could do this via "for x in `rbd ls pool/ns`; do rbd rm $x; done`.
Updated by Lenz Grimmer over 4 years ago
Jason Dillaman wrote:
Given all the trouble we have in life regarding "--yes-i-really-really-really-really-mean-it" style optionals, this doesn't seem like a good idea to me. If you took the *nix design choice of simple, composable commands, you could do this via "for x in `rbd ls pool/ns`; do rbd rm $x; done`.
This may work for the command line, but is a bit more challenging to implement in the dashboard UI. It would be nice to be able to implement a checkbox like "[ ] Delete all RBDs in this namespace"
And if I'd have an extra option on the command line, e.g. rbd namespace remove --removerbds
, it would be a very explicit option that I would have to consciously add to the command.
Updated by Jason Dillaman over 4 years ago
I really don't want to create an API for that -- imagine how long that would potentially block as it O(n^2)s through the pool namespace. The UI should really be using the RBD background task runner to schedule image deletions since you wouldn't want that modal box up for hours as a deletion is occurring.
Updated by Jason Dillaman over 4 years ago
- Status changed from Need More Info to Rejected