Skip to content

Commit

Permalink
little refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Kramarenko <viktor.kramarenko@flant.com>
  • Loading branch information
ViktorKram committed Feb 8, 2024
1 parent c9a4664 commit c3f49b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images/sds-lvm-scheduler-extender/pkg/scheduler/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,14 @@ func filterNodes(

switch pvcReq.DeviceType {
case thick:
fmt.Println("Device Thick ")

lvg := lvgs[matchedLVG.Name]
freeSpace, err := getVGFreeSpace(&lvg)
if err != nil {
errs <- err
return
}

log.Trace(fmt.Sprintf("[filterNodes] ThinPool free space: %d, PVC requested space: %d", freeSpace.Value(), pvcReq.RequestedSize))
if freeSpace.Value() < pvcReq.RequestedSize {
hasEnoughSpace = false
}
Expand All @@ -246,6 +245,7 @@ func filterNodes(
return
}

log.Trace(fmt.Sprintf("[filterNodes] ThinPool free space: %d, PVC requested space: %d", freeSpace.Value(), pvcReq.RequestedSize))
if freeSpace.Value() < pvcReq.RequestedSize {
hasEnoughSpace = false
}
Expand Down

0 comments on commit c3f49b8

Please sign in to comment.