Commit Graph

651 Commits

Author SHA1 Message Date
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
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
Alfonso Acosta
0a5fb7aad3 Remove ProcessWithContainerNameRenderer, it wasn't working (#3263) 2018-07-13 13:34:37 +02:00
Bryan Boreham
5067cc9059 Merge pull request #3232 from weaveworks/dont-overwrite-input
Stop filterUnconnected() modifying its input
2018-06-21 10:17:51 +01:00
Bryan Boreham
183396ed54 Merge pull request #3201 from weaveworks/dont-map-pod-blank-ip
Don't return blank addresses for pods
2018-06-20 10:39:18 +01:00
Bryan Boreham
39dd0268b0 Stop filterUnconnected() modifying its input
Helper function filterInternetAdjacencies() would sometimes copy and
sometimes not copy the input. Changed to always copy, before calling.
2018-06-20 08:49:48 +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
d9bd17af8a Refactor edge frontend code and reporter
- Refactor dotted edge logic.
- Change Storage view to show storage components as well as all
  the pods.
- Sentence case storage related variables.

Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
2018-06-08 16:37:48 +05:30
Satyam Zode
24741bec2a Simplify volume rendering code in render
- Remove the complex volume rendering code.
- Remove volume specific code from Transform.
- Rename filtering methods
- Remove extra params from PV, PVC nodes to make table view look good.

Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
2018-06-08 16:37:42 +05:30
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
2f69973de6 Add adjacencies for kubernetes storage components
- Kubernetes storage components such as PV and PVC are connected based on two
parameters Persistent volume claim name and Persistent Volume name.
- PVC contains the volume name which is, PV name itself. Hence, we can
show edge for PVC and PV.
- This will bring higher level visibility for kubernetes storage components.

Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
2018-06-07 17:04:56 +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
Matthias Radestock
15b605f804 make process-by-name topology show something (again)
...when 'Hide Unconnected' is selected, which is the default.

Here's the problem...

The connectedness filter looks for `is_connected` marks in the Latest
map of the nodes. The mark is added by ColorConnected, which is
invoked by ProcessRenderer. That in turn is the base renderer for
ProcessNameRenderer, which is what the process-by-name view
renders. However, the process2Names mapping does not propagate any
metadata, hence there are no `is_connected` marks on the result
nodes. Consequently they are all filtered out.

The problem was introduced in #3009, when I added the ability for
users to chose whether to show or hide unconnected
processes (previously unconnected processes were always hidden) -
looks like I failed to check that the process-by-name view was working
with the new filter. Oops.

The fix is to move the ColorConnected call from ProcessRenderer to the
higher-level renderers - ProcessWithContainerNameRenderer (which is
what the 'Processes' view renders) and ProcessNameRenderer.

This has the beneficial side effect of improving performance for other
renderers which invoke ProcessRenderer, none of which need
connectedness-coloring.

Fixes #3205
2018-06-03 07:01:40 +01:00
Bryan Boreham
fe28febbe1 render: Don't return blank addresses for pods
A small performance improvement - instead of creating an entry in a
map which doesn't match anything, just skip a pod with a blank IP.
2018-05-29 15:30:15 +00:00
Roland Schilter
f012c23ca1 Sentence cased text everywhere (#3166)
* Sentence cased text everywhere

Follows Weave Cloud's direction of sentence case on most things.

* More space between sorter caret and label

* Use full topology name for table header
2018-05-17 17:30:38 -07:00
Filip Barl
bfb20a8f40 Addressed @LiliC's feedback. 2018-05-17 11:43:54 +02:00
Filip Barl
183aaea950 Fixed the tests. 2018-05-17 11:09:31 +02:00
Filip Barl
4382deb39b Show image tag separate from image name in Node Details. 2018-05-17 11:09:31 +02:00
Bryan Boreham
e1c418884e Comment inconsistency between calls in joinResults 2018-04-15 09:39:43 +00:00
Bryan Boreham
3711876194 Use unsafe merge in joinResults.addChildAndChildren(), for performance 2018-04-15 09:39:21 +00:00
Bryan Boreham
b7b778934c Merge pull request #3138 from weaveworks/single-owner-nodeset
Use single-owner code path to accumulate children when rendering
2018-04-13 09:34:30 +01: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
Bryan Boreham
7e63d0fd19 Comment 2018-04-10 13:25:54 +00:00
Bryan Boreham
dd087cff01 Use joinResults to accumulate nodes in Map.Render()
joinResults grew out of a special case of Map.Render(), so now we
merge the two lines back together and have just one way to accumulate
results and remap adjacencies.
2018-04-09 13:16:40 +00:00
Bryan Boreham
e3539a8d92 MapFunc is now Node->Node
Save time creating a map for the results which contains at most one entry
2018-04-09 13:16:40 +00:00
Bryan Boreham
ced27b298c Turn Map2Parent into a Renderer
This is the last MapFunc which returns multiple Nodes, so by turning
it into a Renderer we open the door to simplifing every other MapFunc.
2018-04-09 13:16:40 +00:00
Matthias Radestock
feae4f4fcf don't show Failed pods
these are not alive, and Scope generally only shows the living, not
the dead.
2018-04-02 11:03:25 +01:00
Ilya Dmitrichenko
e024ab2d1f Add (cloud.)weave.works to the list of known services 2018-02-22 17:19:55 +00:00
Bryan Boreham
b5cdcb9a42 Move DNS name mapping from endpoint to report 2018-02-20 16:14:21 +00:00
Roberto Bruggemann
95a490da3a Service metrics: fix naming assumption
The link returned by service metrics is now built by looking up the deployment name in `report.Report` instead of assuming the service and the deployment have the same name.
2018-02-08 14:13:50 +00:00
Roberto Bruggemann
23f8d40355 Replace service cpu/mem link to 'Monitor'
The previous link to 'Monitor' contained a recording rule metric, and since not all Weave Clound instances have recording rules, the link would redirect to a 'Monitor' page without data points.
The recording rule metric has been substituted with the underlying query.
2018-02-07 13:11:01 +00:00
Matthias Radestock
f2bdbbde22 tiny tidy-up / refactor 2018-01-10 10:37:29 +00:00
Matthias Radestock
fd5fa7a962 refactor: extract common code in endpoint mapping
This isn't quite as neat as we'd want to make it, because two of the
three call sites still require a closure, but it's still an
improvement.

Note that every instance of MapEndpoints only ever maps to one
topology, which, furthermore, is a core report topology. Hence we can
just parameterise MapEndpoints with that topology, and then the map
functions can return just the node ids.
2018-01-07 08:20:06 +00:00
Matthias Radestock
dd41956d60 refactor: remove support for non-linkable connections
Connections have always been linkable, so this is dead code.
2018-01-02 10:20:01 +00:00
Matthias Radestock
9754bf2385 refactor: remove support for non-linkable nodes
since they are now always linkable.
2018-01-02 10:19:22 +00:00
Matthias Radestock
3582c221fe processes are now always linkable 2018-01-02 09:47:15 +00:00
Matthias Radestock
74c72945ef optimisation: no need to prune adjacencies in filterUnconnected
since, by definition, unconnected nodes do not appear in adjacencies
of other nodes
2018-01-02 06:41:19 +00:00
Matthias Radestock
915535e0a2 Merge pull request #3007 from weaveworks/less-derived-node-metadata
remove unnecessary metadata propagation
2017-12-29 15:10:48 +00:00
Matthias Radestock
c8ea7ba49e refactor: simplify joinResults.add*
After dropping extra metadata in the rest of this PR, our usage of
joinResults.add* only ever ends creating minimal nodes, from just an
id and topology. Hence joinResults.add* can be invoked with simply an
id and topology instead of a generic node creation function.
2017-12-29 14:40:18 +00:00
Matthias Radestock
a7b6bb09a1 refactor: lift closures and extract constants 2017-12-29 14:40:18 +00:00
Matthias Radestock
2d6badba79 cope with processes that have no HostNodeID metadata
Some process nodes may not have a HostNodeID metadata, e.g. when an
endpoint references a pid that we know nothing about. When mapping
processes to containers, we therefore shouldn't rely on
HostNodeID. Instead we can obtain the hostID from the process node ID.

This has been broken for a while, possibly forever.
2017-12-29 14:40:16 +00:00
Matthias Radestock
ff03d7d86e Merge pull request #3008 from weaveworks/propagate-single-metrics-renderer
refactor: make PropagateSingleMetrics a renderer
2017-12-29 14:18:09 +00:00
Matthias Radestock
ecf1cf43f6 Merge pull request #3005 from weaveworks/move-rendercontext
refactor: move RenderContext where it belongs
2017-12-29 14:16:59 +00:00
Matthias Radestock
4984da6f04 fly-by optimisation
save a few allocations
2017-12-28 20:04:01 +00:00
Matthias Radestock
30bef738c0 refactor: make PropagateSingleMetrics a renderer
instead of a Map, since it's not really a map as it just updates the
given node.

This is more efficient and also matches what we do in similar
situations elsewhere, e.g. in ContainerWithImageNameRenderer and
ProcessWithContainerNameRenderer.
2017-12-28 20:04:01 +00:00
Matthias Radestock
4c1d5640ae don't propagate IsConnectedMark in MapProcess2Container
...when creating Uncontained pseudo nodes. IsConnectedMark only
affects summarisation of genuine process nodes.
2017-12-28 12:56:52 +00:00
Matthias Radestock
5d06f90f10 don't propagate HostNodeID in MapProcess2Container
...when creating Uncontained pseudo nodes. Summarisation of
Uncontained/Umanaged only looks at the ID, which includes the
HostNodeID.

We adjust the promotion of Uncontained to Unmanaged, to operate on the
ID instead of (re)extracting the hostID from the HostNodeID
metadata. With that, nothing looks at the HostNodeID metadata of
Uncontained/Unmanaged nodes.
2017-12-28 12:54:21 +00:00
Matthias Radestock
7ce160d492 don't propagate ImageID in MapContainer2ContainerImage
The ImageID is already the id of the node we are creation, and that's
what summarisation renders in the event we fail to join this node with
a node from the ContainerImage topology that has more metadata.
Nothing is looking at the ImageID metadata field.
2017-12-28 12:50:11 +00:00
Matthias Radestock
9034296209 don't propagate ImageID in MapContainerImage2Name
This was building a set of all the image ids represented by the same
unversioned image. Well, it was doing that until I broke it with a
silly mistake in #1739 - instead of extracting the imageID from the
original node ID, it's extracting it from the updated ID, which is the
unversioned image. Even if it was working though, it's pointless
since nothing is looking at that info.
2017-12-28 12:50:11 +00:00