Commit Graph

1105 Commits

Author SHA1 Message Date
Risha Mars f550431278
Make zero success rate more noticeable in chart (#1681)
The success rate mini chart shows a colour based on SR, and also shows the SR
via the proportion of the chart that's filled out. If the success rate is 0% (as
in the VotePoop endpoint in the emojivoto demo), the chart would be zero 
percent filled out, causing it to be entirely gray. Really, it should be entirely
red, since zero SR is pretty bad.

Fix: fully fill the bar with red if there is a zero SR
2018-09-18 15:52:03 -07:00
Mathis Wiehl 34bcf2db08 Disable the tap start button if no ns/resource is selected (#1679)
Prevent error when trying to tap without having a namespace and resource
selected by disabling the tap button.

Fixes #1670

Signed-off-by: Mathis Wiehl <mathis.wiehl@sinnerschrader.com>
2018-09-18 12:40:32 -07:00
William Morgan 10181cd690
update README.md (#1657)
* update README.md

New description, shorten, update some links.

* address kevin's review comments

Signed-off-by: William Morgan <william@buoyant.io>
2018-09-19 02:02:27 +08:00
Kevin Lingerfelt d417f5649e
Update CHANGES.md for stable-2.0.0 release (#1677)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-18 08:27:00 -07:00
Kevin Lingerfelt 732570648d
Update check command to work with older versions (#1678)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-17 19:41:51 -07:00
Risha Mars c0d2ea4fdb Try this (#1675) 2018-09-17 18:00:29 -07:00
Kevin Lingerfelt 12b10e27c1
Update version checks to support release channels (#1667)
* Update version checks to support release channels
* Update based on review feedback
* Fix sidebar tests
* Update CI config for edge and stable tags

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-17 17:13:50 -07:00
Risha Mars ea520593e3
Fix react error while clearing Top form (#1668)
If you go to /top and select a namespace and then a resource, and then clear the
resource, there would be a javascript error that would cause the whole app not
to render. Fix this.
2018-09-17 17:02:36 -07:00
Risha Mars f2b2f98532
Key rows of top table on the resource type being requested (#1647)
Problem 
Previously, we'd display one row in top per sourcePod -> dstPod. When
viewing resources at a higher level though (e.g. deployments with multiple pods)
the src/dst column displays the resource at that level, and displaying multiple
rows with deploy/foo is confusing.

Solution 
Key the top table off of the resource currently being requested, so
that all the rows are rolled up appropriately. In the popover for that column,
display a list of pods/ips that are rolled up.

This branch also adds a generic list of resources to the tap/top dropdown (you
were always able to tap them, but when I switched from autocomplete to select
for this dropdown, you lost the ability to type in arbitrary resources).
2018-09-17 15:08:43 -07:00
Risha Mars 1caaefd5c8
Fix errors on the tap form when clearing items (#1666)
If you select a from namespace and from resource in /tap and try to clear them
using the little x in the form field, there would be a huge js error causing the
app to not render. Fix this.

Also removes filterOptions which wasn't being used any more. This will probably
make parsing tap results ever so slightly faster as we're now not trying to also
aggregate potential filter options.

* Fix js errors on Tap form when Clear button is hit
* Remove filter options code since we're not using the filters anywhere
2018-09-17 14:28:01 -07:00
Dennis Adjei-Baah 9951a6e864
Ignore websockets error code 1006 (#1649)
When a websocket connection is closed between Chrome and a server, we get a 1006 error code signifying abnormal closure of the websocket connection. It seems as if we only get this error on Chrome web clients. Firefox and Safari do not encounter this issue.

The solution is to suppress 1006 errors that occur in the web browser since the connection is closed anyway. There is no negative side effect that occurs when the connection is closed abnormally and so the error message is benign.

fixes #1630  

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-17 13:46:25 -07:00
Risha Mars 668aa07974
UI fixes: Remove RPS unit, fix Tap and Top in sidebar (#1663)
* Don't display RPS unit in metrics table
* Fix Tap and Top icons not being minimized correctly
* remove metric tooltip on RPS column
* Fix extra spacing on Tap/Top in sidebar
2018-09-17 12:00:18 -07:00
Alex Leong e65a9617bd
Add can-i checks to linkerd check --pre (#1644)
Add checks to `linkerd check --pre` to verify that the user has permission to create:
* namespaces
* serviceaccounts
* clusterroles
* clusterrolebindings
* services
* deployments
* configmaps

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-09-17 11:31:10 -07:00
Risha Mars 19d24eb898
Move more info from the tap table into the expanded row (#1641)
Try to make the tap table easier to parse by moving some info into the expanded
row. You can also now click anywhere on the row to expand.

The mocks in #1629 have Authority, Path and Latency buried, but I figured they might be
useful to see in the top level, so they're here.
2018-09-14 15:51:42 -07:00
Andrew Seigner c3150d2c90
`linkerd check` sends params on version check (#1642)
The `linkerd check` parameter hits
https://versioncheck.linkerd.io/version.json to check for the latest
Linkerd version. This loses information, as that endpoint is intended to
record current version, uuid, and source.

Modify `linkerd check` to set `version`, `uuid`, and `source`
parameters when performing a version check.

Part of #1604.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-14 15:39:05 -07:00
Alex Leong 6c6310e3b9
Bikeshed the tap and top icons (#1637)
I find the tap and top icons a bit strange.  Using the filter icon for tap is weird because we already use the filter icon for filtering columns.  The caret-up icon looks weird to me for top because it looks like something that is click to expand.

Change the tap icon to the Font Awesome microscope.  Change the top icon to the Font Awesome stream.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-09-14 15:30:10 -07:00
Kevin Lingerfelt 0992af6b47
Add link to tap each row in top table (#1643)
* Add link to tap each row in top table
* Fix tap col width, fallback to dest pods

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-14 14:35:13 -07:00
Kevin Lingerfelt f1b3827194
Bump default check retry time to 5 minutes (#1645)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-14 10:58:03 -07:00
Alena Varkockova 169dcf4e70 Make wait=true a default option for check and dashboard (#1640)
* Remove wait option and make it a default for check
* Switch the wait default to true
* Wait by default also for dashboard

Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2018-09-14 09:59:04 -07:00
Andrew Seigner b708378d07
Add version check to Grafana dashboard (#1638)
* Add version check to Grafana dashboard

The web dashboard checks the local Linkerd version against the latest
release, and informs the user if an update is available. Grafana was not
doing this.

Modify the Grafana dashboard to perform a version check, and prompt the
user to update if needed.

Fixes #1607

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-13 15:28:44 -07:00
Andrew Seigner 7c70531b8e
Add data plane check for metrics Prometheus (#1635)
The `linkerd check` command was not validating whether data plane
proxies were successfully reporting metrics to Prometheus.

Introduce a new check that validates data plane proxies are found in
Prometheus. This is made possible via the existing `ListPods` endpoint
in the public API, which includes an `Added` field, indicating a pod's
metrics were found in Prometheus.

Fixes #1517

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-13 13:02:05 -07:00
Andrew Seigner 14992631cf
Update CHANGES.md for v18.9.1 release (#1631)
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-12 15:02:40 -07:00
Dennis Adjei-Baah 00d0a26a9c
Cleanly shutdown tap stream to data plane proxies (#1624)
Sometimes, the tap server causes the controller pod to restart after it receives this error.
This error arises when the Tap server does not close gRPC tap streams to proxies before the tap server terminates its streams to its upstream clients and causes the controller pod to restart.

This PR uses the request context from the initial TapByReource to help shutdown tap streams to the data plane proxies gracefully.

fixes #1504

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-12 15:00:19 -07:00
Dennis Adjei-Baah 20e1e6f2c1
Change breadcrumb header to default font in styles.css (#1633)
* change breadcrumb header to default font in styles.css
* change font weight for header to global font weight
* adjust height pixels and set global font to Lato

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-12 14:57:59 -07:00
Risha Mars 7d2f2afb36
Improve top table to better cope with high RPS traffic (#1634)
There are two variables we use to control the volume of Top output,
maxRowsToDisplay, which controls how many rows are in the table, and
maxRowsToStore, which controls the size of the event index we keep in memory for
aggregating results.

Previously, we were only keeping in index maxRowsToDisplay rows, which for the
Resource Detail page was 10 (which is really small for high traffic rest-y
resource traffic - it causes rows to be deleted from the index too soon, and
then causes the data in the table to change a lot). Change this to store
maxRowsToStore rows, and also bump this to 50. This allows us to store results
for longer, and also ensures more consistent data over time.

Another fix for the appearance of the Top columns is to add fixed widths to the
metrics. This will prevent the table from wobbling from side to side.
2018-09-12 14:56:24 -07:00
Risha Mars b49ccce5f0
Add small success rate chart to table, misc web tweaks (#1628)
A bunch of web UI tweaks: 
- Add a small success rate chart to the metrics tables
- Improve latency formatting for seconds latencies
- Rename upstream/downstream to inbound/outbound
- Make Top table look consistent with rest of tables on page
- Fix widths of metrics column columns so that tables align
2018-09-12 13:47:46 -07:00
Risha Mars 01be78e455
Consolidate the source and destination columns in the Tap and Top tables (#1620)
Consolidate the source and destination columns into one column, 
and add a direction column (To/From) so the user knows if the 
displayed resource is src/dst.
2018-09-12 13:30:52 -07:00
Dennis Adjei-Baah b10b8cb8c4
remove extraneous calc function in sidebar.css (#1632)
This PR is a result of a change request that was missed in PR #1613. This change removes an unnecessary calc() function in the sidebar.css

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-12 11:37:59 -07:00
Andrew Seigner 6c45c07ede
Display more helpful websocket errors (#1626)
The web client displays `Websocket [code]` on websocket close errors.

Modify the web client to render a more helpful error message to the
user. If a reason is present, render that, otherwise translate the
websocket error code into a message.

Fixes #1599

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-12 11:29:11 -07:00
Dennis Adjei-Baah b1181e552d
Add breadcrumb navigation at the top of linkerd dashboard (#1613)
This PR adds a breadcrumb style navigation to the Linkerd dashboard. Each "crumb" links to its corresponding page in the UI.

This PR also includes a small UI fix in the sidebar. The select box always seems to revert to the All Namespaces option whenever there is a state change on the React side. The fix ensures that the select box always displays the namespace filter if it is available and revert to All Namespaces when no namespace is selected.

fixes #1464
fixes #1543
fixes #1627

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-12 09:22:01 -07:00
Andrew Seigner 5d85680ec1
Introduce inject check for known sidecars (#1619)
`linkerd inject` was not checking its input for known sidecars and
initContainers.

Modify `linkerd inject` to check for existing sidecars and
initContainers, specifically, Linkerd, Istio, and Contour.

Part of #1516

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-11 15:09:19 -07:00
Andrew Seigner bae05410fd
Bump Prometheus to v2.4.0, Grafana to 5.2.4 (#1625)
Prometheus v2.3.1 -> v2.4.0
Grafana 5.1.3 -> 5.2.4

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-11 14:45:55 -07:00
Kevin Lingerfelt c4a0278a75
Improve performance of tap table by throttling updates (#1623)
* Improve performance of tap table by throttling updates
* Rename debounced to throttled

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-11 14:28:54 -07:00
Alex Leong bd15482329
Add with-source flag to top (#1614)
Fixes #1593 

Add a `--hide-sources` flag to `linkerd top`.  Setting this removes the source column from the output.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-09-11 14:21:36 -07:00
Risha Mars 6b830ef4b3
Use Tap data on Resource Detail page to display unmeshed resources (#1596)
* Use Tap data on Resource Detail page to display unmeshed resources
that send traffic to the specified resource.

* Don't update neighbors on every websocket recv; this causes too much rendering.
Instead, store in internal variable and update with the api results.

This branch uses the src data from tap to discern which unmeshed resources are
sending traffic to the specified resource. We then show this resource in the
octopus graph.

Note that tap is sampled data, so it's possible for an unmeshed resource to not
show up. Also, because we won't know about the resource until it appears in the
Tap results, results could pop into the chart at any time.
2018-09-11 10:34:27 -07:00
Andrew Seigner 7eec5f181d
Inject warns on UDP ports (#1617)
linkerd only routes TCP data, but `linkerd inject` does not warn when it
injects into pods with ports set to `protocol: UDP`.

Modify `linkerd inject` to warn when injected into a pod with
`protocol: UDP`. The Linkerd sidecar will still be injected, but the
stderr output will include a warning.

Also add stderr checking on all inject unit tests.

Part of #1516.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-11 10:12:45 -07:00
Kevin Lingerfelt f3301594ad
Fix landing page when there are no meshed namespaces (#1622)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-10 19:02:55 -07:00
Risha Mars 55402da493
Improve performance of Top tables (#1616)
_.throttle setState for receiving websocket tap events to prevent continuous rerendering

Problem 

We receive a lot of websocket events from the tap server. Previously, we
were processing each event as we received it, then calling setState after
processing to update the tables. Each call to setState triggered a re-render of
the whole table. We were rerendering multiplie times a second, causing the whole
page to become unresponsive.

Solution 

Throttle setState for receiving websocket tap events to prevent
continuous rerendering. Store the tap events in an index outside of state, and
only update the state once every specified interval (currently 500ms).

We can now view entire namespaces with Top and the page won't crash! 
To verify: Go to /top and try topping a namespace
2018-09-10 16:02:29 -07:00
Dennis Adjei-Baah 7cc64843a3
Hide scrollbars in sidebar (#1615)
When scrollbars are set to always be visible in a browser, we see them appear in the sidebar component of the dashboard.

This PR adds CSS that hides the scrollbar for WebKit browsers, i.e., Chrome and Safari and uses an overflow: hidden technique inspired by this solution to hide the scrollbar in Firefox.

fixes #1611

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-10 13:20:08 -07:00
Andrew Seigner c5a719da47
Modify inject to warn when file is un-injectable (#1603)
If an input file is un-injectable, existing inject behavior is to simply
output a copy of the input.

Introduce a report, printed to stderr, that communicates the end state
of the inject command. Currently this includes checking for hostNetwork
and unsupported resources.

Malformed YAML documents will continue to cause no YAML output, and return
error code 1.

This change also modifies integration tests to handle stdout and stderr separately.

example outputs...

some pods injected, none with host networking:

```
hostNetwork: pods do not use host networking...............................[ok]
supported: at least one resource injected..................................[ok]

Summary: 4 of 8 YAML document(s) injected
  deploy/emoji
  deploy/voting
  deploy/web
  deploy/vote-bot
```

some pods injected, one host networking:

```
hostNetwork: pods do not use host networking...............................[warn] -- deploy/vote-bot uses "hostNetwork: true"
supported: at least one resource injected..................................[ok]

Summary: 3 of 8 YAML document(s) injected
  deploy/emoji
  deploy/voting
  deploy/web
```

no pods injected:

```
hostNetwork: pods do not use host networking...............................[warn] -- deploy/emoji, deploy/voting, deploy/web, deploy/vote-bot use "hostNetwork: true"
supported: at least one resource injected..................................[warn] -- no supported objects found

Summary: 0 of 8 YAML document(s) injected
```

TODO: check for UDP and other init containers

Part of #1516

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-09-10 10:34:25 -07:00
Risha Mars 828ea29321
Fix sidebar dot colours for resources not receiving traffic (#1612)
Colour the dot gray in the sidebar if the resource isn't 
receiving traffic (i.e. success rate is null).
2018-09-07 14:26:36 -07:00
Risha Mars 761d8453a8
Add a new namespace overview page with expandable sections (#1605)
Adds a new page that shows all namespaces in an accordion. This will replace
ServiceMesh as the default landing page.

The page will request stats for all namespaces, and then pick the first meshed
namespace that's not the linkerd namespace to auto-expand in the accordion.

This branch also updates the definition of "added to the mesh" in the frontend
to be runningPodCount > 0 && meshedPodCount > 0 (previously, it was
runningPodCount === meshedPodCount, which would count resources with no pods as
"added").

I've also moved the link to /namespaces out of the top-level sidebar and into
the Resources sub-menu.
2018-09-07 13:30:52 -07:00
Kevin Lingerfelt f884caf56d
Upgrade protobuf to v1.2.0 (#1591)
* Upgrade protobuf to v1.2.0
* Fix Gopkg.lock
* Switch linkerd2-proxy-api dep back to stable

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-06 11:36:29 -07:00
Kevin Lingerfelt e4f14cab66
Use url query params for tap/top form filters (#1584)
* Use url query params for tap/top form filters
* Add comment explaining react-url-query onChange handlers

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-05 11:47:42 -07:00
Risha Mars d679c1fa0e
Error display fixes in web for the tap query handling. (#1583)
Previously, WebSocket error messages would appear with the first 
couple characters cut off. I've fixed this by using ws.WriteControl 
instead of ws.WriteMessage to write errors, as gorilla does in 
their example app.

- Use writeControl to write error messages to the client
- Stop the spinner if there is an error present
2018-09-05 10:28:59 -07:00
Dennis Adjei-Baah 127e496444
Make sidebar scrollbar independently (#1572)
For a better UI experience, the sidebar should be able to scroll independently from the detail view. This PR allows both the sidebar and the detail view to scroll independently.

fixes #1547

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-04 15:51:16 -07:00
Kevin Lingerfelt b5ff29c8aa
Add data plane check to validate proxy version (#1574)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-04 15:22:38 -07:00
Risha Mars 7f4fc308af
Link the resources in the Tap and Top tables to their detail pages (#1569)
Introduces a new helper, ResourceLink, that makes a prefixed link to the 
Resource Detail pages.
2018-08-31 15:53:02 -07:00
Kevin Lingerfelt c7a79da89c
Add data plane check to validate proxies are ready (#1570)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-31 15:51:57 -07:00
Risha Mars 0eaa9e4952
Tap the entire namespace if no resource is specified (#1558)
- Use an ant Select instead of Autocomplete for resource list, so that the user
can see all available tappable resources 

- Fix bug where the authority autocomplete wasn't showing any options 

- Adds "namespace/" as an option in the resource selection dropdown

This required some weird handling because we allow requests of the form
linkerd tap namespace/linkerd (taps namespace linkerd)
but not
linkerd tap namespace --namespace linkerd (does not work as intended, 
taps every namespace)
2018-08-31 15:50:48 -07:00