From ec45a7a053caafa20d76cc47c45e88273be9a6bb Mon Sep 17 00:00:00 2001 From: Maurice Escher Date: Thu, 19 Dec 2024 17:51:12 +0100 Subject: [PATCH] sapcc: purge clones from recovery queue if those are blocking other deletions they have no right to be kept. This is per se only a problem if clone split was not fast enough, which means the volume is short-lived (aka qualifies for force delete) Change-Id: I6fd0ea9e45d7bf6bada6372da9b7dc5295bbf8f4 --- .../netapp/dataontap/client/client_cmode.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/manila/share/drivers/netapp/dataontap/client/client_cmode.py b/manila/share/drivers/netapp/dataontap/client/client_cmode.py index 48896f66d6..20187c2376 100644 --- a/manila/share/drivers/netapp/dataontap/client/client_cmode.py +++ b/manila/share/drivers/netapp/dataontap/client/client_cmode.py @@ -4222,6 +4222,21 @@ def prune_deleted_volumes(self): "volume %s", volume_name) else: for clone in clones: + """TODO: + if clone.type == DEL: + recovery_queue.purge(clone) + + reasoning: we have a soft deleted volume that + is going to be deleted, but it can't because it + non-split child is still in the recovery queue. + Let's remove the child for good (alternative would + be to recover, split, delete the child again) + We don't promise restore for complex parent-child + relationships. And anyhow this is only a problem + if clone split was not fast enough, which means + the volume is short-lived + (aka qualifies for force delete). + """ try: clone_status = client.volume_clone_split_status( clone)