Skip to content

Commit

Permalink
restart the device plugin if NotifyRegistrationStatus returns failure
Browse files Browse the repository at this point in the history
Today it only logs and stop the rpc server. The plugin hangs after that.

Signed-off-by: Yuan Liu <[email protected]>
  • Loading branch information
liuyuan10 committed Sep 24, 2024
1 parent 39a434e commit 595569d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/resources/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ func (rs *resourceServer) NotifyRegistrationStatus(ctx context.Context,
if regstat.PluginRegistered {
glog.Infof("Plugin: %s gets registered successfully at Kubelet\n", rs.endPoint)
} else {
glog.Infof("Plugin: %s failed to be registered at Kubelet: %v; restarting.\n", rs.endPoint, regstat.Error)
rs.grpcServer.Stop()
glog.Fatalf("Plugin: %s failed to be registered at Kubelet: %v; restarting.\n", rs.endPoint, regstat.Error)

}
return &registerapi.RegistrationStatusResponse{}, nil
}
Expand Down

0 comments on commit 595569d

Please sign in to comment.