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

Add wait time into xtables lock warning #2142

Merged
merged 1 commit into from Apr 26, 2018

Conversation

ctelfer
Copy link
Contributor

@ctelfer ctelfer commented Apr 26, 2018

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

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))

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-io
Copy link

codecov-io commented Apr 26, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@9605f3c). Click here to learn what that means.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2142   +/-   ##
=========================================
  Coverage          ?   40.51%           
=========================================
  Files             ?      139           
  Lines             ?    22495           
  Branches          ?        0           
=========================================
  Hits              ?     9113           
  Misses            ?    12044           
  Partials          ?     1338
Impacted Files Coverage Δ
iptables/iptables.go 55.85% <33.33%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9605f3c...36847dd. Read the comment docs.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
@ctelfer
Copy link
Contributor Author

ctelfer commented Apr 26, 2018

Updated to limit the decimal places as requested. However, got this:

--- FAIL: TestRequestReleaseAddressDuplicate (0.00s)
	allocator_test.go:1436: IP 198.168.1.204/23 was previously allocated

No idea how this change could have possibly caused this failure.

@fcrisciani
Copy link

fcrisciani commented Apr 26, 2018

Not your fault, @abhi test failed, he is looking into it

Copy link

@fcrisciani fcrisciani left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet

3 participants