-
Notifications
You must be signed in to change notification settings - Fork 714
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
Use conntrack to detect short lived connections. #386
Conversation
c68bb82
to
0cc54b0
Compare
$(DOCKER_DISTRIB): | ||
curl -o $(DOCKER_DISTRIB) $(DOCKER_DISTRIB_URL) | ||
|
||
docker/weave: |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
44f7b78
to
35d8c02
Compare
35d8c02
to
a7d4350
Compare
To be clear: short-lived connections are visible, for processes that are running in containers, and talking to other containers? |
"strconv" | ||
"time" | ||
|
||
"github.com/prometheus/client_golang/prometheus" | ||
"github.com/typetypetype/conntrack" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Short lived connections will only be visible for containers with a unique IP address in the containers and container image view. This rules out some of the kubernetes use cases as containers share a network namespace and IP address (although we can do the same thing for pods in the k8n views, so its not too bad), and also rules out --net=host containers (ie scope itself). These short lived connections will not be visible in the process view (nothing to join them on). We could back-propagate the links for singleton process in containers (again, not scope). Container-to-container links are covered, as are/will be pseudo nodes (both random ips and the internet node) |
a7d4350
to
d5516c7
Compare
5155a9d
to
eb30946
Compare
66be8bd
to
d9ab9d8
Compare
eb30946
to
46b1a6f
Compare
532a8b3
to
2a56ec9
Compare
} else if err != nil { | ||
log.Printf("conntrack error: %v", err) | ||
return | ||
} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
}) | ||
return result | ||
} | ||
ts := 1000 * time.Millisecond |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
2b44189
to
b805e84
Compare
I solved #403 by ensure each edge is only included once, by construction. |
b805e84
to
e53ae8d
Compare
@@ -48,20 +45,20 @@ type PseudoFunc func(srcNodeID, dstNodeID string, srcIsClient bool, local report | |||
// | |||
// As with LeafMapFunc, if the final output parameter is false, the node | |||
// shall be omitted from the rendered topology. | |||
type MapFunc func(RenderableNode) (RenderableNode, bool) | |||
type MapFunc func(RenderableNode) RenderableNodes |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
After reading this a little bit, very eager to go ahead and merge RenderableNode/NodeMetadata/.... as we discussed... |
…g it for NAT mappings. Also use conntrack to populate the endpoint table.
… endpoints, via IP address foreign key.
e53ae8d
to
55c77c6
Compare
Yeah I've got a WIP branch to get there - https://github.com/weaveworks/scope/tree/357-adjacencies-to-nodemetadata Will do it tomorrow. |
"strings" | ||
"sync" | ||
|
||
"github.com/weaveworks/scope/test/exec" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Alright, those comments aside, this LGTM-ish. It's a shame that we have to exploit IP-per-container to get this info, but now that I understand it, I think it's reasonable enough. |
Thanks! Any suggestions on where to put exec? Maybe a lib package? On Thu, Aug 27, 2015 at 6:25 PM, Peter Bourgon [email protected]
|
common/{exec,foo,bar}? |
27d3266
to
903a513
Compare
Use conntrack to detect short lived connections.
Fixes #356
Status: Good to go. Review feedback welcome.
Steps are: