852 Commits

Author SHA1 Message Date
Akash Srivastava
60a1c66430 Fix one pod to multiple PVC connection
Read all the PVC source from a pod spec
and add adjacency between the pod and its PVCs.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2019-01-13 20:10:51 +05:30
CarlosEDP
4f8fc5e010 Add ARM64 build 2019-01-02 12:08:49 -02:00
Bryan Boreham
fb9c9e0140 Subtract page cache from container memory usage
So that Scope numbers match Docker numbers.
2018-11-21 16:07:57 +00:00
Bryan Boreham
476ef275e6 Merge pull request #3298 from weaveworks/conntrack-netlink-upstream
Probe: use netlink to talk to conntrack
2018-11-20 11:14:56 +00:00
Bryan Boreham
94dbee2124 Move "hideous hack" for Kubernetes service network from probe to app
This avoids side-effects from reporting Kubernetes from a
cluster-level probe, and removes a lie from the probe data.

Rather than do the work every time the probe sends a report, we do it
every time the app renders endpoints, which should be once per merged
report set.
2018-11-19 14:54:20 +00:00
Bryan Boreham
c732fee433 Don't add closed connections to 'activeFlows' 2018-11-14 15:34:58 +00:00
Bryan Boreham
95ce2cb1a8 Add build constraint on Linux-only features
Split Reporter into Linux and non-Linux parts, and stubbed it out for
non-Linux targets.
2018-11-14 15:34:58 +00:00
Bryan Boreham
01ef6a104d Eliminate connectionTrackerConfig struct 2018-11-14 15:34:58 +00:00
Bryan Boreham
e3d42676a3 Add back some parts of the original cli code 2018-11-14 15:34:58 +00:00
Bryan Boreham
71c59e87d1 Update comment 2018-11-14 15:34:58 +00:00
Bryan Boreham
f4dc368955 Don't buffer TIME_WAIT flows on conntrack start-up
When the probe first starts we should only be interested in active
connections, and if the loop re-starts it's probably because too many
connections are opening and closing to keep up with, so it's good to
drop any that are already closed then too.

Refactor the code so `handleFlow` is only called on events, and handle
the initial list of connections directly.
2018-11-14 15:34:58 +00:00
Bryan Boreham
c627802664 Refactor: remove some code that is now unnecessary
- don't need another wrapper round `conntrack.Connections()`
- logPipe() was only for the command-line conntrack
- nobody closes the `event` chan now, so no need to pre-check for quit
2018-11-14 15:34:58 +00:00
Bryan Boreham
a29e9fa27a Update to match upstream conntrack library 2018-11-14 15:34:57 +00:00
Bryan Boreham
b9405bcc4b Remove our own copy of the upstream library 2018-11-14 15:34:57 +00:00
Bryan Boreham
73f35fd6d9 Handle nat status from conntrack via netlink
Replacement for the --any-nat command-line parameter
2018-11-14 15:34:57 +00:00
Bryan Boreham
ed6a010330 Decode conntrack status from netlink 2018-11-14 15:34:57 +00:00
Bryan Boreham
3314e1f0c7 Move constants to headers.go to be more like upstream 2018-11-14 15:34:57 +00:00
Bryan Boreham
7a68b5bdb0 Use Nfgenmsg from unix package instead of declaring locally 2018-11-14 15:34:57 +00:00
Bryan Boreham
8b04ef7359 Move conntrack code out to client.go to match upstream 2018-11-14 15:34:57 +00:00
Joseph Glanville
ac63937df7 Switch to new conntrack library 2018-11-14 15:34:57 +00:00
Joseph Glanville
853196f6d1 Import conntrack library 2018-11-14 15:34:57 +00:00
Simon Howe
d3a36cf873 Load up fa5 instead of 4
- Switch to fa5 icons and tweak font-sizes a bit
2018-11-13 12:51:31 +01:00
Simon
e78f8a8de4 Revert "Upgrade to Font Awesome 5" 2018-11-12 11:22:19 +01:00
Bryan Boreham
73de9c3f03 Merge pull request #3422 from weaveworks/upgrade-font-awesome-5
Upgrade to Font Awesome 5
2018-11-12 10:02:47 +00:00
Bryan Boreham
6356f5c118 Merge pull request #3392 from gotjosh/add-tests-to-probe-cri
Fix intention of support for fallback protocol and add tests for probe/cri/registry
2018-11-12 10:01:30 +00:00
Simon Howe
2cc58f5b00 Switch to fa5 icons and tweak font-sizes a bit 2018-11-09 14:59:53 +01:00
Stefan Prodan
717cb13a84 Add EKS to paused container detection
fix #3259
2018-11-09 13:48:11 +02:00
Bryan Boreham
62d55596c6 Merge pull request #3393 from ycao56/basic-auth
Add http Basic Auth
2018-11-07 14:32:03 +00:00
gotjosh
fbb027752f Refactor if/else into a switch statement
Also, extracts strings into constants
2018-11-01 20:42:27 +00:00
gotjosh
3faf109b8f Fix intention of support for endpoints without protocols
When we receive an endpoint address without a protocol, our code states we
don't support them and that the format is deprecated.

In reality it was not the case, e.g:

When we received an address in the form of `127.0.0.1`, we'd attempt to
parse the scheme from it, we'd realise is does have one (would be
equivalent to "") and our function `parseEndpoint` would return `"", "", fmt.Error`.

Then, our `parseEndpointWithFallbackProtocol` would use the
fallback protocol (unix) and attempt to connect to `unix://127.0.0.1`.

This meant two things:

1. The error returned from `parseEndpoint` would never be thrown
2. We would connect anyways since the address is valid

This commit changes the assertion logic to match the intention of using
a fallback protocol when one is not supplied.
2018-11-01 20:21:54 +00:00
gotjosh
beeb27810c Add tests for probe/cri/registry
Unhappy path tests try to cover three scenarios:

- When the endpoint URL scheme is not explicitly supported e.g. HTTP
- When the endpoint URL scheme is TCP which is also not supported
- When the fail to parse the given URL (to extract the scheme)

The happy path covers two scenarios:

- When we specify the supported scheme in the URL which is an unix
socket e.g. unix///var/run/dockershim.sock
- When we pass a socket address but fail to specify the scheme but our registry attempts
to use the fallback protocol e.g. var/run/dockershim.sock
2018-11-01 20:17:03 +00:00
Bryan Boreham
8cccbb695b Merge pull request #3274 from weaveworks/kubernetes-tagger
Enable Kubernetes objects to be reported just once in a cluster
2018-10-19 16:48:37 +01:00
Yu Cao
b5190d45cd basic auth 2018-10-17 19:25:12 -04:00
Akash Srivastava
5b8a8c9f56 Merge branch 'master' into volume-snapshot 2018-10-17 23:36:09 +05:30
Bryan Boreham
2a5f871d74 Merge pull request #3379 from weaveworks/dont-report-dead-processes
Probe: Don't report dead or defunct processes
2018-10-16 16:01:16 +01:00
Akash Srivastava
4701c61969 Add clone support for volume snapshot
- Add control on volume snapshot to take clone
- Add control on volume snapshot to delete it

Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-16 01:04:44 +05:30
Akash Srivastava
8692a4d57d Add control on PVC to take volume snapshot
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-16 01:04:44 +05:30
Akash Srivastava
81a682893f Add kubernetes volume snapshot support
- Add a new client in probe/kubernetes/client.go
  which will be used to fetch details of Snapshot CRD
- Visualize VolumeSnapshot and VolumeSnapshotData
- Add adjacency between PV and VolumeSnapshot
- Add adjacency between VolumeSnapshot and VolumeSnapshotData
- Add snapshot filter to hide and show snapshots

Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-16 01:04:44 +05:30
Bryan Boreham
bff0302259 Merge pull request #3391 from weaveworks/only-local-pods
Discard pod updates for other nodes
2018-10-15 14:16:18 +01:00
Bryan Boreham
b82aff1210 Discard pod updates for other nodes
We were filtering pods to those on the local node already, for regular
reports, so we should also filter events that come in asynchronously.
2018-10-14 15:24:34 +00:00
Bryan Boreham
195c4e030e Raise report publishing rate to 30ms default 2018-10-14 12:10:27 +00:00
Bryan Boreham
64197d15be Rate limit report publishing
So that, if many shortcut reports are produced in quick succession,
they will tend to get merged together.

Expand the queue size for shortcut reports, to avoid holding up the
producer so much.
2018-10-13 14:18:52 +00:00
Bryan Boreham
1279a02b7d Stop tagging pods with host ID
So they can be reported centrally, find the pod host ID from the child
containers.
2018-10-11 17:54:29 +00:00
Bryan Boreham
98d52bd480 Allow kubelet port to be disabled 2018-10-11 17:54:29 +00:00
Bryan Boreham
dd21a55a1e Refactor: implement kubernetes tagger in separate struct 2018-10-11 17:54:28 +00:00
Bryan Boreham
2ec58da1cf Don't report dead processes
If the state is reported as dead or zombie, return an error so the
process will be skipped.
2018-10-09 14:32:02 +00:00
Ajay Kelkar
68bce4f57c Using assert for equality checks 2018-10-03 14:19:54 +05:30
Ajay Kelkar
27a0b2460d Absolute basic UT 2018-10-01 21:26:26 +05:30
Bryan Boreham
65bdb145f9 Merge pull request #3334 from weaveworks/registry-test-sleep
Sleep to stop TestRegistryDelete() failing
2018-09-01 13:47:30 +01:00
Bryan Boreham
ef832eb128 Simplify fetch of all IP addresses
Code was unnecessarily fetching all links then fetching all addresses
filtered by link, when we can just get the addresses without any
filter.
2018-08-27 17:10:43 +00:00