skip control plane nodes, they may not have GPUs

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas
2024-09-24 10:09:25 -04:00
parent 349c7136c9
commit 472ca3b279

View File

@@ -300,6 +300,9 @@ func areGPUsAvailableOnAllSchedulableNodes(ctx context.Context, clientSet client
if node.Spec.Unschedulable { if node.Spec.Unschedulable {
continue continue
} }
if _, ok := node.Labels[framework.ControlPlaneLabel]; ok {
continue
}
framework.Logf("gpuResourceName %s", e2egpu.NVIDIAGPUResourceName) framework.Logf("gpuResourceName %s", e2egpu.NVIDIAGPUResourceName)
if val, ok := node.Status.Capacity[e2egpu.NVIDIAGPUResourceName]; !ok || val.Value() == 0 { if val, ok := node.Status.Capacity[e2egpu.NVIDIAGPUResourceName]; !ok || val.Value() == 0 {
framework.Logf("Nvidia GPUs not available on Node: %q", node.Name) framework.Logf("Nvidia GPUs not available on Node: %q", node.Name)