Skip to content

Commit

Permalink
Merge pull request #1149 from tonistiigi/remove-cluster-var
Browse files Browse the repository at this point in the history
Fix setting cluster variable
  • Loading branch information
aaronlehmann committed Jul 8, 2016
2 parents 981f62d + 07bcbd5 commit 6478bc1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions manager/orchestrator/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,15 @@ func (g *GlobalOrchestrator) Run(ctx context.Context) error {
defer cancel()

// lookup the cluster
var (
cluster *api.Cluster
err error
)
var err error
g.store.View(func(readTx store.ReadTx) {
var clusters []*api.Cluster
clusters, err = store.FindClusters(readTx, store.ByName("default"))

if len(clusters) != 1 {
return // just pick up the cluster when it is created.
}
cluster = clusters[0]
g.cluster = clusters[0]
})
if err != nil {
return err
Expand Down

0 comments on commit 6478bc1

Please sign in to comment.