Commit Graph
99 Commits
Author SHA1 Message Date
Bryan Boreham 323aa46d1c fix (pipes): check websocket errors inside CopyToWebsocket()
Previously we were treating EOF on the reader as no-error, meaning
that operations like Kubernetes Describe would retry endlessly when
finished.
2020-05-06 10:04:40 +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
Bryan Boreham ade54ba84e probe: stop calling 'weave ps'
Now that we enter the container namespace to fetch IPs for every
container, there is no need to have 'weave ps' do it.

This does mean we lose Weave MAC addresses, but that is a rather
idiosyncratic feature anyway.
2018-06-02 22:22:08 +00:00
Roberto Bruggemann ea7853a612 Suggest how to disable weave errors and warnings
This applies when running scope deployments without Weave Net.
2017-12-15 18:08:37 +00:00
Matthias Radestock f305c35bfd do not report allocations in benchmarks
That's what -benchmem is for.
2017-12-07 20:27:31 +00:00
Tobias Klauser 89f3ce2e64 Simplify Utsname string conversion
Use Utsname from golang.org/x/sys/unix which contains byte array
instead of int8/uint8 array members. This allows to simplify the string
conversions of these members and the marshal.FromUtsname functions are
no longer needed.
2017-11-02 08:45:54 +01:00
Matthias Radestock 160ba8efa0 rename 'report_persistence' capability to 'historic_reports'
since that better captures the intent - the UI doesn't care about
reports get stored, but what reports it can retrieve.
2017-07-31 09:31:46 +01:00
Alfonso Acosta b7d292e161 Gather Weave Net plugin and proxy info from report
Instead of using Docker, because after Weave Net 2.0 there are no proxy nor
plugin containers.

This has the drawback of not detecting the plugin/proxy in systems running
Weave Net < 2.0 , but I think we can live with it.
2017-07-17 13:23:37 +00:00
Alfonso Acosta 7e7386a3fe Review feedback 2017-06-08 13:35:03 +00:00
Alfonso Acosta 6be7aa8be2 Add app capabilities to /api endpoint 2017-06-08 11:02:25 +00:00
Bryan Boreham f9a1ecbef0 Remove Gob from plugin spec - not used any more 2017-04-25 12:27:51 +00:00
Alfonso Acosta ae58cd7710 Fix stderr obtention
* The Stderr pipe should be read before waiting
* The Stderr pipe should not be used with Run/Output. See https://golang.org/pkg/os/exec/#Cmd.StderrPipe:

  Wait will close the pipe after seeing the command exit, so most callers need
  not close the pipe themselves; however, an implication is that it is incorrect
  to call Wait before all reads from the pipe have completed. For the same
  reason, it is incorrect to use Run when using StderrPipe.
2017-03-17 13:20:06 +00:00
Alfonso Acosta 31def70fc9 Improve error reporting when invoking weave script 2017-03-15 10:45:43 +00:00
Alfonso Acosta 051884d26a Embed Docker 1.13.1 (but force protocol 1.22) 2017-02-24 13:50:19 +00:00
Jonathan Lange 1020fc5f85 Use test.Diff from common 2016-12-07 11:22:40 +00:00
Jonathan Lange b5c750ddea Move test & fs 2016-12-07 11:22:39 +00:00
Jonathan Lange e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Tom WilkieandGitHub 21ee72a384 Add OpenTracing support to TimeRequestHistogram (#2023)
* Vendor open tracing

* Extend TimeRequestHistorgram to also emit opentracing spans.

* Update some of the labels
2016-11-22 14:43:15 +00:00
Mike LangandGitHub f9df493e44 Merge pull request #1971 from weaveworks/mike/errorhandler/implement-hijack
middleware/errorhandler: Implement Hijacker so it works with ws proxy
2016-11-10 14:39:06 -08:00
Mike Lang 7155292765 middleware: Update references in comments to why Hijacker is needed 2016-11-07 11:52:19 -08:00
Alfonso AcostaandGitHub 3ba83ddd53 Merge pull request #1973 from weaveworks/1938-enrich-weave-details-panel
Extend metadata in details panel for Weave Net nodes
2016-11-04 09:44:27 +01:00
Alfonso Acosta 0884955c95 Extend metadata in details panel for Weave Net nodes 2016-11-03 15:57:23 +00:00
SimonandGitHub 7e5166e45e Merge pull request #1966 from weaveworks/746-resize-ttys
Resize TTYs
2016-11-03 11:06:16 +01:00
Mike Lang 35cf10e1d6 middleware/errorhandler: Implement Hijacker so it works with ws proxy 2016-11-02 14:50:13 -07:00
Mike LangandGitHub 96058b1137 Merge pull request #1958 from weaveworks/mike/middleware/errorhandler
middleware/errorhandler: Fix a bug which meant it never works
2016-10-31 08:33:08 -07:00
Alfonso Acosta 253657887c Implement TTY resize for hosts 2016-10-31 12:11:25 +00:00
Alfonso AcostaandSimon Howe 2443f7a3c5 Implement resize control for docker TTYs 2016-10-31 11:04:40 +01:00
Alfonso AcostaandSimon Howe 37ba071feb Allow passing arguments to controls 2016-10-31 11:04:40 +01:00
Alfonso AcostaandSimon Howe c2f2a90b61 Implement App endpoint /pipe/{id}/resize_tty/{height}/{width} to resize ttys 2016-10-31 11:04:39 +01:00
Alfonso AcostaandGitHub b458c4c0c8 Merge pull request #1182 from weaveworks/1132-weave-topology
Add the basics for a Weave-specific topology.
2016-10-28 12:23:55 +02:00
Alfonso Acosta b6b343cbfd Review feedback 2016-10-28 08:58:45 +00:00
Mike Lang 6173e543c8 middleware/errorhandler: Fix a bug which meant it never works
Because methods operated on the value, not the reference, their changes
were discarded.
2016-10-27 17:08:42 -07:00
Mike Lang 0967bccaa2 appease linter 2016-10-26 13:48:10 -07:00
Alfonso Acosta f906511ded Add initial metadata in details panel and clarification comments 2016-10-26 09:09:01 +00:00
Mike Lang 7f528d1a78 middleware: Add an ErrorHandler middleware used to serve an alternate handler on a certain error code 2016-10-25 17:50:39 -07:00
Alfonso Acosta 8e4dfd7987 Add Weave peers view 2016-10-24 15:33:30 +00:00
Tom WilkieandGitHub 727404c9b8 Extend logging middleware to optionally only log failed HTTP requests (#1909)
* Extend logging middleware to optionally only log failed HTTP requests

* Add a preconfigured logger for logging failed requests, use it in the app.

* Wide definition of success
2016-10-07 18:03:36 -07:00
Tom WilkieandGitHub 39be421141 Allow a nil RouteMatcher in instrumentation (#1852)
So the instrumentation can be used for things other than gorilla.
2016-09-05 15:49:20 +01:00
Matthias Radestock 6d9194cfaf treat EOF and ErrClosedPipe in websocket connections as uninteresting
both occur in various states of disconnectedness
2016-08-05 23:32:34 +01:00
Matthias Radestock 25011f20e0 silence websocket.CloseAbnormalClose
We get this when windows are closed, so really should treat it just
like any other close.
2016-08-05 19:07:03 +01:00
Alfonso AcostaandGitHub 2132528823 Merge pull request #1720 from weaveworks/reduce-gc
Improve performance of immutable maps
2016-07-26 13:28:03 +01:00
Jonathan Lange cd716d3510 Delete unused instrumentation code 2016-07-26 12:27:50 +01:00
Alfonso Acosta ecc8a3138f Replace github.com/mndrix/ps by github.com/weaveworks/ps 2016-07-26 10:35:55 +00:00
Tom Wilkie 3173f6ad75 Use histograms over summaries 2016-07-12 11:15:57 +01:00
Paul Bellamy 7736564337 refactor some timing helpers into a common lib 2016-07-05 12:29:00 +01:00
Julius VolzandTom Wilkie 4fa40e22b2 Rework Scope metrics according to Prometheus conventions. (#1615)
* Rework Scope metrics according to Prometheus conventions.

- counters should end with _total
- elaborated and added units to help strings
- recommended for cache hit/miss metrics: track only the total and the
  hits and in separate metrics, since the most common query will be
  "hits / total"
- track all times in seconds (base units), which has become the standard
  recommendation
- other small changes

There could be more changes that would require more thinking (what
dimensions to use, summaries vs. histograms, etc.), but this is probably
enough controversial material already :)

* Use timeRequestStatus() in sqs_control_router.go.
2016-06-30 09:12:25 +01:00
Tom WilkieandGitHub ab3d34be01 Make it easier to disable weave integrations (#1610)
* Make it easier to disable weave integrations

* Review feedback

* Make test pass
2016-06-27 16:11:57 +01:00
Jonathan Lange 39c9de8e2a Get route name before munging request
This ought to correct a problem where we incorrectly report route names
for admin routes
2016-06-15 16:06:19 +01:00
Alfonso Acosta 80f72638ce Add Indentity middleware 2016-06-09 14:30:53 +00:00
Tom Wilkie 982189161b If we don't get a path name from the router, make one up from the url. (#1570)
* If we don't get a path name from the router, make one up from the url.

* Think about route naming a little more and add a comment to show it.
2016-06-09 12:48:22 +01:00