@@ -1566,7 +1566,7 @@ func checkResourceAvailableForSpace(jobUuid string, jobType int, resourceConfig
15661566 return false , "" , nil , 0 , nil , err
15671567 }
15681568
1569- nodeGpuSummary , err := k8sService .GetNodeGpuSummary (context .TODO ())
1569+ nodeGpuSummary , nodeNameMachineId , err := k8sService .GetNodeGpuSummary (context .TODO ())
15701570 if err != nil {
15711571 logs .GetLogger ().Errorf ("Failed collect k8s gpu, error: %+v" , err )
15721572 return false , "" , nil , 0 , nil , err
@@ -1577,7 +1577,7 @@ func checkResourceAvailableForSpace(jobUuid string, jobType int, resourceConfig
15771577 needCpu := hardwareDetail .Cpu .Quantity
15781578 needMemory := float64 (hardwareDetail .Memory .Quantity )
15791579 needStorage := float64 (hardwareDetail .Storage .Quantity )
1580- logs .GetLogger ().Infof ("checkResourceForSpace: needCpu: %d, needMemory: %.2f, needStorage: %.2f, needGpu: %s, gpuNum: %d" , needCpu , needMemory , needStorage , gpuName , gpuNum )
1580+ logs .GetLogger ().Infof ("job_uuid: %s, checkResourceForSpace: needCpu: %d, needMemory: %.2f, needStorage: %.2f, needGpu: %s, gpuNum: %d" , jobUuid , needCpu , needMemory , needStorage , gpuName , gpuNum )
15811581
15821582 type gpuData struct {
15831583 Total int
@@ -1603,7 +1603,7 @@ func checkResourceAvailableForSpace(jobUuid string, jobType int, resourceConfig
16031603 }
16041604 }
16051605
1606- logs .GetLogger ().Infof ("checkResourceForSpace: nodeName : %s,remainingCpu: %d, remainingMemory: %.2f, remainingStorage: %.2f, remainingGpu: %+v" , node .Name , remainderCpu , remainderMemory , remainderStorage , freeGpuMap )
1606+ logs .GetLogger ().Infof ("nodeName: %s, machineId&productUuid : %s, remainingCpu: %d, remainingMemory: %.2f, remainingStorage: %.2f, remainingGpu: %+v" , node .Name , nodeNameMachineId [ node . Name ] , remainderCpu , remainderMemory , remainderStorage , freeGpuMap )
16071607
16081608 if remainderCpu < needCpu {
16091609 noAvailableStr = append (noAvailableStr , fmt .Sprintf ("cpu need: %d, remainder: %d" , needCpu , remainderCpu ))
@@ -1672,7 +1672,7 @@ func checkResourceAvailableForImage(jobUuid string, hardwareType string, resourc
16721672 return false , "" , nil , nil , nil , err
16731673 }
16741674
1675- nodeGpuSummary , err := k8sService .GetNodeGpuSummary (context .TODO ())
1675+ nodeGpuSummary , nodeNameMachineId , err := k8sService .GetNodeGpuSummary (context .TODO ())
16761676 if err != nil {
16771677 logs .GetLogger ().Errorf ("Failed collect k8s gpu, error: %+v" , err )
16781678 return false , "" , nil , nil , nil , err
@@ -1714,7 +1714,7 @@ func checkResourceAvailableForImage(jobUuid string, hardwareType string, resourc
17141714 }
17151715 }
17161716
1717- logs .GetLogger ().Infof ("checkResourceForSpace: nodeName : %s,remainingCpu: %d, remainingMemory: %.2f, remainingStorage: %.2f, remainingGpu: %+v" , node .Name , remainderCpu , remainderMemory , remainderStorage , freeGpuMap )
1717+ logs .GetLogger ().Infof ("nodeName: %s, machineId&productUuid : %s, remainingCpu: %d, remainingMemory: %.2f, remainingStorage: %.2f, remainingGpu: %+v" , node .Name , nodeNameMachineId [ node . Name ] , remainderCpu , remainderMemory , remainderStorage , freeGpuMap )
17181718
17191719 if remainderCpu < needCpu {
17201720 noAvailableStr = append (noAvailableStr , fmt .Sprintf ("cpu need: %d, remainder: %d" , needCpu , remainderCpu ))
@@ -1810,7 +1810,7 @@ func checkResourceAvailableForUbi(taskId, taskType int, gpuName string, resource
18101810 return "" , "" , 0 , 0 , 0 , nil , nil , err
18111811 }
18121812
1813- nodeGpuSummary , err := k8sService .GetNodeGpuSummary (context .TODO ())
1813+ nodeGpuSummary , nodeNameMachineId , err := k8sService .GetNodeGpuSummary (context .TODO ())
18141814 if err != nil {
18151815 logs .GetLogger ().Errorf ("Failed collect k8s gpu, error: %+v" , err )
18161816 return "" , "" , 0 , 0 , 0 , nil , nil , err
@@ -1842,7 +1842,7 @@ func checkResourceAvailableForUbi(taskId, taskType int, gpuName string, resource
18421842 remainderStorage := float64 (remainderResource [ResourceStorage ] / 1024 / 1024 / 1024 )
18431843
18441844 logs .GetLogger ().Infof ("checkResourceAvailableForUbi: needCpu: %d, needMemory: %.2f, needStorage: %.2f" , needCpu , needMemory , needStorage )
1845- logs .GetLogger ().Infof ("checkResourceAvailableForUbi: remainingCpu: %d, remainingMemory: %.2f, remainingStorage: %.2f" , remainderCpu , remainderMemory , remainderStorage )
1845+ logs .GetLogger ().Infof ("nodeName: %s, machineId&productUuid: %s, remainingCpu: %d, remainingMemory: %.2f, remainingStorage: %.2f" , node . Name , nodeNameMachineId [ node . Name ] , remainderCpu , remainderMemory , remainderStorage )
18461846
18471847 if remainderCpu < needCpu {
18481848 noAvailableStr = append (noAvailableStr , fmt .Sprintf ("cpu need: %d, remainder: %d" , needCpu , remainderCpu ))
0 commit comments