Skip to content

Commit

Permalink
Fix issue with scheduler mutex. Update k8s motd with new kubedashboard
Browse files Browse the repository at this point in the history
url
  • Loading branch information
marcosnils committed Nov 24, 2017
1 parent d758c1a commit 29ed79d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions dockerfiles/k8s/motd
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

3. (Optional) Initialize kube-dashboard:

curl -L -s https://git.io/kube-dashboard | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | \
kubectl apply -f -

curl -L -s https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml | sed 's/targetPort: 8443/targetPort: 8443\n type: LoadBalancer/' | kubectl apply -f -

The PWK team.

Expand Down
3 changes: 2 additions & 1 deletion scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,11 @@ func (s *scheduler) Start() error {
})
s.event.On(event.PLAYGROUND_NEW, func(playgroundId string, args ...interface{}) {
s.mx.Lock()
defer s.mx.Unlock()

log.Printf("EVENT: Playground New %s\n", playgroundId)

// Don't defer lock as updatePlaygrounds will lock again
s.mx.Unlock()
// We just update all playgrounds we manage to be safe. This is pretty fast anyway and this event should be fairly rare
s.updatePlaygrounds()
})
Expand Down

0 comments on commit 29ed79d

Please sign in to comment.