Commit Graph

4098 Commits

Author SHA1 Message Date
Matthias Radestock
d14acfb263 Merge pull request #2734 from weaveworks/2508-ecs-nil-defence
defend against nils
2017-07-20 16:32:40 +01:00
Matthias Radestock
d368854b90 defend against nils
Fixes #2508. Hopefully.
2017-07-20 15:59:59 +01:00
Matthias Radestock
0c505ced9c Merge pull request #2715 from weaveworks/2615-docker-args
only pass WEAVESCOPE_DOCKER_ARGS to actual probe/app start
2017-07-20 13:47:33 +01:00
Alfonso Acosta
a4320adfd1 Merge pull request #2723 from weaveworks/2345-backoff-on-dynamo-and-s3
Back off when writing to Dynamo and S3
2017-07-20 14:05:29 +02:00
Alfonso Acosta
7b4b410f4a Review Feedback 2017-07-20 11:01:44 +00:00
Alfonso Acosta
c6d5a6a646 Make linter happy 2017-07-20 10:05:48 +00:00
Mike Lang
4d2b4541c9 Merge pull request #2724 from weaveworks/mike/k8s/jobs-and-petsets
kubernetes: Add StatefulSets and CronJobs
2017-07-19 16:27:53 -07:00
Mike Lang
fe3bdbfcdc probe/kubernetes: Speed up lookups of large lists of cronjobs and jobs
Currently joining the two lists is O(mn), by putting into a hashmap first it's O(m+n)
2017-07-19 11:31:43 -07:00
Mike Lang
316ae2947c Fiddle with k8s topology shapes again
Final list of shapes for controllers view, with rationale:
Heptagon for Deployment - same shape as Service, which typically have a corresponding Deployment
Triangle for CronJob - weird shape for weird thing
Pentagon for DaemonSet - because pentagons and daemon worship :P
Octagon for StatefulSet - last shape left
2017-07-19 11:16:59 -07:00
Roland Schilter
4f1d02f590 Merge pull request #2720 from weaveworks/2716-fix-newVersion-notification-not-showing
Fix New Version notification not showing
2017-07-19 11:45:29 +02:00
Mike Lang
7462aaae1e Merge pull request #2726 from weaveworks/mike/render/fix-no-pods-minor-label
render: In minor labels, display '0 things' instead of blank if zero things present
2017-07-18 12:51:19 -07:00
Mike Lang
ac96738ad0 render: In minor labels, display '0 things' instead of blank if zero things present
This also fixes a bug where k8s controller nodes would show up as 'Deployment of' without any number
2017-07-18 11:44:51 -07:00
Mike Lang
38814d54a6 deployment: Fix usage of Spec.Replicas, which is a pointer
Spec.Replicas is a *int32, with a value of nil occurring when the user doesn't set it.
In this case k8s defaults to 1, so we mimic this to show the effective value.
2017-07-18 11:35:50 -07:00
Mike Lang
481258d8fc kubernetes probe: Collect info on cronjobs and statefulsets
Most of the time you only care about cronjobs, not the jobs that make them up,
so we only collect full cronjob data. We associate pods of jobs with the parent cronjob
2017-07-18 11:35:50 -07:00
Mike Lang
17fffb32e1 Add stateful sets and cronjobs to Controllers renderer
Since renderKubernetesTopologies was getting unweildy, refactored into a form
which was a bit clearer, if a bit more verbose.
2017-07-18 11:35:50 -07:00
Mike Lang
9fb6c46467 Add report topologies for Stateful Sets, Cron Jobs 2017-07-18 11:35:50 -07:00
Alfonso Acosta
f66d79d427 Backoff when writing to Dynamo and S3 2017-07-18 15:28:08 +00:00
Alfonso Acosta
57f2e6a083 Merge pull request #2719 from weaveworks/update-weave-client-to-2.0
Gather Weave Net plugin and proxy info from report
2017-07-18 11:01:55 +02:00
Roland Schilter
1f784ad5fa Fix New Version notification not showing
Fixes #2716.
2017-07-17 16:32:27 +02:00
Alfonso Acosta
b7d292e161 Gather Weave Net plugin and proxy info from report
Instead of using Docker, because after Weave Net 2.0 there are no proxy nor
plugin containers.

This has the drawback of not detecting the plugin/proxy in systems running
Weave Net < 2.0 , but I think we can live with it.
2017-07-17 13:23:37 +00:00
Roland Schilter
a6d3542c89 Merge pull request #2713 from weaveworks/2708-reset-nodes-when-scope-app-restarted
Reset nodes in frontend when scope-app restarted
2017-07-14 19:02:41 +02:00
Matthias Radestock
86c9544066 remove superfluous shellchecks 2017-07-14 10:59:27 +01:00
Matthias Radestock
bf8b28ca12 no need to pass CHECKPOINT_DISABLE when not starting probe/app 2017-07-14 10:59:27 +01:00
Matthias Radestock
e19c33b4c2 only pass WEAVESCOPE_DOCKER_ARGS to actual probe/app start
and not all the help, version, etc, etc docker runs.

In particular this allows passing `--restart=...` in
WEAVESCOPE_DOCKER_ARGS. Previously that would break since the
non-probe/app docker runs supply `--rm` (as they should) which is
incompatible with restart settings.
2017-07-14 10:59:26 +01:00
Roland Schilter
a3cd4573b8 Merge pull request #2692 from weaveworks/nodejs-package-version-reset
Set package.json version to 0.0.0
2017-07-14 10:24:46 +02:00
Roland Schilter
2ca81217b7 Merge pull request #2710 from weaveworks/2646-keep-toponav-visible-if-selected
Keep topo nav visible if subnav selected
2017-07-14 09:49:36 +02:00
Bryan Boreham
8a83a592ab Merge pull request #2556 from weaveworks/local-pods-via-node-name
Use Kubernetes node name to filter pods if possible
2017-07-13 19:23:23 -07:00
Matthias Radestock
dcf839e621 Merge pull request #2714 from weaveworks/simplify-connection-join-2
simplify connection join
2017-07-13 18:56:45 +01:00
Bryan Boreham
88ca9812b2 Fix up tests for change to NewReporter() 2017-07-13 16:24:17 +00:00
Bryan Boreham
3e9eb83d12 Use Kubernetes node name to filter pods if possible 2017-07-13 16:24:17 +00:00
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
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
e9945e78cb Keep topo nav visible if subnav selected
Follow-up to 21a0093c but also displays parent topology if
an empty sub_topology is selected.
2017-07-12 18:53:33 +02: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