Commit Graph

409 Commits

Author SHA1 Message Date
Bryan Boreham
f675c87826 Merge pull request #3680 from weaveworks/remove-old-control-code
refactor: remove old unnecessary controls code
2019-09-19 09:32:19 +01:00
Bryan Boreham
6ee9738581 Merge pull request #3686 from weaveworks/analyze-reports
feature(app): Add a debugging summary function, exposed via http
2019-09-18 15:54:50 +01:00
Bryan Boreham
57918b0ac5 formatting 2019-09-18 14:43:49 +00:00
Bryan Boreham
a7d3cbedb5 lint: make lint happy 2019-09-18 14:42:47 +00:00
Bryan Boreham
da030d1618 test: add TestReportUnMerge()
Testing the new delta-report internals
2019-09-18 08:01:13 +00:00
Bryan Boreham
951629af29 chore: allow Report.DNS field to be nil
Primarily to help when writing tests; may give a tiny performance benefit.
2019-09-18 08:00:28 +00:00
Bryan Boreham
b6d5594f9f perf(probe): publish delta reports to reduce data size
Similar to video compression which uses key-frames and differences
between them: every N publishes we send a full report, but inbetween
we only send what has changed.

Fairly simple approach in the probe - hold on to the last full report,
and for the deltas remove anything that would be merged in from the
full report.

On the receiving side in the app it already merges a set of reports
together to produce the final output for rendering, so provided N is
smaller than that set we don't need to do anything different.

Deltas don't need to represent nodes that have disappeared - an
earlier full node will have that node so it would be merged into the
final output anyway.
2019-09-18 08:00:28 +00:00
Bryan Boreham
a811afdba1 Merge pull request #3678 from weaveworks/nodes-omitempty
perf(probe): add 'omitempty' tag to Topology.Nodes
2019-09-17 16:25:52 +01:00
Bryan Boreham
11e76f1740 feature(app): Add a debugging summary function, exposed via http
URL is /admin/summary
2019-09-17 10:48:23 +00:00
Bryan Boreham
871751873b Stop render package depending on probe
This dependency makes it harder to see the structure of the program,
and sometimes complicates compilation.

Mostly just changing the source of strings that are already exported
from the report package.  A few new strings have to be moved there,
plus the function `IsPauseImageName()`.
2019-09-15 17:03:04 +00:00
Bryan Boreham
4c52889316 Add 'omitempty' tag to Topology.Nodes
So we save space writing out empty topologies.

Need to fix up `app_client_internal_test.go` to use Scope's
`test/reflect` package that understands empty==nil, so now it doesn't
need a previous workaround.

Remove a similar workaround in `probe_internal_test.go` that isn't
necessary since it's already using that package.
2019-09-15 15:50:08 +00:00
Bryan Boreham
b9b7d03354 refactor: remove old unnecessary controls code
Scope stopped using NodeControls in bd43c34852, and since
1cfc8f4581 WireMetrics is identical to Metrics so unnecessary.
2019-09-14 22:11:28 +00:00
Bryan Boreham
15467d7310 Move host-related names out of probe code
Reduce the dependency on low-level libraries
2019-09-13 11:41:09 +00:00
Satyam Zode
6c4b01dcd9 Change shape of K8s Job to dottedtriangle
Signed-off-by: Satyam Zode <satyamzode@gmail.com>
2019-05-20 16:55:48 +05:30
Satyam Zode
36361d6b7d Add Kubernetes Job support to Weave Scope
This covers:
- Implementation of the job resource in probe
- Reporter changes for the job
- Add Describe Control to the job
- Pass job object to the kube controller renderer

ToDo:
- Need to decide the shape for the Job.

Signed-off-by: Satyam Zode <satyamzode@gmail.com>
2019-05-19 02:36:45 +05:30
Filip Barl
cdc33855d4 Merge pull request #3589 from openebs/feature/kubectl-describe
Add describe control to all k8s resources
2019-05-17 13:37:15 +02:00
Bryan Boreham
711aa66bd5 Add OpenTracing span for report.ReadBinary()
So we can see the timing and size in Jaeger.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2019-05-10 15:34:53 +00:00
Akash Srivastava
029bbbcec8 Add describe control to all k8s resources
This commit will add a new control i.e. Describe
which will describe a k8s resource similar to kubectl describe.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2019-04-01 11:22:12 +05:30
Filip Barl
e66a3e08dc Add a confirmation dialog for deleting a pod. 2019-02-26 11:57:00 +01:00
Filip Barl
b9e692c3b3 Lock the time in tests to make them pass. 2019-02-25 11:35:33 +01:00
Filip Barl
353ab75ddb Added some tests for censoring. 2019-02-23 19:30:42 +01:00
Filip Barl
c5022bd2bb Code cleanup. 2019-02-22 14:56:44 +01:00
Filip Barl
2c56ec2bf1 Made censoring work properly. 2019-02-21 16:46:17 +01:00
Filip Barl
0f1b7e5972 Prepare to filter node summaries post-render. 2019-02-21 16:18:24 +01:00
Filip Barl
3c5320ef09 Polished the code and applied censoring to other API endpoints. 2019-02-21 14:34:05 +01:00
Filip Barl
97fdcdc525 Option to censor raw reports by command line args and env vars. 2019-02-15 17:31:08 +01:00
Bryan Boreham
ee0ce7b087 Merge pull request #3384 from weaveworks/drop-big-topologies
In multitenant app, drop all nodes for big topologies
2018-11-01 17:21:55 +00: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
Akash Srivastava
ea9ad0a1e6 Update topology to include tag
Tag can be used to specify the sub-shape for the given node.

Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-16 01:04:42 +05:30
Bryan Boreham
05b350850f Drop topologies which are way too big 2018-10-11 17:20:16 +00:00
Bryan Boreham
c1b1ee2a1b Merge pull request #3266 from weaveworks/slim-metrics
Remove First and Last data members from Metrics structs
2018-08-24 17:39:21 +01:00
guyfedwards
a38b6213d1 rename storagesheet to sheet
the client now expects a node shape of `sheet` not `storagesheet`
update report.go to reflect this.

fixes #3322
2018-08-22 13:07:45 +01:00
Bryan Boreham
d624337dc1 Merge pull request #3272 from weaveworks/remove-old-controls
Remove old 'Controls' field which was replaced two years ago
2018-07-31 17:59:33 +01:00
Bryan Boreham
aa40f944d3 Merge pull request #3260 from openebs/storage-driver
Add storage driver name to Persistent Volume
2018-07-31 17:58:38 +01:00
Bryan Boreham
74883b89b7 Merge branch 'release-1.9' 2018-07-25 12:37:32 +00:00
Bryan Boreham
ba656a37f7 Fix WithLatests() de-duplication
The fixup() method was modifying a copy of its input, so you could get
duplicate keys in the output. Change it to return the new slice.

Thankfully this is rare: in most cases WithLatests() is called with
fields that are not duplicates of existing ones.
2018-07-25 11:58:08 +00: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
Bryan Boreham
bd43c34852 Remove old 'Controls' field which was replaced two years ago
This saves memory and CPU time encoding and decoding.

We assume that no probes that old are still running, and we don't need
to reconstruct the data for saved historical reports because controls
are not relevant to historical nodes.
2018-07-19 21:04:54 +00:00
Bryan Boreham
9efd6afd7c Merge pull request #3268 from weaveworks/optimise-withlatests
Optimise Node.WithLatests()
2018-07-18 14:04:35 +01:00
Bryan Boreham
cc79b7631e Propagate multiple container values at once
This is more efficient than repeatedly inserting a single value.
2018-07-18 12:52:27 +00:00
Bryan Boreham
6ff8316a1d Add all elements then sort in Node.WithLatests()
To save allocating and re-allocating the data structure by repeated
addition.
2018-07-18 12:52:27 +00:00
Bryan Boreham
5edc85822b AddParent() function to optimise the case where there is only one parent
Avoids creating and discarding a StringSet just to carry the
parameters, and makes the code more readable too.
2018-07-17 13:51:46 +00:00
Bryan Boreham
0d2409c72c Add method to add a single string into Sets
This avoids creating and discarding a StringSet just to pass the parameter
2018-07-17 13:51:46 +00:00
Bryan Boreham
dad34df575 Merge pull request #3267 from weaveworks/pool-gzwriters
Re-use gzip writers in a pool
2018-07-13 16:09:24 +01:00
Bryan Boreham
692214bf40 Test Sets.Add() 2018-07-12 19:54:02 +00:00
Bryan Boreham
d37611a4a3 Make TestSetsMerge() check both ways round 2018-07-12 19:54:01 +00:00
Bryan Boreham
8e305f1ce9 Don't copy StringSet if merging a subset
Make StringSet.Merge() work like StringLatestMap.Merge()
2018-07-12 19:54:01 +00:00