Skip to content

Add wait time into xtables lock warning#2142

Merged
fcrisciani merged 1 commit intomoby:masterfrom
ctelfer:xfilter-warn-timestamp
Apr 26, 2018
Merged

Add wait time into xtables lock warning#2142
fcrisciani merged 1 commit intomoby:masterfrom
ctelfer:xfilter-warn-timestamp

Conversation

@ctelfer
Copy link
Copy Markdown
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))
Copy link
Copy Markdown

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
Copy Markdown

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 ctelfer force-pushed the xfilter-warn-timestamp branch from 8aa074c to 36847dd Compare April 26, 2018 18:22
@ctelfer
Copy link
Copy Markdown
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
Copy Markdown

fcrisciani commented Apr 26, 2018

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

Copy link
Copy Markdown

@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.

3 participants