Skip to content

Commit

Permalink
Merge pull request kubernetes#34813 from gmarek/automated-cherry-pick…
Browse files Browse the repository at this point in the history
…-of-#34809-upstream-release-1.4

Automated cherry pick of kubernetes#34809
  • Loading branch information
jessfraz authored Oct 14, 2016
2 parents 9848126 + eb68b0a commit 619ed8e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/controller/node/nodecontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ func (nc *NodeController) Run() {

// Incorporate the results of node status pushed from kubelet to master.
go wait.Until(func() {
if !nc.nodeController.HasSynced() || !nc.podController.HasSynced() || !nc.daemonSetController.HasSynced() {
glog.V(2).Infof("NodeController is waiting for informers to sync...")
return
}
if err := nc.monitorNodeStatus(); err != nil {
glog.Errorf("Error monitoring node status: %v", err)
}
Expand All @@ -417,6 +421,10 @@ func (nc *NodeController) Run() {
// c. If there are pods still terminating, wait for their estimated completion
// before retrying
go wait.Until(func() {
if !nc.nodeController.HasSynced() || !nc.podController.HasSynced() || !nc.daemonSetController.HasSynced() {
glog.V(2).Infof("NodeController is waiting for informers to sync...")
return
}
nc.evictorLock.Lock()
defer nc.evictorLock.Unlock()
for k := range nc.zonePodEvictor {
Expand Down Expand Up @@ -450,6 +458,10 @@ func (nc *NodeController) Run() {
// TODO: replace with a controller that ensures pods that are terminating complete
// in a particular time period
go wait.Until(func() {
if !nc.nodeController.HasSynced() || !nc.podController.HasSynced() || !nc.daemonSetController.HasSynced() {
glog.V(2).Infof("NodeController is waiting for informers to sync...")
return
}
nc.evictorLock.Lock()
defer nc.evictorLock.Unlock()
for k := range nc.zoneTerminationEvictor {
Expand Down Expand Up @@ -478,6 +490,10 @@ func (nc *NodeController) Run() {
}, nodeEvictionPeriod, wait.NeverStop)

go wait.Until(func() {
if !nc.nodeController.HasSynced() || !nc.podController.HasSynced() || !nc.daemonSetController.HasSynced() {
glog.V(2).Infof("NodeController is waiting for informers to sync...")
return
}
pods, err := nc.podStore.List(labels.Everything())
if err != nil {
utilruntime.HandleError(err)
Expand Down

0 comments on commit 619ed8e

Please sign in to comment.