Commit Graph

2801 Commits

Author SHA1 Message Date
abuehrle
fc7d50a2ef formatting 2016-09-12 14:46:59 +00:00
abuehrle
5a2a46ba66 added vanilla cluster instructions 2016-09-12 14:46:58 +00:00
abuehrle
7b2fda375b open PR removed PC 2016-09-12 14:46:58 +00:00
Jacob Gadikian
e59b3b6859 Update installing.md 2016-09-12 14:46:57 +00:00
Jacob Gadikian
7f31665c0c Update installing.md 2016-09-12 14:46:57 +00:00
Jacob Gadikian
a6bfd565b3 Update installing.md 2016-09-12 14:46:57 +00:00
Mike Lang
8f8c0f2204 Merge pull request #1839 from weaveworks/mike/app/graceful-shutdown
Gracefully shutdown app, letting active http requests finish with timeout
2016-09-09 15:06:23 -07:00
Matthias Radestock
4edab4bfcb Merge pull request #1855 from weaveworks/extract-pluralize
refactor: extract pluralization
2016-09-09 21:42:49 +01:00
Matthias Radestock
bb4007e3cb refactor: extract a couple of map "constants" 2016-09-09 17:35:37 +01:00
Matthias Radestock
26cb5d53fc refactor: extract pluralization function
This preserves the existing behaviour of showing count=0 as a plural
rather than empty. However, I rather suspect we cannot actually
encounter that case in the current code.

In the "no count found" case we now *set* the base.LabelMinor to empty
instead of leaving it alone. This is ok since it is empty to begin with.
2016-09-09 17:35:33 +01:00
Matthias Radestock
7f7766425e refactor: dedup pod group summary functions 2016-09-09 17:33:14 +01:00
Paul Bellamy
d5c3e30f31 Merge pull request #1837 from kinvolk/alessandro/tcd-status
Traffic Control plugin: first iteration
2016-09-09 15:36:06 +01:00
Alessandro Puccetti
f2c2ce9d33 plugins/traffic-control/docker: integrate loopIteration() into Start()
Move `loopIteration()` code in an anonymous function inside `Start()`.
2016-09-09 13:57:21 +02:00
Alessandro Puccetti
10d33fb24f plugins/traffic-control: fix output for getStatus()
If `tc qdisc show dev eth0` returns an error, then output is set to empty string.
2016-09-09 13:57:21 +02:00
Alessandro Puccetti
deea4d9af1 plugins/traffic-contorl: fix error message in getNSID
Return error message that show what fails and why.
2016-09-09 13:57:21 +02:00
Alessandro Puccetti
097225332a plugins/traffic-control: switch to http.ServeMux
It is nicer to instantiate a http.ServeMux, instead of modifying
the global http handler.
2016-09-09 13:57:21 +02:00
Alessandro Puccetti
3bd6e4c88d plugins/traffic-control: fix Makefile 2016-09-09 13:14:24 +02:00
Alessandro Puccetti
c722edf534 plugins/traffic-control: export trafficControlStatus
Rename trafficControlStatus to TrafficControlStatus, because lint complains.
2016-09-09 13:14:24 +02:00
Alessandro Puccetti
01b6bc5be6 plugins/traffic-contorl: split DoTrafficControl()
For clearer code `DoTrafficControl()` is splitted in multiple functions.
2016-09-09 13:14:24 +02:00
Alessandro Puccetti
f6708503f0 plugins/traffic-control: add helper functions to trafficControlStatus
SetLatency and SetPacketLoss handle the empty value that is represented by "-".
2016-09-09 13:14:24 +02:00
Alessandro Puccetti
00a87922e6 plugins/traffic-control: code refactoring
Substitute `split()` with `strings.Fileds()`.
Remove unnecessary functions and commented code.
Unabbreviate variable and function names.
2016-09-09 13:14:24 +02:00
Alessandro Puccetti
9b86143deb plugins/traffic-control: README
Added simple README to give an overview of the plugin.
Also the value of the latency controls were changed.
2016-09-09 12:32:10 +02:00
Alessandro Puccetti
71f9d8874f plugins/traffic-control: Some style fixes
Comment before exported functions.
When `if` block ends with a return statement, drop the else and outdent its block.
2016-09-09 12:31:53 +02:00
Mike Lang
5a4ee00b58 app: Add graceful shutdown for http server
This will let it finish up existing connections before exiting,
which makes things like rolling restarts behave much better.
2016-09-08 15:43:54 -07:00
Alessandro Puccetti
2bbcd415d1 plugins/traffic-control: add table prefix constant
For cleaner code
2016-09-06 11:53:36 +02:00
Alessandro Puccetti
c213270028 plugins/traffic-control: remove latency and packet loss from generic metadata
Latency and packet loass are displayed in the table, there is not need to
show them in the general section too.
2016-09-06 11:53:36 +02:00
Alessandro Puccetti
c0fca6d2be plugins/traffic-control: spilt getControls()
This is done to make easier get specific controls when MetadataRow will
accept controls.
2016-09-06 11:53:36 +02:00
Alessandro Puccetti
83c8e7af34 plugins/traffic-control: latency and packet loss can be combined
This patch allows to set latency and packet loss parameters together
by "adding" the new paramter to the qdisc.
2016-09-06 11:53:36 +02:00
Alessandro Puccetti
79453519b2 plugins/traffic-control: separate function for clear settings
Make easier to combine latency and packet loss settings.
2016-09-06 11:53:36 +02:00
Alessandro Puccetti
176cb5f99f plugins/traffic-control: added packet drop control
Packet drop control set 10% of packet drop
2016-09-06 11:53:36 +02:00
Alessandro Puccetti
5d3e5b23ec plugins/traffic-control: added clear setting control
This control remove any previous setting
2016-09-06 11:53:35 +02:00
Alessandro Puccetti
6eefb70628 plugins/traffic-control: add packet loss to the report
This patch add packet loss to the report and the appropriet metadata template.
2016-09-06 11:53:35 +02:00
Alessandro Puccetti
8cbd2c2db6 plugins/traffic-control: create Traffic control table
The traffic control plugin will display the status in this table.
2016-09-06 11:53:35 +02:00
Alessandro Puccetti
9df70ec380 plugins/traffic-control: refactoring
Use string for delay and packet loss parameter, code refactoring,
improved error messages, fix typos, add empty status representation,
fix namesapce ID representation.
2016-09-06 11:53:35 +02:00
Alessandro Puccetti
a743b59dcf plugins/traffic-control: added status caching
To avoid to run `tc` every tic to get the qdisc status, we cache it.
The cache is updated every time a value is changed via the control interface.

NOTE: This will keep track only of the changes by done the plugins interface,
if the qdisc parameters are changed by another applcation or by the user
via terminal, such changes will not be caught.
2016-09-06 11:53:35 +02:00
Alessandro Puccetti
068c366aa8 plugins/traffic-control: add status information in metadata
This patch sends the delay and packet loss values along with
the container metadata. In this way the user has a direct feedback
about the traffic control plugin status.
2016-09-06 11:53:35 +02:00
Krzesimir Nowak
c5cc9814fe Add an example traffic control plugin
As it is an initial implementation, it only controls latency of the
outgoing (egress) traffic. There is also a TODO to turn this plugin
into something more serious. Also, at some point we may consider
moving this plugin outside of "example" directory.
2016-09-06 11:53:35 +02:00
Krzesimir Nowak
467ad884f6 Vendor github.com/containernetworking/cni/pkg/ns
We will use this code to execute the code in some process' network
namespace.

I did the vendoring a bit differently, as gvt seems to be a bit dumb
about getting dependencies for test packages (it tried to vendor
ginkgo and gomega, since cni tests are using it).

Also, instead of vendoring golang.org/x/sys as
github.com/containernetworking/cni/vendor/golang.org/x/sys I moved it
to scope's vendor directory.
2016-09-06 11:53:34 +02:00
Tom Wilkie
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
b0a630590c Merge pull request #1850 from weaveworks/1847-reverse-resolve-inbound
correctly reverse resolve source of inbound connections

Fixes #1847
2016-09-05 14:09:56 +01:00
Matthias Radestock
9d010fabc8 refactor: extract makeEndpointNode helper 2016-09-02 21:12:23 +01:00
Matthias Radestock
5bc3a9d5ac correctly reverse-resolve source of inbound connections
There were two problems:
- the renderer was looking for reverse names on the destination
- the probe was not annotating source nodes with reverse-resolved names

Fixes #1847
2016-09-02 20:31:03 +01:00
Matthias Radestock
813ea780dc Merge pull request #1843 from weaveworks/1495-internet-connection-count
fix internet connection counts

Fixes #1495.
2016-09-02 16:27:36 +01:00
David
58d97bfdee Merge pull request #1818 from weaveworks/plugin-controls-ui
Add support for table based controls
2016-09-02 15:23:32 +02:00
Simon
48cdbf6d7d Merge pull request #1790 from weaveworks/1639-add-term-popout-tooltip
Adds tooltip to terminal-popout button
2016-09-02 12:53:31 +02:00
Matthias Radestock
abd59fda2d lookup localNodeID in r.Endpoint.Nodes
and refactor the connection{} construction so we can add some
explanation of what is going on here.
2016-09-02 11:38:44 +01:00
Matthias Radestock
3ebe4a5303 cosmetic: formatting 2016-09-02 08:19:32 +01:00
Matthias Radestock
cf4eee11a7 fix internet connection counts
For counting we were using a table keyed on a struct containing Node
pointers. For connections between ordinary nodes this works just
fine. But for connections to/from the Internet node we want to track
individual address/port combinations, which involves an extra
lookup. Since our data structures generally contain values, not
pointers, this produces aliases. As a result n connections from/to a
node to/from a specific Internet IP+port would result in n rows in the
count table, each with a count of 1, instead of one row with a count of
n.

Things wouldn't be so bad if it was actually rendered like that -
annoying, but at least accurate - but...

Each row has an ID which is computed from the node IDs and ports. Not
Node references. The ID must be unique - the frontend will only
render *one* thing per ID. Since the row IDs of our n rows are all the
same, we see one row with a count of 1 instead of n rows with a count of
1.

Furthermore, since the frontend's table row limiting is counting rows,
not unique row IDs, a) fewer rows would be rendered than expected, and
b) the displayed count of the number of extra rows would be too high.

The fix is to replace the Node pointers in the key with Node IDs. This
does require an extra table lookup when we come to produce the rows, but
that is just a fairly cheap map lookup.

Fixes #1495.
2016-09-01 21:51:20 +01:00
Simon Howe
024b526ef0 Try out a label rather than icon for open-term-in-new-browser
We call it, POP OUT. And we think you're going to love it.
2016-09-01 18:13:35 +02:00
Simon Howe
cbd8c7aba2 Adds tooltip to terminal-popout button
- Fixes react warning p > div.
- Adds esc to close popped out terminal.
2016-09-01 18:13:34 +02:00