Skip to content

Commit 595569d

Browse files
committed
restart the device plugin if NotifyRegistrationStatus returns failure
Today it only logs and stop the rpc server. The plugin hangs after that. Signed-off-by: Yuan Liu <[email protected]>
1 parent 39a434e commit 595569d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/resources/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ func (rs *resourceServer) NotifyRegistrationStatus(ctx context.Context,
115115
if regstat.PluginRegistered {
116116
glog.Infof("Plugin: %s gets registered successfully at Kubelet\n", rs.endPoint)
117117
} else {
118-
glog.Infof("Plugin: %s failed to be registered at Kubelet: %v; restarting.\n", rs.endPoint, regstat.Error)
119118
rs.grpcServer.Stop()
119+
glog.Fatalf("Plugin: %s failed to be registered at Kubelet: %v; restarting.\n", rs.endPoint, regstat.Error)
120+
120121
}
121122
return &registerapi.RegistrationStatusResponse{}, nil
122123
}

0 commit comments

Comments
 (0)