-
Notifications
You must be signed in to change notification settings - Fork 949
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
bugfix: remove duplicate error msgs #1048
bugfix: remove duplicate error msgs #1048
Conversation
daemon/mgr/network.go
Outdated
@@ -209,14 +208,12 @@ func (nm *NetworkManager) EndpointCreate(ctx context.Context, endpoint *types.En | |||
if sb == nil { | |||
sandboxOptions, err := nm.sandboxOptions(endpoint) | |||
if err != nil { | |||
logrus.Errorf("failed to build sandbox options, err: %v", err) | |||
return "", err | |||
return "", fmt.Errorf("failed to build sandbox options, err: %v", 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.
This removal LGTM, while I wish we could do a little more change:
how about
fmt.Errorf("failed to build sandbox options: %v", err)
rather than
fmt.Errorf("failed to build sandbox options, err: %v", 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.
got it
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
The log is already showed in https://github.com/alibaba/pouch/blob/master/daemon/mgr/container.go#L502
So I think the removal is reasonable. |
Signed-off-by: 程飞 <fay.cheng.cn@gmail.com>
095264d
to
f01d4e3
Compare
LGTM |
Signed-off-by: 程飞 fay.cheng.cn@gmail.com
Ⅰ. Describe what this PR did
pouch daemon will print duplicate error messages if fails to create endpoint.
so, i remove duplicate output in func
EndpointCreate
.Thanks a lot for your reviews and comments.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews