Commit Graph

3988 Commits

Author SHA1 Message Date
Matthias Radestock
cfbbdf7bf0 refactor: optimise report.Sets.Delete() going empty
Mainly for consistencty; we do something similar NodeSet.Delete().
2017-07-03 03:19:52 +01:00
Matthias Radestock
430e74a80a refactor: remove report latest map Delete()
It wasn't used, and is problematic in any case since it introduces
non-monotonicity.
2017-07-03 02:06:21 +01:00
Matthias Radestock
5b131b1ea6 refactor: remove a couple of report set Remove() functions
They were unused and their naming was inconsistent with similar
operations (that are called Delete()).
2017-07-03 01:26:22 +01:00
Matthias Radestock
7119fb9de8 refactor: rename report.NewNetworks to MakeNetworks
for consistency - all the other report set constructors are called
'Make...'
2017-07-03 01:26:22 +01:00
Matthias Radestock
fd3fc6656d refactor: add some more empty report set objects
for efficiency and consistency
2017-07-03 01:26:22 +01:00
Matthias Radestock
b5f3aa68ae refactor: optimise "empty" case in report set constructors 2017-07-03 01:26:22 +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
c5b2c9dc3d Merge pull request #2668 from weaveworks/2665-connection-pid-attribution
ignore endpoints with >1 adjacency in process rendering

This eliminates the worst effects of #2665.
2017-06-30 13:10:10 +01:00
Mike Lang
e65c80d71a Merge pull request #2670 from weaveworks/mike/k8s/controller-view/no-type-filter
Remove type filter in controllers view
2017-06-29 17:18:28 -07:00
Mike Lang
c521b50bc6 Remove type filter in controllers view
This was always temporary until we could search for type via the search box instead,
since it resulted in too much clutter / didn't seem a useful use-case.

As it turns out, searching like this was already possible.
2017-06-29 16:03:53 -07:00
Mike Lang
02de94754d Merge pull request #2661 from weaveworks/mike/k8s/remove-replica-sets
Remove replica sets
2017-06-29 15:07:31 -07:00
Matthias Radestock
708931f98a ignore endpoints with >1 adjacency in process rendering
This eliminates the worst effects of #2665.
2017-06-29 22:34:05 +01:00
Mike Lang
ef2b6f6c55 Remove replica sets
Use a special kind of selector renderer to elide replica sets from pod nodes
and directly reference deployment parents instead.
Do the inverse (replace replica sets with pods) during the mapping from pod to deployment.

Note we can no longer use renderParents since we're using a non-standard Selector
2017-06-29 10:13:15 -07:00
Roland Schilter
247c365e16 Merge pull request #2570 from weaveworks/update-weaveworks-common
Update github.com/weaveworks/common & dependencies (needs go1.8)
2017-06-29 13:48:21 +02:00
Ilya Dmitrichenko
f326ded162 Merge pull request #2657 from weaveworks/openshift-install-docs
Publish updated OpenShift instructions (close #2485)
2017-06-29 11:33:01 +01:00
Ilya Dmitrichenko
c2dbedde37 Publish updated OpenShift instructions (close #2485)
This has been tested on OpenShift Orgin v1.4.1 (`oc cluster up --version=v1.4.1 --skip-registry-check`),
(using latest builds of `oc` [412b5d6] command and Docker for Mac [v17.06.0-rc5-ce-mac16]).
2017-06-28 14:52:43 +01:00
Matthias Radestock
5317b224ec Merge pull request #2652 from weaveworks/do-not-filter-endpoint
do not filter endpoints by procspied/ebpf in renderers

Fixes #2551.
Fixes #2558.
2017-06-28 08:54:38 +01:00
Roland Schilter
e6bc1d6ec2 Merge pull request #2649 from weaveworks/1975-honor-docker-host-in-probe
Honor DOCKER_* env variables in probe and app
2017-06-28 09:07:52 +02: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
Mike Lang
716a5df87b Merge pull request #2552 from weaveworks/mike/k8s/combined-view
add k8s combined view
2017-06-27 11:09:13 -07:00
Mike Lang
f7913ab550 Rewrite renderers for k8s/ecs/swarm to abstract common parts
Since all the renderers were doing almost-exactly the same thing, we abstract that out into a common function.
2017-06-27 10:19:04 -07:00
Mike Lang
f101f83c3d controllers topology: Map metrics for single nodes
* Maps metrics if there is a single pod in the controller, as per all other views.
* Also added heavy commenting on the increasingly-complex render chain
2017-06-27 10:19:04 -07:00
Mike Lang
ec2a7fc753 Prefer controllers view for default view 2017-06-27 10:19:04 -07:00
Mike Lang
8eb72cf276 Remove deployment and daemonset views, change combined to controllers and remove bare pods and replica sets
Since we still need to map through replica sets to find matching deployments, we simply filter them out as a post-step.
2017-06-27 10:19:04 -07:00
Mike Lang
889972c48a Display node type on k8s controller nodes
Since there are multiple types in the same topology, displaying the type is important.
We do this in multiple places:

* Add node type to minor label

* Add node type as metadata and include in metadata template.
  Even though this will always be the same for every node of that topology, this was
  the easiest way to add it so it displays in the table view.
  Note we can't control ordering of columns in table view, it's always alphabetical.
2017-06-27 10:19:04 -07:00
jpellizzari
4f341cb1d2 Add new node shapes for k8s combined view
While we're there, adopt a consistent ordering for all places that shapes are listed
Order is least sides to most sides, with circle before polygons, and complex shapes (currently just Cloud) after.

On shape choices for topologies:
* Since the k8s logo is a heptagon, we want pods to be heptagons.
* Since triangle is 'a bit weird', we put it on the least-important type, replica sets.
* Pentagons look a little weirder than octogons (it's the lack of symmetry) so we put octogons on the most common (deployments)
2017-06-27 10:19:04 -07:00
Mike Lang
13b2ed69bd Improve renderer for combined view by refactoring Map2Parent
The existing technique of "reducing" the two rendered graphs for daemonsets and deployments
had a glaring issue that no connections would ever be made between nodes of different types,
since that information would've been discarded earlier in the process.
It also makes it hard to identify "parentless" pods.

This commit extends the Map2Parent function, teaching it:
	* To check multiple topologies for parents
	* To pass through nodes with no parents found without modification

Since we already had two 'modes' for what to do with nodes without parents,
and it would've been clunky to try to encode the third option into the existing PseudoNodeID
arg in some way, we instead split it into two args, with the first being an enum specifying
either the old pseudo node behaviour, the old drop behaviour, or the new keep behaviour.

We then use the new Map2Parent to map pods to:
	* A replica set, if it has one
	* A daemonset, if it has one
	* Itself, if neither of the above
and then map again from the results to any deployment, leaving as-is any nodes that
don't map to a deployment. Hence we are left with:
	* Deployments
	* Daemonsets
	* Replica sets, but only if they map to no deployment
	* Pods, but only if they map to none of the above
and connections between all these will be calculated correctly.
2017-06-27 10:19:04 -07:00
Mike Lang
d0cbf47c1c Add an option group to Combined view to select group type (daemonset or deployment)
This is a union set, so it will be suitable even as we continue to add more node types to this view.
2017-06-27 10:19:04 -07:00
Mike Lang
6dae014352 Add new view for 'combined' daemonset/deployment view
The idea is that this view shows all 'pods or groups of pods' at 'the highest level of abstraction'.
For now, we just show daemonsets and deployments.
2017-06-27 10:19:04 -07:00
Roland Schilter
651e52b5a5 Honor DOCKER_* env variables in probe and app
Changed default for flag `-app.docker` to use the DOCKER_* env variables
instead of hardcoded /var/run/docker.sock; uses docker's default if
no DOCKER_HOST defined, for both probe and app.

Fixes #1975
2017-06-27 17:14:49 +02:00
Matthias Radestock
286e481771 Merge pull request #2645 from weaveworks/2644-initial-ebpf-polarity
correct polarity of initial connections

Fixes #2644.
2017-06-26 09:10:46 +01:00
Matthias Radestock
80790e44db Merge pull request #2639 from weaveworks/2638-connection-pid-pollution
ensure connections from /proc/net/tcp{,6} get the right pid

Fixes #2638.
2017-06-26 09:09:44 +01:00
Matthias Radestock
b43003fd2b refactor: remove superfluous pointering 2017-06-25 11:25:51 +01:00
Matthias Radestock
bd6cdc44a8 refactor: extract some common code 2017-06-25 11:22:32 +01:00
Matthias Radestock
181a548122 correct polarity of initial connections
Fixes #2644
2017-06-25 11:08:24 +01:00
Matthias Radestock
30e0444914 ensure connections from /proc/net/tcp{,6} get the right pid
ProcNet.Next does not allocate Connection structs, for efficiency.
Instead it always returns a *Connection pointing to the same instance.
As a result, any mutations by the caller to struct elements that
aren't actually set by ProcNet.Next, in particular Connection.Proc,
are carried across to subsequent calls.

This had hilarious consequences: connections referencing an inode
which we hadn't come across during proc walking would be associated
with the process corresponding to the last successfully looked up
inode.

The fix is to clear out the garbage left over from previous calls.

Fixes #2638.
2017-06-25 10:59:58 +01:00
Matthias Radestock
bc9e0e3364 Merge pull request #2641 from weaveworks/2640-no-weave-run
make integration tests pass with latest Weave Net release (2.0)

Fixes #2640.
2017-06-25 10:55:13 +01:00
Matthias Radestock
b2f14a96c5 refactor: extract a couple of test helpers 2017-06-25 10:27:49 +01:00
Matthias Radestock
30168c520e don't look for 'weaveproxy' - it no longer exists
... as of Weave Net 2.0
2017-06-25 08:08:09 +01:00
Matthias Radestock
6ef8281ad0 replace weave run with use of weave proxy
since Weave Net 2.0 removed `weave run`.
2017-06-25 08:08:09 +01:00
Alfonso Acosta
40bb28a450 Merge pull request #2637 from weaveworks/2636-DNSSnooper-race
Avoid race conditions in DNSSnooper's cached domains
2017-06-24 01:53:16 +02:00
Alfonso Acosta
4006040cc1 Review feedback 2017-06-23 23:52:30 +00:00
Matthias Radestock
7e3c8b8cef Merge pull request #2635 from weaveworks/color-connected-once
performance: only color connected once
2017-06-23 12:22:32 +01:00
Alfonso Acosta
9778be760b Use a global lock instead 2017-06-23 09:18:51 +00:00
Mike Lang
20754ffd37 Merge pull request #2633 from weaveworks/mike/fix-none-option
Fix issues with union types
2017-06-22 19:11:26 -07:00
Alfonso Acosta
22a31fc5f1 Review feedback 2017-06-22 16:33:36 +00:00
Alfonso Acosta
4139494783 Avoid race conditions in DNSSnooper's cached domains 2017-06-22 12:58:57 +00:00
Filip Barl
36ee5db1da Improved rendering order of nodes/edges in Graph View (#2623)
* Rendering both nodes and edges from one component.

* Organized the render layers in a more readable manner.

* Rerendering optimization.

* Finer edge rendering layers.

* Moved the constants out of the component file.

* Typo fix.

* Include edge thickness in <Motion /> instead of fade-in effect.
2017-06-22 11:58:31 +02: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