Skip to content

Commit

Permalink
fix(scheduler): skip unschedulable disks
Browse files Browse the repository at this point in the history
longhorn/longhorn-10502

Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang authored and derekbit committed Mar 3, 2025
1 parent 96bd021 commit 839d584
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controller/volume_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 839d584

Please sign in to comment.