Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,6 @@ func (dn *Daemon) detectEarlySSHAccessesFromBoot() error {
// responsible for triggering callbacks to handle updates. Successful
// updates shouldn't return, and should just reboot the node.
func (dn *Daemon) Run(stopCh <-chan struct{}, exitCh <-chan error) error {
defer utilruntime.HandleCrash()
defer dn.queue.ShutDown()

if dn.kubeletHealthzEnabled {
glog.Info("Enabling Kubelet Healthz Monitor")
go dn.runKubeletHealthzMonitor(stopCh, dn.exitCh)
Expand All @@ -461,6 +458,9 @@ func (dn *Daemon) Run(stopCh <-chan struct{}, exitCh <-chan error) error {
}
}

defer utilruntime.HandleCrash()
defer dn.queue.ShutDown()

if !cache.WaitForCacheSync(stopCh, dn.nodeListerSynced, dn.mcListerSynced) {
return errors.New("failed to sync initial listers cache")
}
Expand Down