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

Simplify connection tracker init and fix procfs scan fallback #2539

Merged
merged 3 commits into from
May 25, 2017

Conversation

rade
Copy link
Member

@rade rade commented May 25, 2017

No description provided.

@rade rade requested a review from 2opremio May 25, 2017 21:33
@2opremio
Copy link
Contributor

LGTM (on green).

Much easier to read. Thanks

@rade
Copy link
Member Author

rade commented May 25, 2017

ouch @2opremio, I think I found a bug...

I am pretty sure in 7497c7d you should also have changed https://github.com/weaveworks/scope/blob/master/probe/endpoint/connection_tracker.go#L100

And guess what, I picked the wrong version in this PR. Will get that fixed. Is that worthy of a 1.4.x release? Perhaps not since ebpf is not enabled by default, so the above code won't be exercised in most installs.

@rade rade force-pushed the simplify-connection-tracker-init branch from 8c4b749 to 80a7ceb Compare May 25, 2017 22:00
rade added 3 commits May 25, 2017 23:02
- eliminate the code duplication when falling back to procfs scanning
- trim some superfluous comments

Also fix a bug in the procvess: when falling back to procfs scanning
in ReportConnections, the scanner was given a "--any-nat" param, which
is wrong.
we now do correctly fall back to proc scanning when eBPF fails
we always have a flowWalker when not using ebpf
@rade rade force-pushed the simplify-connection-tracker-init branch from 80a7ceb to b52b207 Compare May 25, 2017 22:05
@rade rade changed the title Simplify connection tracker init Simplify connection tracker init and fix a bug May 25, 2017
@rade rade changed the title Simplify connection tracker init and fix a bug Simplify connection tracker init and fix incorrect procfs scan fallback May 25, 2017
@rade rade changed the title Simplify connection tracker init and fix incorrect procfs scan fallback Simplify connection tracker init and fix procfs scan fallback May 25, 2017
@2opremio
Copy link
Contributor

Good catch!

Is that worthy of a 1.4.x release? Perhaps not since ebpf is not enabled by default, so the above code won't be exercised in most installs.

I agree, it only happens when explicitly enabling ebpf and when it fails. Coincidentaly I was thinking about how to force this situation in an integration test for #2535

@rade rade merged commit be0297d into master May 25, 2017
@rade rade deleted the simplify-connection-tracker-init branch July 5, 2017 13:09
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.

2 participants