383 Commits

Author SHA1 Message Date
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
Bryan Boreham
dac008b9c4 Early return from LatestMap merge loop
If we run out of things to look at in the other map, return quickly.
Also move the equal-key case above the less-than case, since maps with
equal keys are the common case when merging.
2018-07-12 19:54:01 +00:00
Bryan Boreham
c91fd6c67b Optimise merge of LatestMaps with same keys, different timestamps
Swap the two maps so we are merging older into later.
2018-07-12 19:54:01 +00:00
Bryan Boreham
43a0a7e5d3 Don't copy LatestMap if merging a subset 2018-07-12 19:50:02 +00:00
Bryan Boreham
fdfbedeea9 Stop exporting Metrics.First() and Last()
They were exported for testing only, and the test isn't very useful.
2018-07-12 19:34:09 +00:00
Bryan Boreham
1cfc8f4581 Remove First and Last data members from Metrics structs
They can be trivially computed when required.
2018-07-11 19:19:01 +00:00
Bryan Boreham
d60f3030ca Extend TestLatestMapMerge()
Add a test case where one input is longer than the other; also run
each case both ways round.

Omit the case which was already the reverse of another.
2018-07-09 19:19:23 +00:00
Bryan Boreham
c96611b13d Less verbose string dump of LatestMap
The default time.Time.String() includes nanoseconds, wall-clock adjustment, etc.
Also don't include the key twice when stringizing the map itself.
2018-07-08 16:32:51 +00:00
Bryan Boreham
70cd79307e Re-use gzip writers in a pool
Since they allocate sizeable chunks of memory, this can save on garbage-collection.
2018-07-08 16:30:07 +00:00
Bryan Boreham
8e5b19cbcb Use buffer pool in report.MakeFromBytes() to reduce garbage-collection 2018-07-04 14:03:17 +00:00
Bryan Boreham
84169c6c55 Use a buffer pool in report.ReadBinary() to reduce garbage-collection 2018-07-04 13:35:44 +00:00
Bryan Boreham
3c07c93847 Merge pull request #3236 from weaveworks/fast-merger
Faster report merging through mutating objects
2018-06-22 16:37:07 +01:00
Bryan Boreham
1706746a32 Faster report merging through mutating objects
When we know we have the only reference to a Report or Node object we
can avoid copying the data to change it. Add "Unsafe" variants of
various Merge operations which mutate the receiver, and a new Merger
which takes advantage of them.
2018-06-22 11:59:43 +00:00
Bryan Boreham
80dbd3443c probe: Add -probe.publish.stdout option for debugging
This option gives a crude way to view the raw probe data as json in
the container logs, so that you can check exactly what it would have
sent.

We stub out the PipeClient interface with a dummy implementation in
this mode.
2018-06-19 22:59:01 +00:00
Bryan Boreham
06c895267c Reports: streamline report serialization
Move the creation of the buffer and the choice of compression level
(which never changes) into WriteBinary(), to simplify the code.
2018-06-19 22:59:01 +00:00
Bryan Boreham
8c18a785e7 Merge pull request #3132 from openebs/add-pv-pvc-support
Add Kubernetes Storage (pv and pvc) support in Weave Scope
2018-06-08 12:41:21 +01:00
Satyam Zode
d26b2c3805 Add Kubernetes storage class resource to weave scope
This will:

- Add StorageClass resource. Storage classes are mentioned
in the PVC spec. We're using storage class name from PVC spec to
add adjacency to the PVC node.
- Add square sheet shape for StorageClass.
- Add storage filter in the PODS topology.
Storage Filter will allow user to see distinct view of
stateful applications.
- Add visually distinct edge to show storage adjacency.

Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
2018-06-08 16:36:29 +05:30
Satyam Zode
23210a6a77 Add Kubernetes volumes support in Weave Scope
This will

- Add Kubernetes volume resources such as PV, PVC.
- Add shapes for Kubernetes PV and PVC
- Add `Cylinder` shape for PV and `Dotted Cylinder` shape for PVC.

Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
2018-06-07 17:01:29 +05:30
Bryan Boreham
009af5be0c Probe: remove backwards-compatibility code when publishing reports
Removed to reduce CPU and memory usage in probes.

This code was added in August 2016 so that newer probes could be used
with older apps. Since then we have adopted the stance that new apps
will accept reports from old probes but not vice-versa, on a version
change.
2018-06-05 16:47:23 +00:00
Filip Barl
4382deb39b Show image tag separate from image name in Node Details. 2018-05-17 11:09:31 +02:00
Marcus Cobden
0dfbe8b10f Fix tests broken by hasty merging 2018-05-03 19:27:50 +01:00
Marcus Cobden
8eb9fc86ae Add null checks to fix querier panic 2018-05-03 17:23:58 +01:00
Bryan Boreham
1455597a48 Merge pull request #3142 from weaveworks/faster-critbit
Faster path to check an IP address against known networks
2018-04-16 20:51:22 +01:00
Matthias Radestock
82cd367379 Merge pull request #3139 from weaveworks/3127-no-truncate
do not truncate tables

Fixes #3127.
2018-04-15 21:49:19 +01:00
Bryan Boreham
3711876194 Use unsafe merge in joinResults.addChildAndChildren(), for performance 2018-04-15 09:39:21 +00:00
Bryan Boreham
04ceb0cc87 Faster path to check an IP address against known networks
We modify the critbitgo library to skip creating a route object we don't use.

The weaveworks-local modification can be removed if
https://github.com/k-sone/critbitgo/pull/7 is merged.
2018-04-14 20:44:09 +00:00
Bryan Boreham
7a03bc03f8 Use faster code to accumulate children when rendering
Make sure all the Children NodeSets are not shared with any other
nodes, then we can use the non-persistent add path.
2018-04-13 07:44:21 +00:00