From 839d5842d34a3797fd5060785688bc7fc732a30f Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Mon, 3 Mar 2025 12:07:25 +0800 Subject: [PATCH] fix(scheduler): skip unschedulable disks longhorn/longhorn-10502 Signed-off-by: Chin-Ya Huang --- controller/volume_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/volume_controller.go b/controller/volume_controller.go index 901d13e854..d0853f6e11 100644 --- a/controller/volume_controller.go +++ b/controller/volume_controller.go @@ -2618,6 +2618,10 @@ func (c *VolumeController) checkReplicaDiskPressuredSchedulableCandidates(volume continue } + if types.GetCondition(diskStatus.Conditions, longhorn.DiskConditionTypeSchedulable).Status != longhorn.ConditionStatusTrue { + continue + } + diskInfo, err := c.scheduler.GetDiskSchedulingInfo(diskSpec, diskStatus) if err != nil { log.WithError(err).Debugf("Failed to get disk scheduling info for disk %v on node %v", diskName, nodeCandidate.Name)