Skip to content

Commit

Permalink
Merge pull request #173 from e0ne/device-plugin-restart
Browse files Browse the repository at this point in the history
Restart device plugin pod after policy apply
  • Loading branch information
pliurh authored Sep 23, 2021
2 parents ac5db51 + 4d4fb44 commit 14bd335
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,11 @@ func (dn *Daemon) nodeStateSyncHandler(generation int64) error {
}

// restart device plugin pod
if reqDrain || latestState.Spec.DpConfigVersion != dn.nodeState.Spec.DpConfigVersion {
glog.Info("nodeStateSyncHandler(): restart device plugin pod")
if err := dn.restartDevicePluginPod(); err != nil {
glog.Errorf("nodeStateSyncHandler(): fail to restart device plugin pod: %v", err)
return err
}
glog.Info("nodeStateSyncHandler(): restart device plugin pod")
if err := dn.restartDevicePluginPod(); err != nil {
glog.Errorf("nodeStateSyncHandler(): fail to restart device plugin pod: %v", err)
return err
}

if anno, ok := dn.node.Annotations[annoKey]; ok && (anno == annoDraining || anno == annoMcpPaused) {
if err := dn.completeDrain(); err != nil {
glog.Errorf("nodeStateSyncHandler(): failed to complete draining: %v", err)
Expand Down

0 comments on commit 14bd335

Please sign in to comment.