Skip to content

Commit

Permalink
modify the log level of some errors
Browse files Browse the repository at this point in the history
fix method comment

Signed-off-by: googs1025 <[email protected]>
  • Loading branch information
googs1025 authored and elezar committed Sep 17, 2024
1 parent 71c1fa7 commit 3bac366
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/plugin/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,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 @@ -157,7 +157,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)
}
}()

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

0 comments on commit 3bac366

Please sign in to comment.