Add wait time into xtables lock warning#2142
Merged
fcrisciani merged 1 commit intomoby:masterfrom Apr 26, 2018
Merged
Conversation
fcrisciani
reviewed
Apr 26, 2018
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.
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
Contributor
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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