Commit Graph

40 Commits

Author SHA1 Message Date
Matthias Radestock
ac9f7dfad1 simplify node propagation in ipToNode 2017-07-13 17:10:43 +01:00
Matthias Radestock
bd9fafff42 don't create *derived* nodes in nodeToIP
IP nodes are children of the "proper" topology nodes, not the other
way round. The former relationship is established in ipToNode.
2017-07-13 17:00:14 +01:00
Matthias Radestock
4a77e9bfac don't bother tracking the orignal node topology
We always join with the original renderer and hence all the nodes
produced by ipToNode will get their other data, including topology,
via that route.
2017-07-13 16:35:52 +01:00
Matthias Radestock
c7f94d8a74 join with original renderer in ConnectionJoin
This guarantees that the output won't contain bare nodes containing
just an id and topology, as produced by ipToNode. Previously this was
ensured by calling convention, now it's ensured by construction.
2017-07-13 16:28:02 +01:00
Matthias Radestock
387a68a3c7 tiny refactor: swap ConnectionJoin arg order
to match the style of other render HoFs, which take their inputs last.
2017-07-13 14:23:46 +01:00
Matthias Radestock
f0ae2bd98c refactor: use inline StringSet constructor 2017-07-04 06:29:19 +01:00
Matthias Radestock
9dc50b5202 refactor: hide "empty set" constants
They are an implementation detail.
2017-07-03 01:26:22 +01:00
Matthias Radestock
3209d65d52 filter out unconnected pseudo nodes on the outside
The change is necessitated by the removal of procspied/ebpf endpoint
filtering in the renderers, as a result of which the odd
conntracked-only, unconnected pseudo node can sneak through.

This new way of doing things also makes renderers more composable and
robust, and more directly reflects the objective:
- in the process topologies, filter out all unconnected nodes
- in all other topologies, filter out unconnected pseudo nodes
2017-06-27 20:28:30 +01:00
Matthias Radestock
e5a04ec5a4 do not filter endpoints by procspied/ebpf in renderers
The filtering of endpoints causes some connections to get missed for
non-eBPF-tracked connections. Furthermore, the filtering of endpoints
is entirely pointless when the probes run eBPF since the filters just
pass through eBPF-tracked endpoints (for good reason too; because
otherwise some connections would be missed). So in that case it is
just costing CPU and removing it actually improves performance.

Note that removing the filtering does not result in over-counting
connections since that is done by source ip:port pairs.

Fixes #2551.
Fixes #2558.
2017-06-27 20:28:13 +01:00
Matthias Radestock
d66b28de2a performance: only color connected once
ProcessRenderer was coloring connected nodes because we need that info
for rendering details panels. However, the main process topology view
renderers depending on ProcessRenderer were also doing coloring
themselves. For the 'processes' topology that was literally
duplicating work. For the 'processes-by-name' topology that was
throwing away the process coloring, and then coloring at the name
level.

Solution: remove the coloring from the ProcessRenderer, thus
eliminating the duplicate/thrown-away work, and introduce a
ColorConnectedProcessRenderer which is only used in places that
populate details panels.
2017-06-22 10:28:39 +01:00
Matthias Radestock
8c6a171553 refactor: extract a couple of heavily used constants 2017-06-21 21:12:55 +01:00
Matthias Radestock
6eaffb44e0 fix bug: handle short-lived ebpf-tracked connections again
This got broken in #2559.

The problem here is similar to #2551.
2017-06-04 18:42:54 +01:00
Matthias Radestock
30c38a958f remove blatant falsehoods from comments 2017-06-04 16:23:03 +01:00
Matthias Radestock
ebcf9dcf10 refactor: rename ShortLivedConnectionJoin to ConnectionJoin
since it's dealing with *all* connections, not just short-lived ones.
2017-06-04 16:10:21 +01:00
Matthias Radestock
9bc7b30f0f extract and expand endpoint procspied filter
The filter needs to exclude both procspied and eBPF-tracked endpoints,
since both will be picked up by the process topology.
2017-06-04 16:10:21 +01:00
Matthias Radestock
ee0736df69 refactor: extract constant mapEndpoint2IP 2017-06-04 16:10:21 +01:00
Matthias Radestock
6697f4a897 refactor: declosure ShortLivedConnectionJoin 2017-06-04 16:10:21 +01:00
Filip Barl
2e9255b190 Addressed the comments and fixed the tests. 2017-02-20 11:40:40 +01:00
Filip Barl
f1904a626f Fix filtering issue for uncontained nodes in DNS name view (#2170). 2017-02-20 11:38:21 +01:00
Alfonso Acosta
0a135e6330 Check for known services before external IPs
Known services can be internal (e.g. same VPC in AWS)
2017-01-31 15:37:57 +00:00
Alfonso Acosta
216cc0d605 Add image table to container nodes
Also, extend metadata of images with sizes
2016-11-02 13:16:11 +00:00
Alfonso Acosta
c5ac315b38 Review feedback 2016-09-20 16:50:29 +00:00
Alfonso Acosta
5c080ec062 Add pseudo-nodes for known services
AWS S3 and Dynamo to start with
2016-09-19 14:38:58 +00:00
Matthias Radestock
21c188d600 Merge pull request #1739 from weaveworks/1730-no-node-copy
Remove and optimize more Copy()s
2016-08-12 12:30:54 +01:00
Alfonso Acosta
94eb7454ff Do not attribute connections to containers based on loopback addresses 2016-08-10 10:56:37 +00:00
Matthias Radestock
1091225bf6 get rid of Node.Copy()
A shallow copy is sufficient. Which we get for free in most cases
since Node is passed around by value.
2016-08-02 12:42:39 +00:00
Alfonso Acosta
c843d24f6f Do not infer short-lived connections for host-networking containers 2016-07-07 15:44:13 +00:00
Tom Wilkie
c80eb42a4f Add filters for pseudo nodes. (#1581)
* Add filters for pseudo nodes.

- Don't filter the internet node as a pseudo node.
- Rename pseudo filter to unmanaged/uncontained.
- Review feedback
- Move the FilterFoo funcs into the tests
- Drop the 'nodes' from filter labels.

* Fix experimental
2016-06-16 20:09:13 +01:00
Tom Wilkie
73e2effb9f Join pod topology directly with short lived connections (#1597)
* Join pod topology directly with short lived connections

* Review feedback
2016-06-16 19:05:15 +01:00
Tom Wilkie
fba555c985 Use image name without version as id. (#1531)
* Use image name without version as id.

* Review feedback
2016-06-15 16:14:51 +01:00
Tom Wilkie
8f772a696d Add flag to disable reporting of processes (and procspied endpoints) 2016-05-17 17:29:09 +01:00
Tom Wilkie
4674d45c1a Don't merge in container image metadata into containers anymore. 2016-05-13 11:15:24 +01:00
Tom Wilkie
b5cadf3a41 Make all filters drop unconnected pseudo nodes by default, and don't apply filter funcs to pseudo nodes. 2016-05-06 13:14:48 +01:00
Tom Wilkie
9eaac25d69 Don't merge nodes in the rendering pipeline 2016-05-03 15:18:31 +01:00
Paul Bellamy
0456df9d0a Merge branch 'master' of github.com:weaveworks/scope 2016-05-03 13:46:14 +01:00
Paul Bellamy
c40f29caf2 cleaning up old todo 2016-05-03 13:45:54 +01:00
Tom Wilkie
1c5f0ac041 Don't attribute conntracked connections to k8s pause containers. 2016-05-03 12:04:08 +01:00
Tom Wilkie
02554b1dcd Propagate network info for containers sharing network namespaces (#1401)
- Add armon/go-radix library, use this to find containers by prefix
- Deal with host net namespace in the same way
2016-04-29 18:13:55 +01:00
Paul Bellamy
3d3aed2bb3 Fixing grouped node count for filtered children nodes
Squash of:

* We have to keep all the container hostnames until the end so we can
  count how many we've filtered

* Adding tests for ContainerHostnameRenderer and PodServiceRenderer with
  filters

* Because we filter on image name we need the image name before
  filtering

* Alternative approach to passing decorators.

* Refactor out some of the decorator capture

* Don't memoise decorated calls to Render

* Fixing filtered counts on containers topology

  Tricky, because we need the filters to be silent sometimes (when they're
  in the middle), but not when they're at the top, so we take the "top"
  filter's stats. However, this means we have to compose all
  user-specified filters into a single Filter layer, so we can get all
  stats.

  There are no more Silent filters, as all filters are silent (unless they
  are at the top).

  Additionally, I clarified some of the filters as their usage/terminology
  was inconsistent and confused. Now Filter(IsFoo, ...) *keeps* only nodes
  where IsFoo is true.
2016-04-28 12:23:43 +01:00
Tom Wilkie
cfda4c8404 Review feedback 2016-04-22 11:07:07 +01:00