Commit Graph
942 Commits
Author SHA1 Message Date
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 GlanvilleandBryan Boreham ac63937df7 Switch to new conntrack library 2018-11-14 15:34:57 +00:00
Joseph GlanvilleandBryan Boreham 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
SimonandGitHub e78f8a8de4 Revert "Upgrade to Font Awesome 5" 2018-11-12 11:22:19 +01:00
Bryan BorehamandGitHub 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 BorehamandGitHub 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 ProdanandGitHub 717cb13a84 Add EKS to paused container detection
fix #3259
2018-11-09 13:48:11 +02:00
Bryan BorehamandGitHub 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 BorehamandGitHub 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 SrivastavaandGitHub 5b8a8c9f56 Merge branch 'master' into volume-snapshot 2018-10-17 23:36:09 +05:30
Bryan BorehamandGitHub 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 BorehamandGitHub 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
Prince Rachit Sinha a097b7a590 refactor(logs): Add reporter name to error logs.
1. Adding reporter name to logs improves tracing of error.
2. Capitalize first letter of error log.

Fixes https://github.com/weaveworks/scope/issues/3306

Signed-off-by: Prince Rachit Sinha <prince.rachit@mayadata.io>
2018-09-30 11:29:40 +05:30
Bryan BorehamandGitHub 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
Bryan Boreham ec71876879 Sleep to stop TestRegistryDelete() failing 2018-08-26 21:33:26 +00:00
meghalidhoble 625998b91e Change made to the listed files, to enable weaveworks-scope on Power(ppc64le)
1)backend/Dockerfile 2) probe/endpoint/dns_snooper.go
3) client/Dockerfile 4) docker/Dockerfile.cloud-agent
5) probe/process/walker_linux_test.go & 6) tools/lint

1)'backend/Dockerfile' : Conditional added so that the cross-compiling should
   be done on amd64. Also removed support for sh-lint for ppc64le for now.
   As the version for shfmt mentioned in the dockerfile is not available for
   ppc64le and the later version does't work fine with existing application.
2)'probe/endpoint/dns_snooper.go' : Renamed this file so as to reuse for ppc64le
   and added a build-constraint. Now this file will be build for amd64 on linux
   and ppc64le on linux.
3)'client/Dockerfile' : Modified the version of the base image for node from
   8.4.0 to 8.11, as this version supports multiarch.
4)'docker/Dockerfile.cloud-agent' : Modified the version of the base image for
   golang from 1.10.2-strech to 1.10.2, which supports multiarch.
5) 'probe/process/walker_linux_test.go' : Test fixed to run for ppc64le,
    modified the code to accept RSSBytes based on pageSize value per
    architecture, instead of hard-coded values.
6)'tools/lint' : Modified the file to skip the sh-lint implementation for ppc64le.

PR #3231
2018-08-13 12:45:25 +05:30
Bryan BorehamandGitHub 50a83b060f Merge pull request #3279 from weaveworks/check-pid
Check container is running before trying to open its namespace
2018-08-07 09:32:21 +01:00
Bryan BorehamandGitHub aa40f944d3 Merge pull request #3260 from openebs/storage-driver
Add storage driver name to Persistent Volume
2018-07-31 17:58:38 +01:00
Lili Cosic e6d9bcc1cb Add CRI probe
When the probe.cri is enabled the CRI probe will be used to gather
the container information via the CRI API. For now only the basic
information is included in the generated report, those that we can get
via the CRI ListContainersRequest.
2018-07-26 10:51:59 +01:00
Bryan Boreham 53c406f7e0 Check container is running before trying to open its namespace
Otherwise we get pointless errors.
2018-07-23 21:37:22 +00:00
Marc Carré bcbc462842 Fix probe & app's shutdown to please signals.SignalHandlerLoop
Fixes:
```
not enough arguments in call to signals.SignalHandlerLoop
	have ()
	want (logging.Interface, ...signals.SignalReceiver)
```
2018-07-23 20:10:19 +02:00
Marc Carré 2ba50b8b3d Update golang.org/x/net/context to latest
```
$ gvt delete golang.org/x/net/context
$ gvt fetch golang.org/x/net/context
2018/07/23 18:03:49 Fetching: golang.org/x/net/context
$ git grep -l "golang.org/x/net/context" | grep -v vendor | xargs sed -i '' 's:golang.org/x/net/context:context:g'
$ git grep -l "context/ctxhttp" | grep -v vendor | xargs sed -i '' 's:context/ctxhttp:golang.org/x/net/context/ctxhttp:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```
fixed a bunch of:
```
cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error
```
2018-07-23 20:10:18 +02:00
Marc Carré d46c2266ce Change Sirupsen/logrus to sirupsen/logrus
```
$ git grep -l Sirupsen | grep -v vendor | xargs sed -i '' 's:github.com/Sirupsen/logrus:github.com/sirupsen/logrus:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```
2018-07-23 20:10:14 +02:00
Akash Srivastava 715747bda4 Add storage driver name to Persistent Volume
Every PV is backed by storage driver. This will show
storage driver in the PV metadata.

Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-07-20 11:41:06 +05:30