Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify the log level of some errors #898

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
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 internal/plugin/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ func (plugin *NvidiaDevicePlugin) Start() error {

err := plugin.Serve()
if err != nil {
klog.Infof("Could not start device plugin for '%s': %s", plugin.rm.Resource(), err)
klog.Errorf("Could not start device plugin for '%s': %s", plugin.rm.Resource(), err)
plugin.cleanup()
return err
}
klog.Infof("Starting to serve '%s' on %s", plugin.rm.Resource(), plugin.socket)

err = plugin.Register()
if err != nil {
klog.Infof("Could not register device plugin: %s", err)
klog.Errorf("Could not register device plugin: %s", err)
return errors.Join(err, plugin.Stop())
}
klog.Infof("Registered device plugin for '%s' with Kubelet", plugin.rm.Resource())
Expand All @@ -159,7 +159,7 @@ func (plugin *NvidiaDevicePlugin) Start() error {
// TODO: add MPS health check
err := plugin.rm.CheckHealth(plugin.stop, plugin.health)
if err != nil {
klog.Infof("Failed to start health check: %v; continuing with health checks disabled", err)
klog.Errorf("Failed to start health check: %v; continuing with health checks disabled", err)
Copy link
Member

Choose a reason for hiding this comment

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

This could also be a warning instead, but I don't think it's a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your reply :)

}
}()

Expand Down
4 changes: 2 additions & 2 deletions internal/rm/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ func (r *resourceManager) Resource() spec.ResourceName {
return r.resource
}

// Resource gets the devices managed by the ResourceManager
// Devices gets the devices managed by the ResourceManager
func (r *resourceManager) Devices() Devices {
return r.devices
}

var errInvalidRequest = errors.New("invalid request")

// ValidateRequests checks the requested IDs against the resource manager configuration.
// ValidateRequest checks the requested IDs against the resource manager configuration.
// It asserts that all requested IDs are known to the resource manager and that the request is
// valid for a specified sharing configuration.
func (r *resourceManager) ValidateRequest(ids AnnotatedIDs) error {
Expand Down