-
Notifications
You must be signed in to change notification settings - Fork 99
Add logVerbosity Helm chart parameter, reduce default log verbosity
#633
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
Changes from all commits
a36e214
8321983
5f143b2
4cc705a
c5b147b
7e89b22
bb16c33
84530ab
6d35ac1
3828da9
4767092
9748095
b172342
3d5c51f
2c943f7
4cf3d9b
4ced422
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -202,6 +202,9 @@ func (d *driver) UnprepareResourceClaims(ctx context.Context, claimRefs []kubele | |
| if done { | ||
| results[claim.UID] = err | ||
| wg.Done() | ||
| if err != nil { | ||
| klog.V(0).Infof("Permanent error unpreparing devices for claim %v: %v", claim.UID, err) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can the V(0) be dropped?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, can the log be done inside
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, level 0 is implicit when doing
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I remember: I did this to make this explicit -- to set the precedent for always using an explicit level, to enhance code readability. Because this is a question one naturally has when reading code: what level does Info on log by default? One needs to have that additional knowledge. But I will remove this now again to eradicate a potential point of friction.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In We can change this if course, but let's not do this here. |
||
| } | ||
| return nil | ||
| } | ||
| return fmt.Errorf("%w", err) | ||
|
|
@@ -251,13 +254,14 @@ func (d *driver) nodePrepareResource(ctx context.Context, claim *resourceapi.Res | |
| Err: fmt.Errorf("error preparing devices for claim %s/%s:%s: %w", claim.Namespace, claim.Name, claim.UID, err), | ||
| } | ||
| if isPermanentError(err) { | ||
| klog.V(6).Infof("Permanent error preparing devices for claim %v: %v", claim.UID, err) | ||
| klog.Infof("Permanent error preparing devices for claim %v: %v", claim.UID, err) | ||
| return true, res | ||
| } | ||
| return false, res | ||
| } | ||
|
|
||
| klog.Infof("prepared devices for claim '%s/%s:%s': %v", claim.Namespace, claim.Name, claim.UID, devs) | ||
| klog.V(1).Infof("prepared devices for claim '%s/%s:%s': %v", claim.Namespace, claim.Name, claim.UID, devs) | ||
|
|
||
| return true, kubeletplugin.PrepareResult{Devices: devs} | ||
| } | ||
|
|
||
|
|
@@ -272,7 +276,7 @@ func (d *driver) nodeUnprepareResource(ctx context.Context, claimRef kubeletplug | |
| return isPermanentError(err), fmt.Errorf("error unpreparing devices for claim '%v': %w", claimRef.String(), err) | ||
| } | ||
|
|
||
| klog.Infof("unprepared devices for claim '%v'", claimRef.String()) | ||
| klog.V(1).Infof("Unprepared devices for claim '%v'", claimRef.String()) | ||
| return true, nil | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.