@@ -38,6 +38,7 @@ import (
3838 "time"
3939
4040 "github.com/AliceO2Group/Control/common/controlmode"
41+ "github.com/AliceO2Group/Control/common/utils/uid"
4142 "github.com/AliceO2Group/Control/core/task/channel"
4243 "github.com/AliceO2Group/Control/core/task/schedutil"
4344 "github.com/spf13/viper"
@@ -184,7 +185,7 @@ func (state *schedulerState) reconciliationCall() events.HandlerFunc {
184185}
185186
186187// Update metrics when we receive an offer
187- func (state * schedulerState )trackOffersReceived () eventrules.Rule {
188+ func (state * schedulerState ) trackOffersReceived () eventrules.Rule {
188189 return func (ctx context.Context , e * scheduler.Event , err error , chain eventrules.Chain ) (context.Context , * scheduler.Event , error ) {
189190 if err == nil {
190191 state .metricsAPI .offersReceived .Int (len (e .GetOffers ().GetOffers ()))
@@ -406,7 +407,7 @@ func (state *schedulerState) resourceOffers(fidStore store.Singleton) events.Han
406407 }).Trace ("received offers" )
407408 }
408409
409- var descriptorsToDeploy Descriptors
410+ var descriptorsStillToDeploy Descriptors
410411 select {
411412 case descriptorsStillToDeploy = <- state .tasksToDeploy :
412413 if viper .GetBool ("veryVerbose" ) {
@@ -461,8 +462,8 @@ func (state *schedulerState) resourceOffers(fidStore store.Singleton) events.Han
461462 // for a likely significant multinode launch performance increase
462463 for _ , offer := range offers {
463464 var (
464- remainingResources = mesos .Resources (offer .Resources )
465- tasks = make ([]mesos.TaskInfo , 0 )
465+ remainingResourcesInOffer = mesos .Resources (offer .Resources )
466+ taskInfosToLaunchForCurrentOffer = make ([]mesos.TaskInfo , 0 )
466467 tasksDeployedForCurrentOffer = make (DeploymentMap )
467468 targetExecutorId = mesos.ExecutorID {}
468469 )
@@ -526,7 +527,7 @@ func (state *schedulerState) resourceOffers(fidStore store.Singleton) events.Han
526527 Warning ("no resource demands for descriptor, invalid class perhaps?" )
527528 continue
528529 }
529- if ! Resources (remainingResources ).Satisfy (wants ) {
530+ if ! Resources (remainingResourcesInOffer ).Satisfy (wants ) {
530531 if viper .GetBool ("veryVerbose" ) {
531532 log .WithPrefix ("scheduler" ).
532533 WithFields (logrus.Fields {
0 commit comments