namespace deletion: propagate delete-groups=false but ENOTEMPTY as error
after all we couldn't delete all that got requested, ideally this should become a task where we can log what got deleted and what not... Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -168,7 +168,11 @@ pub fn delete_namespace(
|
||||
let datastore = DataStore::lookup_datastore(&store, Some(Operation::Write))?;
|
||||
|
||||
if !datastore.remove_namespace_recursive(&ns, delete_groups)? {
|
||||
bail!("group only partially deleted due to protected snapshots");
|
||||
if delete_groups {
|
||||
bail!("group only partially deleted due to protected snapshots");
|
||||
} else {
|
||||
bail!("only partially deleted due to existing groups but `delete-groups` not true ");
|
||||
}
|
||||
}
|
||||
|
||||
Ok(Value::Null)
|
||||
|
Reference in New Issue
Block a user