-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
network/cni: more informative log messages #69159
Conversation
/sig network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just nits
err = cniNet.DelNetworkList(netConf, rt) | ||
// The pod may not get deleted successfully at the first time. | ||
// Ignore "no such file or directory" error in case the network has already been deleted in previous attempts. | ||
if err != nil && !strings.Contains(err.Error(), "no such file or directory") { | ||
glog.Errorf("Error deleting network: %v", err) | ||
glog.Errorf("Error deleting %s from network %s: %v", pdesc, netConf.Name, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need to be consistent with above. network %s/%s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -296,21 +290,26 @@ func (plugin *cniNetworkPlugin) TearDownPod(namespace string, name string, id ku | |||
return plugin.deleteFromNetwork(plugin.getDefaultNetwork(), name, namespace, id, netnsPath, nil) | |||
} | |||
|
|||
func podDesc(namespace, name string, id kubecontainer.ContainerID) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubelet has a util function that does similar stuff. But probably we should not import it into this package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@freehan I did see PodFullName() but that doesn't do the containerID too. Which one were you thinking of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the one I was looking at. Never mind then.
Log details about the pod name, namespace, sandbox ID, and result. Remove some useless messages that are now redundant.
@freehan PTAL, thanks! |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dcbw, freehan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
/kind cleanup |
/retest Review the full test history for this PR. Silence the bot with an |
@dcbw: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Log details about the pod name, namespace, sandbox ID, and result.
Remove some useless messages that are now redundant.
@freehan @thockin @squeed @bowei