From 7bb340c6b9e6592a1a69eac3ed57f9df993414ea 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 }