@@ -32,7 +32,6 @@ import (
32
32
33
33
"github.com/eapache/go-resiliency/retrier"
34
34
"github.com/hashicorp/go-multierror"
35
- dto "github.com/prometheus/client_model/go"
36
35
37
36
arbv1 "github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/controller/v1beta1"
38
37
clientset "github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/client/clientset/versioned"
@@ -706,7 +705,7 @@ func (qjm *XController) getProposedPreemptions(requestingJob *arbv1.AppWrapper,
706
705
func (qjm * XController ) getDispatchedAppWrappers (restConfig * rest.Config ) (map [string ]* clusterstateapi.Resource , map [string ]* arbv1.AppWrapper ) {
707
706
awrRetVal := make (map [string ]* clusterstateapi.Resource )
708
707
awsRetVal := make (map [string ]* arbv1.AppWrapper )
709
- // Setup and break down an informer to get a list of appwrappers bofore controllerinitialization completes
708
+ // Setup and break down an informer to get a list of appwrappers before controllerinitialization completes
710
709
appWrapperClient , err := clientset .NewForConfig (restConfig )
711
710
if err != nil {
712
711
klog .Errorf ("[getDispatchedAppWrappers] Failure creating client for initialization informer err=%#v" , err )
@@ -922,52 +921,6 @@ func (qjm *XController) chooseAgent(ctx context.Context, qj *arbv1.AppWrapper) s
922
921
return ""
923
922
}
924
923
925
- func (qjm * XController ) nodeChecks (histograms map [string ]* dto.Metric , aw * arbv1.AppWrapper ) bool {
926
- ok := true
927
- allPods := qjm .GetAggregatedResourcesPerGenericItem (aw )
928
-
929
- // Check only GPUs at this time
930
- var podsToCheck []* clusterstateapi.Resource
931
-
932
- for _ , pod := range allPods {
933
- if pod .GPU > 0 {
934
- podsToCheck = append (podsToCheck , pod )
935
- }
936
- }
937
-
938
- gpuHistogram := histograms ["gpu" ]
939
-
940
- if gpuHistogram != nil {
941
- buckets := gpuHistogram .Histogram .Bucket
942
- // Go through pods needing checking
943
- for _ , gpuPod := range podsToCheck {
944
-
945
- // Go through each bucket of the histogram to find a valid bucket
946
- bucketFound := false
947
- for _ , bucket := range buckets {
948
- ub := bucket .UpperBound
949
- if ub == nil {
950
- klog .Errorf ("Unable to get upperbound of histogram bucket." )
951
- continue
952
- }
953
- c := bucket .GetCumulativeCount ()
954
- var fGPU float64 = float64 (gpuPod .GPU )
955
- if fGPU < * ub && c > 1 {
956
- // Found a valid node
957
- bucketFound = true
958
- break
959
- }
960
- }
961
- if ! bucketFound {
962
- ok = false
963
- break
964
- }
965
- }
966
- }
967
-
968
- return ok
969
- }
970
-
971
924
// Thread to find queue-job(QJ) for next schedule
972
925
func (qjm * XController ) ScheduleNext (qj * arbv1.AppWrapper ) {
973
926
ctx := context .Background ()
0 commit comments