-
Notifications
You must be signed in to change notification settings - Fork 880
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
Add wait time into xtables lock warning #2142
Conversation
iptables/iptables.go
Outdated
logrus.Warnf("xtables contention detected while running [%s]: %q", strings.Join(args, " "), string(output)) | ||
opTime := time.Since(start) | ||
if opTime > opWarnTime { | ||
logrus.Warnf("xtables contention detected while running [%s]: Waited for %f seconds and received %q", strings.Join(args, " "), float64(opTime)/float64(time.Second), string(output)) |
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.
should we do %.2f
just to truncate the decimals?
Codecov Report
@@ Coverage Diff @@
## master #2142 +/- ##
=========================================
Coverage ? 40.51%
=========================================
Files ? 139
Lines ? 22495
Branches ? 0
=========================================
Hits ? 9113
Misses ? 12044
Partials ? 1338
Continue to review full report at Codecov.
|
Signed-off-by: Chris Telfer <ctelfer@docker.com>
8aa074c
to
36847dd
Compare
Updated to limit the decimal places as requested. However, got this:
No idea how this change could have possibly caused this failure. |
Not your fault, @abhi test failed, he is looking into 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.
LGTM
As per #2135, add the wait time into the warning log to inform the user how long the xtables locks are being waited on.
Signed-off-by: Chris Telfer ctelfer@docker.com