Commit Graph

952 Commits

Author SHA1 Message Date
Bryan Boreham
fc518cb602 Merge branch '3810-cordon-control' 2021-05-20 15:53:24 +00:00
Bryan Boreham
f800f6457b Use const for host topology name 2021-05-18 14:08:45 +00:00
Bryan Boreham
dacfd66e4d cosmetic: remove trailing space 2021-05-17 17:37:15 +00:00
Deepak
c3cd3afad9 probe: merge controls from different probes
This change creates a host topology from cluster-wide probe using
kubernetes nodes with cordon/un-cordon control. This also adds the
logic to merge the controls coming from different probes for host
topology.
2021-04-19 00:10:52 +05:30
vibhutisawant
dddd5e1b8e Adds s390x support 2021-04-12 19:15:13 +05:30
Deepak
5f0a605643 sync with master 2021-04-10 17:38:13 +05:30
Deepak
71b4409958 probe: move cordon buttons to kubernetes probe 2021-01-18 23:46:21 +05:30
Bryan Boreham
9aa9b1ae70 Merge pull request #3797 from weaveworks/update-build-tools
Update build tools
2021-01-18 10:50:31 +00:00
Bryan Boreham
103ea2095f Fix lint warnings in Go code
All cosmetic.
2020-12-30 18:30:34 +00:00
Bryan Boreham
18acfcefe1 Run go fmt on various files
Seems that go fmt has changed behaviour since these files were last
checked in.  Changes are all cosmetic.
2020-12-30 18:30:34 +00:00
Deepak
ce2180f24e probe: add cordon controls inside tagger 2020-10-30 23:39:56 +05:30
Deepak
e00b45a982 Merge remote-tracking branch 'upstream/master' into 3810-cordon-control 2020-10-23 19:23:36 +05:30
Deepak
bc0ce66f77 probe: update capture node and add cordon toggle 2020-10-17 23:26:12 +05:30
Deepak
9d24bc4eba probe: add node cordon control
this adds a control to cordon a node which
prevents any workload to be scheduled on the node.

Fixes #3810
2020-10-11 23:16:57 +05:30
Bryan Boreham
3d2a52f2fc Fix up test for go1.14 change 2020-10-08 11:51:29 +00:00
Bryan Boreham
7163f42170 Merge pull request #3785 from weaveworks/go-1-14-2
Update tools: Go 1.4.2 and JS kind-of 6.0.3
2020-05-20 11:17:44 +01:00
Bryan Boreham
01804cb69d Merge pull request #3754 from CiMaol/dev/removeKubeletPort
Removed kubelet port flag. Node name now always need from env/flag
2020-05-18 12:27:06 +01:00
Bryan Boreham
f0e43aa020 fix(probe): wait for ebpf tracker to stop on exit
We should have done this anyway, but I haven't noticed the error
previously. Possibly Go 1.14 is more aggressive about exiting when
some goroutines are still active.
2020-05-10 15:30:28 +00:00
Bryan Boreham
24197bc71e fix (pipes): silence EOF error
This comes back when an operation like Kubernetes Describe finishes;
hide it so we don't print as an error.
2020-05-06 10:04:44 +00:00
Bryan Boreham
323aa46d1c fix (pipes): check websocket errors inside CopyToWebsocket()
Previously we were treating EOF on the reader as no-error, meaning
that operations like Kubernetes Describe would retry endlessly when
finished.
2020-05-06 10:04:40 +00:00
Bryan Boreham
951d7a1412 fix (probe): skip publishing empty reports
If the probe is configured with `spy.interval` greater than
`publish.interval`, the report to be published can be completely
blank.  In that case, skip publishing it so the next time we do have
some data the time-window is correct.
2020-03-27 09:59:09 +00:00
Bryan Boreham
6947cf19da Slow down DNS poll interval
There's no reason to expect anyone is changing their DNS that fast,
and the probe queries all endpoints every time it polls so slowing
down will reduce effort.
2020-03-12 16:54:44 +00:00
cimaol
c301d3e93c altered nodeName checking for Scope cluster role 2020-03-10 10:07:59 +00:00
cimaol
19fae5bc7d Removed kubelet port flag. Node name now always need from env/flag 2020-03-10 09:02:32 +00:00
Bryan Boreham
72145dc378 Set the Window duration which each report covers
This is used by the multi-tenant code.
2020-03-06 15:43:54 +00:00
Bryan Boreham
3098267be4 Add a timestamp on each report saying when it was generated
Not currently used in the code, but useful when troubleshooting.
2020-03-06 15:39:06 +00:00
Bryan Boreham
a47cf0a2aa Remove copying Merge() on Report
It was only used in a few places, and all of those were better off
using the Unsafe variant.
2020-03-06 15:03:43 +00:00
Bryan Boreham
574c76ac40 Merge pull request #3709 from weaveworks/report-endpoint-subset
Report a subset of connections from/to the same endpoint
2020-01-27 22:42:47 +00:00
Bryan Boreham
7dc7215a26 Refactor: improve readability based on review feedback 2020-01-23 15:04:51 +00:00
Bryan Boreham
53297eb07c Merge pull request #3743 from weaveworks/more-pause
kubernetes: detect more 'pause' containers
2020-01-23 14:43:06 +00:00
Bryan Boreham
880daa78ff Extend K8s tagger test to cover pause containers 2020-01-23 11:47:40 +00:00
Bryan Boreham
92b8a489e7 kubernetes: detect more 'pause' containers
Dockershim has added a label `io.kubernetes.docker.type` for at least
four years, where the pause container is of type `podsandbox`.  This
should be more reliable than trying to keep up with everyone's name
for the pause container.
2020-01-15 10:26:10 +00:00
Bryan Boreham
1dcdfab05a fixup: from review feedback
Fix a logic error in ECS scale-down button, bad copy/paste in
ActiveControls() and neaten the switch cases in container controls.

Co-Authored-By: Filip Barl <filip@weave.works>
2020-01-13 14:48:38 +00:00
Bryan Boreham
b7b245ed48 tests: connection subset testing
Utility functions to create fake sets of connections for testing, and
then exercising the subset filtering code to check that quantities
come out as expected.
2020-01-13 08:59:51 +00:00
Bryan Boreham
de3c34ddc6 performance(probe): thin out many connections between the same point
The app will only show one line, regardless of how many connections we
have, so reduce the number to save bandwidth and rendering time.

We filter by choosing a modulus, e.g. send every connection that is a
multiple of 3, or 9, and so on. We avoid multiples of 2 because port
numbers are often a multiple of 2 or 4 for bit-encoding reasons.
2020-01-13 08:53:47 +00:00
Bryan Boreham
fc46ea17ee refactor(probe/ebpf): track connections by four-tuple+namespace
The previous code tracked only by four-tuple, which meant that two
connections with same address/port combinations in different namespace
would clash and one would get dropped.

Also previously the tuple was duplicated between the map key and
value, so we remove it from the value.

We only add the namespace in the case that the local address is
loopback, which matches how the rest of Scope treats addresses.
2020-01-13 08:53:47 +00:00
Bryan Boreham
9758c81736 comment: add explanatory comment on handleFdInstall() 2020-01-13 08:53:47 +00:00
Bryan Boreham
d57a4df3b2 enhancement(probe): debug message for initial connection 2020-01-13 08:53:47 +00:00
Bryan Boreham
2767e2b319 improvement: only record connections that we have a PID for 2020-01-13 08:53:47 +00:00
Bryan Boreham
a6da810261 refactor(probe): move host/pid encoding into addConnection() function 2020-01-13 08:53:47 +00:00
Bryan Boreham
c88be40b19 performance: Update plugins to new-style controls data 2019-11-26 11:29:42 +00:00
Bryan Boreham
85d2f6309c performance: Send active controls as a single string per node
Instead of a whole extra data structure which is quite expensive to
marshal and unmarshal, just send the information in a string.  No
clever merging strategy is required - the states are all set in one
place per node type.
2019-11-26 11:29:42 +00:00
Bryan Boreham
5ebe9b4b18 Merge pull request #3720 from DarthSett/master
Adding the "user-agent" Header
2019-11-26 11:19:36 +00:00
Sumit Lalwani
1ce7707f25 Update pod status to terminating
Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>
2019-11-25 11:31:48 +05:30
DarthSett
ccfd2f0427 Added test to check user-agent header 2019-10-28 19:34:22 +05:30
DarthSett
4eab46670e Update user-agent in probe/appclient/probe_config.go
Co-Authored-By: Filip Barl <filip.barl@gmail.com>
2019-10-25 19:31:17 +05:30
DarthSett
af31e30439 Add user-agent header 2019-10-25 12:33:35 +05:30
“DarthSett”
7adc70c5a5 add the user-agent header 2019-10-23 16:35:57 +05:30
rahul agrawal
0000173c05 add the user-agent header 2019-10-23 16:31:59 +05:30
Bryan Boreham
b9f10e9b73 refactor(probe/ebpf): make ebpf setup safer
It was possible for `t.ebpfTracker` to change underneath this code
while running on a background goroutine, so change it to take
`ebpfTracker` as a parameter.

While we're here, rename the functions to better match what they do.
2019-10-14 11:25:04 +00:00