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

relcaimspace: add nodeID to error message #256

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Oct 18, 2022

add nodeID to error message to provide more details for debugging.

Signed-off-by: Madhu Rajanna [email protected]

@@ -252,7 +252,7 @@ func (r *ReclaimSpaceJobReconciler) reconcile(
}

if !controllerFound && !nodeFound {
err = errors.New("Controller and Node Client not found")
err = fmt.Errorf("Controller and Node Client not found for %s nodeID", target.nodeID)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
err = fmt.Errorf("Controller and Node Client not found for %s nodeID", target.nodeID)
err = fmt.Errorf("Controller and Node Client not found for %q nodeID", target.nodeID)

add quotes so it stands out ?

@@ -403,7 +403,7 @@ func (r *ReclaimSpaceJobReconciler) nodeReclaimSpace(
target.nodeID,
identity.Capability_ReclaimSpace_ONLINE)
if nodeClient == nil {
return nil, errors.New("node Client not found")
return nil, fmt.Errorf("node Client not found for %s nodeID", target.nodeID)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return nil, fmt.Errorf("node Client not found for %s nodeID", target.nodeID)
return nil, fmt.Errorf("node Client not found for %q nodeID", target.nodeID)

add quotes so it stands out ?

add nodeID to error message to provide more
details for debugging.

Signed-off-by: Madhu Rajanna <[email protected]>
@Madhu-1 Madhu-1 force-pushed the add-nodeid-for-log branch from 8792c95 to cdda823 Compare October 18, 2022 10:26
@Madhu-1 Madhu-1 requested a review from Rakshith-R October 18, 2022 10:27
@mergify mergify bot merged commit 2f11ffb into csi-addons:main Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants