diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 89cbdc5deda..73e0f04cc51 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -136,7 +136,12 @@ func startComponents(manifestURL string) (apiServerURL string) { handler.delegate = mux // Scheduler - scheduler.New((&factory.ConfigFactory{cl}).Create()).Run() + schedulerConfigFactory := &factory.ConfigFactory{cl} + schedulerConfig, err := schedulerConfigFactory.Create() + if err != nil { + glog.Fatalf("Unable to construct scheduler config: %v", err) + } + scheduler.New(schedulerConfig).Run() endpoints := service.NewEndpointController(cl) go util.Forever(func() { endpoints.SyncServiceEndpoints() }, time.Second*10) diff --git a/plugin/pkg/scheduler/factory/factory.go b/plugin/pkg/scheduler/factory/factory.go index f512f37af76..05a91e3ee28 100644 --- a/plugin/pkg/scheduler/factory/factory.go +++ b/plugin/pkg/scheduler/factory/factory.go @@ -64,6 +64,7 @@ func (factory *ConfigFactory) Create() (*scheduler.Config, error) { r := rand.New(rand.NewSource(time.Now().UnixNano())) + // TODO: remove this construction-time listing. nodes, err := factory.Client.ListMinions() if err != nil { return nil, err