Commit Graph

1116 Commits

Author SHA1 Message Date
Risha Mars 6d25d1471f
Indicate a --- for non-grpc requests (#1707)
Add --- for non-GRPC requests in the Tap table
2018-09-25 11:10:33 -07:00
Kevin Lingerfelt 3811c3f7f7
Fix web rendering when errors are encountered (#1710)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-25 10:22:55 -07:00
Dennis Adjei-Baah 254a10b13f
Add an initializing status icon when pods are initializing (#1689)
When pods or deployments are in an "Initialization" phase we currently see a "warning" icon that represents pods going under some kind of change. This may sometimes seem alarming when initially injecting pods after installing Linkerd.

This PR adds a new icon that shows up when pods are in the "PodInitializing" phase and shows the former "warning" icon when there is an error in starting pods.

fixes #1652

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-24 10:45:59 -07:00
Risha Mars b14ca77266
Stop trying to call setState on unmounted Tap and Top components (#1694) 2018-09-24 10:43:15 -07:00
Risha Mars e07814aab6
Draw SVG octopus arms in ResourceDetail inbound/outbound chart (#1693)
Draw customizable SVG paths for octopus arms.

This also combines all the unmeshed resources into a list and displays them in
one resource box, instead of adding one box per unmeshed resource. This helps
keep the box heights constant, which I want to draw the arrows.
2018-09-24 10:41:08 -07:00
Rodrigo Chacon 783bb1c3a7 cli: add support for LINKERD_NAMESPACE environment variable (#1695)
Signed-off-by: Rodrigo Chacon <rochacon@gmail.com>
2018-09-21 17:24:10 -07:00
Alena Varkockova 11c9b7425b Fix the debug message in endpoints watcher (#1658)
* Fix the debug message in endpoints watcher
* Use better method for converting

Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2018-09-20 13:03:45 -07:00
Risha Mars 378848052b
Upgrade web deps (#1688)
* run yarn upgrade webpack

* Run yarn upgrade webpack-dev-server
2018-09-19 13:29:36 -07:00
Dennis Adjei-Baah d23103111c
Move grpc tapClient initialization to goroutine (#1686)
When a resource has no tap events being streamed to the Tap UI, and a user hits the "Stop" button in the Tap page, the tap stream is left open due to the WebSocket connection not being closed.

It looks like the web server's tap client that is created to stream events from the tap server blocks the main request thread in the web server. This causes the web server to stop receiving any subsequent close frames from the UI i.e. when the "Stop" button is clicked.

This PR moves the tapClient initialization code to a separate goroutine, specifically, the goroutine that reads tap events from the incoming grpc tap stream. This allows the main thread to continue reading messages from the WebSocket connection and allow it to receive close frames.

fixes #1665

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-19 13:06:57 -07:00
Mathis Wiehl 30e6930a37 Clear table on new top start (#1687)
Closes #1683

Signed-off-by: Mathis Wiehl <mathis.wiehl@sinnerschrader.com>
2018-09-19 13:05:32 -07:00
Alena Varkockova 8ab9b4981b Make wait flag configurable for check and dashboard (#1654)
Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2018-09-19 10:42:29 -07:00
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