Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/NVIDIA/KAI-scheduler/pkg/binder/binding/resourcereservation/group_mutex"
"github.com/NVIDIA/KAI-scheduler/pkg/common/constants"
"github.com/NVIDIA/KAI-scheduler/pkg/common/resources"
infralogger "github.com/NVIDIA/KAI-scheduler/pkg/scheduler/log"
)

type Interface interface {
Expand Down Expand Up @@ -123,6 +124,11 @@ func (rsc *service) SyncForGpuGroup(ctx context.Context, gpuGroup string) error
}

func (rsc *service) syncForGpuGroupWithLock(ctx context.Context, gpuGroup string) error {
if gpuGroup == "" {
// Skip empty GPU groups
infralogger.InfraLogger.Warningf("Skipping sync for empty GPU group")
return nil
}
podsList := &v1.PodList{}
err := rsc.kubeClient.List(ctx, podsList,
client.MatchingLabels{constants.GPUGroup: gpuGroup},
Expand Down