Commit Graph

4061 Commits

Author SHA1 Message Date
Roland Schilter
5329efa528 Reset nodes in frontend when scope-app restarted
When the scope-app restarts, it no longer has a
reference to the previous node set. Therefore,
the delta update adds *all* nodes but does not
remove legacy ones.

`reset==true` tells the frontend to start fresh.

Fixes #2708
2017-07-13 14:28:17 +02:00
Matthias Radestock
e603a28ca4 Merge pull request #2704 from weaveworks/2689-2700-ebpf-init
don't miss, or fail to forget, initial connections

Fixes #2689.
Fixes #2700.
2017-07-13 11:39:31 +01:00
Roland Schilter
52d0fcc944 Merge pull request #2709 from weaveworks/2646-keep-toponav-visible-if-selected
Keep topology nav visible if selected
2017-07-12 17:44:14 +02:00
Roland Schilter
21a0093c08 Keep topology nav visible if selected
If the scope-app API unexpectedly restarts, it has no report
at hand (until it gets one from the probe) and sends node
count 0 to the frontend for all topologies. Once the report
arrives, it will send the proper count.

What happened was the frontend did hide Processes for a short
time till the node count recovered. This moved the topology
selection to the always visible Containers (hide_if_empty == false)
while keeping the graph as is.

Once the node count recovers, Processes comes back but the
selection is still at Containers.

We now keep the selected topology visible at all time even if
the API returns a node count of 0. This recovers nicely when
the correct node counts come in. Once the user selects a different
topology while and a backend response arrives, it disappears.

Fixes #2646
2017-07-12 17:12:43 +02:00
Matthias Radestock
4355f73226 Merge pull request #2705 from weaveworks/bump-tcptracer-bpf-version
bump tcptracer-bpf version
2017-07-12 08:39:27 +01:00
Matthias Radestock
b087e95711 bump tcptracer-bpf version 2017-07-12 07:27:35 +01:00
Matthias Radestock
b39b3e6274 re-add tests that were previously failing when using ebpf 2017-07-11 22:50:47 +01:00
Matthias Radestock
ebc3cddf01 don't miss, or fail to forget, initial connections
...when initialising eBPF-based connection tracking.

Previously we were ignoring all eBPF events until we had gathered the
existing connections. That means we could a) miss connections created
during the gathering, and b) fail to forget connections that got
closed during the gathering.

The fix comprises the following changes:

1. pay attention to eBPF events immediately. That way we do not
miss anything.

2. remember connections for which we received a Close event during the
initalisation phase, and subsequently drop gathered existing
connections that match these. That way we do not erroneously consider
a gathered connection as open when it got closed since the gathering.

3. drop gathered existing connections which match connections detected
through eBPF events. The latter typically have more / current
metadata. In particular, PIDs can be missing from the former.

Fixes #2689.
Fixes #2700.
2017-07-11 22:50:47 +01:00
Matthias Radestock
25a1a5fbb5 Merge pull request #2699 from weaveworks/ebpf-refactor
EbpfTracker refactoring / cleanup
2017-07-11 20:06:32 +01:00
Matthias Radestock
d568c50ec4 make EbpfTracker.dead go-routine-safe and .stop() idempotent
Without synchronisation, the isDead() call might return a stale value,
delaying deadness detection potentially indefinitely.

Without the guards / idempotence in .stop(), invoking stop() more than
once could cause a panic, since tracer.Stop() closes a channel (which
panics on a closed channel). Multiple stop() invocations are rare, but
not impossible.
2017-07-11 19:38:07 +01:00
Matthias Radestock
cf6353327a eliminate race in ebpf initialization
We were enabling event processing before feeding in the initial
connections, which results in a non-deterministic outcome.
2017-07-11 19:38:07 +01:00
Matthias Radestock
15215d0c2c prevent concurrent map access in ebpf fd install event handler
which presumably could cause havoc
2017-07-11 19:38:07 +01:00
Matthias Radestock
3883d8f1af fix a minor leak in ebfp fdinstall_pids table
when we got an fd install event but the pid was dead by time we
processed it, we would fail to remove the watcher for that pid from
the fdinstall_pids table.

This is a minor, and bounded, leak, since the table only contains pids
that were alive when we initialized ebpf. And this change only plugs
that leak very partially, since we will never remove pids that die
while sitting in accept().
2017-07-11 19:38:07 +01:00
Matthias Radestock
e2cbe7ac26 refactor: a bit of inlining 2017-07-11 19:38:06 +01:00
Matthias Radestock
3baeb3d238 refactor: use fourTuple as map key instead of string 2017-07-11 19:38:06 +01:00
Matthias Radestock
ad7b5cdc19 refactor: remove pointless interface
premature abstraction
2017-07-11 19:38:06 +01:00
Matthias Radestock
8a56540648 refactor: eliminate global var 2017-07-11 19:38:06 +01:00
Matthias Radestock
8bd0188537 respect UseConntrack setting in ebpf initialisation 2017-07-11 19:37:11 +01:00
Matthias Radestock
7ea0800f8b refactor: extract helper to get initial flows 2017-07-10 07:34:20 +01:00
Matthias Radestock
07e7adbd63 refactor: make performFlowWalk data flow more obvious 2017-07-10 07:22:12 +01:00
Matthias Radestock
1abc886fbd Merge pull request #2695 from weaveworks/2687-ebpf-init-race-segfault
fix ebpf init race segfault

Fixes #2687
2017-07-07 21:55:49 +01:00
Filip Barl
a390c7633e Make graph layout zoom limits constant (#2678)
* Make zoom limits such that nodes are always between 1px and 200px big.

* Increased minimal node size from 1px to 3px.
2017-07-07 19:52:42 +02:00
Filip Barl
8f22d58cab Last line of defense against overlapping nodes in graph layout (#2688)
* Refresh the layout once more at the end if previous heuristics cause an overlap.

* Added mixpanel tracking.
2017-07-07 19:22:04 +02:00
Roland Schilter
7f078a8a09 Merge pull request #2694 from weaveworks/yarn-pack-is-not-npm-pack
Fix `yarn pack` ignoring directory cli flag
2017-07-07 15:55:00 +02:00
Roland Schilter
202e1569e5 Fix yarn pack ignoring directory cli flag 2017-07-07 13:00:23 +02:00
Matthias Radestock
19e45ec248 refactor: eliminate global var 2017-07-07 10:18:43 +01:00
Matthias Radestock
8cf79b2e4a bump tcptracer-bpf version and use it to fix race
We defer starting the ebpf tracer until we've set the global var which
is referenced by the callback functions. Previously the var could be
unset when the callbacks are invoked, resulting in a segfault.

Fixes #2687.
2017-07-07 06:56:28 +01:00
Roland Schilter
683312ebc1 Merge pull request #2691 from weaveworks/fix-build-pkg-version
Yarn prefixes version with `v` when packing
2017-07-06 22:47:46 +02:00
Roland Schilter
c3ee9cda91 Yarn prefixes version with v when packing 2017-07-06 22:13:21 +02:00
Matthias Radestock
e48c067367 Merge pull request #2690 from weaveworks/2689-limit-ebpf-tests
don't use eBPF in a couple of tests
2017-07-06 19:27:32 +01:00
Matthias Radestock
672beb64fa don't use eBPF in a couple of tests
There really should be two variants - with and without eBPF - but the
latter is broken due to #2689.
2017-07-06 18:26:28 +01:00
Filip Barl
8f2d47ce4e Time travel redesign (#2651)
* Initial top level control.

* Added the jump buttons.

* Tiny styling adjustments.

* Massive renaming.

* Pause info

* Added slider marks.

* Improved messaging.

* Freeze all updates when paused.

* Repositioned for Configure button.

* Improved the flow.

* Working browsing through slider.

* Small styling.

* Hide time travel button behind the feature flag.

* Fixed actions.

* Elements positioning corner cases.

* Removed nodes delta buffering code.

* Fixed the flow.

* Fixed almost all API call cases.

* Final touches

* Fixed the tests.

* Fix resource view updates when time travelling.

* Added some comments.

* Addressed some of @foot's comments.
2017-07-06 16:06:55 +02:00
Roland Schilter
cf8a95c878 Merge pull request #2683 from weaveworks/table-overflow-plus-one
Show table overflow only if limit exceeded by 2+
2017-07-06 15:50:11 +02:00
Roland Schilter
dfda3e0b0b Show table overflow only if limit exceeded by 2+
Having to toggle a +1 feels weird while that +1 takes up
the same vertical space as displaying that row.
2017-07-06 13:56:03 +02:00
Roland Schilter
0dbea45e1e Merge pull request #2676 from weaveworks/2606-update-readme-to-use-yarn
Update README/Makefile/package.json to use yarn
2017-07-06 13:33:48 +02:00
Alfonso Acosta
13fa738290 Merge branch 'release-1.5' 2017-07-05 21:11:33 +00:00
Mike Lang
1a2ad9c013 Merge pull request #2685 from weaveworks/mike/render/fix-map2parent-pseudo-id
render/pod: Fix a typo in Map2Parent where UnmanagedID will always be used for noParentsPseudoID
2017-07-05 14:02:38 -07:00
Alfonso Acosta
af3b8cfabf Update doc versions v1.5.1 2017-07-05 20:43:15 +00:00
Matthias Radestock
d22d9d0768 Merge pull request #2682 from weaveworks/2681-image-counts
don't show container count in host detail panel image list

Fixes #2681.
2017-07-05 20:39:33 +01:00
Matthias Radestock
fd4f1f9d42 Merge pull request #2680 from weaveworks/2629-host-image-list
correct determination of a host's container images
2017-07-05 20:38:32 +01:00
Mike Lang
399cca026c render/pod: Fix a typo in Map2Parent where UnmanagedID will always be used for noParentsPseudoID
Thankfully we only ever set it to UnmanagedID right now, so no user-facing bug.
2017-07-05 11:33:06 -07:00
Alfonso Acosta
d38854fbda Release 1.5.1 2017-07-05 18:14:06 +00:00
Matthias Radestock
3d96174788 correct polarity of initial connections
Fixes #2644
2017-07-05 18:11:34 +00:00
Matthias Radestock
bfd53d28e5 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-07-05 18:11:24 +00:00
Matthias Radestock
c7a3f7c2fd Merge pull request #2675 from weaveworks/less-copy
refactor: remove unnecessary and dead Copy()
2017-07-05 14:33:31 +01:00
Matthias Radestock
0f4d17d868 don't show container count in host detail panel image list
The figure is inaccurate since it counts containers across all
hosts. Getting the count correct is non-trivial, so it's better to not
show the figure at all.

NB: the count still shows up on mouse-over of the link, but that is
defensible and not (very) confusing since the link represents the
image, not the image on a particular host, and it's the same count
that show up as the minor label in the container images view.

Fixes #2681.
2017-07-05 14:03:44 +01:00
Simon
77ba8aa8b3 Merge pull request #2666 from weaveworks/2660-fix-pid-truncation
Prevents 6 digit pids from being truncated in details panel/table mode
2017-07-05 14:27:56 +02:00
Simon
6310b48937 Switch to 56px small cols to fit in 6 digit pids 2017-07-05 14:27:34 +02:00
Simon
899c708593 Merge pull request #2648 from weaveworks/2627-node-grid-multiple-relatives
Show multiple relatives in the nodes-grid view
2017-07-05 14:25:55 +02:00
Matthias Radestock
a0fb2e1d73 cosmetic(ish) 2017-07-05 12:49:23 +01:00