From 1d86a0a7e79bd708a1e4a44d7a330a139b8ca12a Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Thu, 14 Nov 2024 15:27:09 +0800 Subject: [PATCH] fix(volume-eviction-controller): skip handling detached volume longhorn/longhorn-9781 Signed-off-by: Chin-Ya Huang (cherry picked from commit 19c1f064ccafabe3009a5cc6e5b3a0af53749ff2) --- controller/volume_eviction_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/volume_eviction_controller.go b/controller/volume_eviction_controller.go index da013ea46c..fead914442 100644 --- a/controller/volume_eviction_controller.go +++ b/controller/volume_eviction_controller.go @@ -167,6 +167,10 @@ func (vec *VolumeEvictionController) reconcile(volName string) (err error) { return nil } + if vol.Spec.NodeID == "" { + return nil + } + if !vec.isResponsibleFor(vol) { return nil }