From 8ea495ab819ffbcadb13e866370f3101b59be169 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Thu, 26 Aug 2021 15:20:27 +0530 Subject: [PATCH] rbd: skip volumeattachment processing if pv marked for deletion if the volumeattachment has been fetched but marked for deletion the nbd healer dont want to process further on this pv. This patch adds a check for pv is marked for deletion and if so, make the healer skip processing the same Signed-off-by: Humble Chirammal --- internal/rbd/rbd_healer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/rbd/rbd_healer.go b/internal/rbd/rbd_healer.go index 05cb941a4..9a893764f 100644 --- a/internal/rbd/rbd_healer.go +++ b/internal/rbd/rbd_healer.go @@ -153,9 +153,8 @@ func runVolumeHealer(ns *NodeServer, conf *util.Config) error { continue } - // TODO: check with pv delete annotations, for eg: what happens when the pv is marked for delete - // skip this volumeattachment if its pv is not bound - if pv.Status.Phase != v1.VolumeBound { + // skip this volumeattachment if its pv is not bound or marked for deletion + if pv.Status.Phase != v1.VolumeBound || pv.DeletionTimestamp != nil { continue } // skip if mounter is not rbd-nbd