Skip to content

Commit

Permalink
Fix scheduler race
Browse files Browse the repository at this point in the history
  • Loading branch information
bprashanth committed Jul 13, 2015
1 parent a1efb50 commit 0728c08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/pkg/scheduler/modeler.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,7 @@ type simpleModelerPods struct {

// List returns pods known and assumed to exist.
func (s simpleModelerPods) List(selector labels.Selector) (pods []*api.Pod, err error) {
return s.simpleModeler.listPods(selector)
s.simpleModeler.LockedAction(
func() { pods, err = s.simpleModeler.listPods(selector) })
return
}

0 comments on commit 0728c08

Please sign in to comment.