Skip to content
Open
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
2 changes: 1 addition & 1 deletion pkg/resources/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure im OK with logging a msg then panic,

maybe we need some way to signal errors and exit gracefully ?
what others think of this ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure we can switch to log.err and exit 1 or something like that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't log.Fatal the same as log and exit 1?

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