Commit Graph

3564 Commits

Author SHA1 Message Date
Jordan Pellizzari
923dfd385f Merge pull request #2342 from weaveworks/2341-bidrectional-bug
Fix for inaccurate bidrectional edges on edge hover
2017-03-19 18:03:45 -07:00
Jordan Pellizzari
c7f6a07838 Changed client tests to use EDGE_ID_SEPARATOR constant 2017-03-19 17:30:26 -07:00
Mike Lang
286fe6b0be Merge pull request #2348 from weaveworks/mike/revert-k8s-filters
Revert "Merge pull request #2285 from weaveworks/mike/k8s-ns-in-container-view"
2017-03-17 14:29:37 -07:00
Mike Lang
d55c528fe2 Revert "Merge pull request #2285 from weaveworks/mike/k8s-ns-in-container-view"
This reverts commit 76ddc75fb8, reversing
changes made to 3ade2933eb.

We are rolling this back for now because it's causing a bug where sub-topologies
would have ~3000 repeated cases of the k8s filters, causing performance issues clientside.
2017-03-17 14:00:05 -07:00
jpellizzari
451f6b29de Changed edge ID separator 2017-03-17 10:55:32 -07:00
Jordan Pellizzari
93e76a94c1 Fix for inaccurate bidrectional edges on edge hover 2017-03-17 10:55:32 -07:00
Adam Harrison
d5b97f925d Merge pull request #2344 from weaveworks/fix-dynamodb-metric-label
Correct dynamoDB metric label
2017-03-17 06:09:11 -07:00
Adam Harrison
83c073fad0 Correct dynamoDB metric label
Discovered whilst attempting to resolve github.com/weaveworks/service/issues/1157
2017-03-17 12:09:40 +00:00
Jordan Pellizzari
3e2144544b Merge pull request #2340 from weaveworks/2237-scope-urls
Fixed url state copy/paste bug
2017-03-16 15:46:06 -07:00
jpellizzari
5da40d24c3 Fixed url state copy/paste bug 2017-03-16 15:02:06 -07:00
Mike Lang
76ddc75fb8 Merge pull request #2285 from weaveworks/mike/k8s-ns-in-container-view
When k8s present, allow filtering of containers by namespace
2017-03-16 14:56:10 -07:00
Mike Lang
b01e890475 When k8s present, allow filtering of containers by namespace
To facilitate this, we replace the existing functionality of updateFilters which
sets k8s topologies to have the filters [namespace, managed], to instead append the namespace filter
to any existing. This lets it apply to both k8s and container topologies without overwriting existing
container filters. We instead set the managed filter in the static definition.

This however has the side effect that the ordering of the namespace filter and the managed filter
in k8s topologies has been reversed, so it reads:
	Show Unmanaged | Hide Unmanaged
	foo | bar | default | baz | All Namespaces
instead of:
	foo | bar | default | baz | All Namespaces
	Show Unmanaged | Hide Unmanaged
2017-03-16 14:21:11 -07:00
Jordan Pellizzari
3ade2933eb Merge pull request #2339 from weaveworks/react-version
Bump react version
2017-03-16 11:29:08 -07:00
jpellizzari
fd0a19fdda Bumped react version 2017-03-16 10:21:58 -07:00
Bryan Boreham
2fe3216e0a Merge pull request #2331 from weaveworks/decode-byte-slice
Decode via byte slice for memcache and file read
2017-03-14 15:41:45 +00:00
Bryan Boreham
b085c80ef3 Decode via byte slice for memcache and file read
This is more efficient, since the decoder can read field names in-place.
It also appears to be absolutely faster.
2017-03-14 14:54:17 +00:00
Bryan Boreham
07c8265c6b Update ugorji/co/codec to latest commit 708a42d246822952f38190a8d8c4e6b16a0e600c 2017-03-14 14:54:17 +00:00
Alfonso Acosta
a12ccf65d6 Merge pull request #2327 from kinvolk/schu/ebpf-proc-fallback
eBPF proc fallback
2017-03-14 07:40:31 -07:00
Michael Schubert
21047dc77f Add 313_container_to_container_edge_with_ebpf_proc_fallback_test.sh 2017-03-14 13:59:09 +01:00
Michael Schubert
22ae6c45a0 Implement ebpf proc fallback 2017-03-14 13:59:09 +01:00
Michael Schubert
5f2ba891a4 endpoint/reporter: only stop scanner if not nil 2017-03-14 11:56:04 +01:00
Michael Schubert
ce904fc56c Remove redundant arg from newEbpfTracker 2017-03-14 11:56:04 +01:00
Alfonso Acosta
250718d693 Merge pull request #2326 from kinvolk/schu/scope-dry-run
scope: use same Docker args for early dry run
2017-03-14 03:53:11 -07:00
Michael Schubert
5f85256055 scope: use same Docker args for early dry run
`launch` first does a `scope --dry-run` to parse and validate Scope
cmdline arguments before starting the main Scope container and
processes. Use the same Docker args for the dry run to make sure the
container has the same privileges and mount points. Otherwise valid
`$WEAVESCOPE_DOCKER_ARGS` might fail here.
2017-03-14 09:51:11 +01:00
jpellizzari
f975c12cf9 Change to re-fetch topologies on instance switch 2017-03-13 15:48:51 -07:00
Jordan Pellizzari
8dea285b6c Merge pull request #2317 from weaveworks/875-edge-arrows
Add edge arrows
2017-03-13 10:52:44 -07:00
jpellizzari
9b648834ee removed old marker code 2017-03-13 09:03:50 -07:00
jpellizzari
376e6f014e Added edge arrows 2017-03-10 12:10:51 -08:00
Matthias Radestock
456ac0bfb3 Merge pull request #2316 from weaveworks/2315-empty-proc-cmdline
fall back to /proc/<pid>/comm for process name

Fixes #2315
2017-03-09 15:35:34 +00:00
Matthias Radestock
245c2e9149 fall back to /proc/<pid>/comm for process name
when proc/<pid>/cmdline is empty, which is the case for some system
and defunct processes.

Fixes #2315
2017-03-09 14:02:32 +00:00
Alfonso Acosta
1d18ba6f13 Merge pull request #2314 from kinvolk/alban/disable-internet-edge-test
integration: disable tests with internet edge
2017-03-09 05:45:11 -08:00
Alban Crequy
b70f047407 integration: disable tests with internet edge
They are currently flaky.

See https://github.com/weaveworks/scope/issues/2308
2017-03-09 13:21:58 +01:00
Alfonso Acosta
6a22e7fd58 Merge pull request #2135 from kinvolk/iaguis/conn-perf-ebpf-guess
Add eBPF connection tracking without dependencies on kernel headers
2017-03-09 00:56:42 -08:00
Iago López Galeiras
6d55a344a6 integration: add tests for eBPF 2017-03-08 22:11:12 +01:00
Iago López Galeiras
0e05198162 integration: remove check if on us-central-1
There's no obvious reason why those tests can only be run on
us-central-1, remove the check.

It was added with 1577b90c6
2017-03-08 22:11:12 +01:00
Iago López Galeiras
9920c4ea48 Add eBPF connection tracking without dependencies on kernel headers
Based on work from Lorenzo, updated by Iago, Alban, Alessandro and
Michael.

This PR adds connection tracking using eBPF. This feature is not enabled by default.
For now, you can enable it by launching scope with the following command:

```
sudo ./scope launch --probe.ebpf.connections=true
```

This patch allows scope to get notified of every connection event,
without relying on the parsing of /proc/$pid/net/tcp{,6} and
/proc/$pid/fd/*, and therefore improve performance.

We vendor https://github.com/iovisor/gobpf in Scope to load the
pre-compiled ebpf program and https://github.com/weaveworks/tcptracer-bpf
to guess the offsets of the structures we need in the kernel. In this
way we don't need a different pre-compiled ebpf object file per kernel.
The pre-compiled ebpf program is included in the vendoring of
tcptracer-bpf.

The ebpf program uses kprobes/kretprobes on the following kernel functions:
- tcp_v4_connect
- tcp_v6_connect
- tcp_set_state
- inet_csk_accept
- tcp_close

It generates "connect", "accept" and "close" events containing the
connection tuple but also pid and netns.
Note: the IPv6 events are not supported in Scope and thus not passed on.

probe/endpoint/ebpf.go maintains the list of connections. Similarly to
conntrack, it also keeps the dead connections for one iteration in order
to report short-lived connections.

The code for parsing /proc/$pid/net/tcp{,6} and /proc/$pid/fd/* is still
there and still used at start-up because eBPF only brings us the events
and not the initial state. However, the /proc parsing for the initial
state is now done in foreground instead of background, via
newForegroundReader().

NAT resolution on connections from eBPF works in the same way as it did
on connections from /proc: by using conntrack. One of the two conntrack
instances is only started to get the initial state and then it is
stopped since eBPF detects short-lived connections.

The Scope Docker image size comparison:
- weaveworks/scope in current master:  22 MB (compressed),  68 MB
  (uncompressed)
- weaveworks/scope with this patchset: 23 MB (compressed), 69 MB
  (uncompressed)

Fixes #1168 (walking /proc to obtain connections is very expensive)

Fixes #1260 (Short-lived connections not tracked for containers in
shared networking namespaces)

Fixes #1962 (Port ebpf tracker to Go)

Fixes #1961 (Remove runtime kernel header dependency from ebpf tracker)
2017-03-08 22:11:12 +01:00
Iago López Galeiras
6ede5e5c91 vendor: add weaveworks/tcptracer-bpf 2017-03-08 22:11:12 +01:00
Iago López Galeiras
d77a297ebf vendor: add iovisor/gobpf 2017-03-08 22:11:12 +01:00
Jordan Pellizzari
743ead7678 Merge pull request #2290 from weaveworks/cancel-polling
Add logic to turn off network requests when Scope dismounts
2017-03-08 11:36:19 -08:00
jpellizzari
38d2b8ddff Added more granular JS API exports 2017-03-08 10:54:56 -08:00
Filip Barl
d3779a6111 Merge pull request #2291 from weaveworks/fix-search-throb-animation
Remove the throb animation for graph view search matches
2017-03-08 19:40:54 +01:00
Alfonso Acosta
052ff39bf1 Merge pull request #2309 from weaveworks/2258-fix-kubelet-access
Fix kubelet failure fallback and make port configurable
2017-03-08 10:15:21 -08:00
Alfonso Acosta
380d6cf8ba Merge pull request #2312 from weaveworks/secure-integration-tests
Secure integration tests
2017-03-08 08:27:04 -08:00
Alfonso Acosta
a7d37ed366 Merge commit 'b92447c6abbc8f8e6f1d33a8a4c961ba340dbf23' into secure-integration-tests 2017-03-08 16:23:06 +00:00
Alfonso Acosta
b92447c6ab Squashed 'tools/' changes from 52d695c..9e32194
9e32194 Secure GCP servers for Scope: open port 80.
a22536a Secure GCP servers for Scope.
89c3a29 Merge pull request #78 from weaveworks/lint-merge-rebase-issue-in-docs
73ad56d Add linter function to avoid bad merge/rebase artefact

git-subtree-dir: tools
git-subtree-split: 9e32194cf16f8f6eee7acb5dbf311c9003f0fedb
2017-03-08 16:23:04 +00:00
Alfonso Acosta
4c4b21ec66 Revert "Don't run integration tests, as the VMs are being compromised."
This reverts commit 093c21c207.
2017-03-08 14:43:33 +00:00
Tom Wilkie
093c21c207 Don't run integration tests, as the VMs are being compromised. 2017-03-08 14:30:15 +00:00
Alfonso Acosta
8bf753a51b Revert "Revert "Add options to hide args and env vars (#2306)"" (#2311)
* Revert "Revert "Add options to hide args and env vars (#2306)""

* Make linter happy
2017-03-08 02:16:42 -08:00
Matthias Radestock
1e53d590c7 Merge pull request #2310 from weaveworks/revert-2306-wip-2222
Revert "Add options to hide args and env vars (#2306)"
2017-03-08 06:01:17 +00:00
Matthias Radestock
69c80828d0 Merge pull request #2305 from weaveworks/quantise-reports
quantise reports
2017-03-08 05:27:48 +00:00