Commit Graph
4222 Commits
Author SHA1 Message Date
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 NowakandAlessandro Puccetti 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 NowakandAlessandro Puccetti 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 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 RadestockandGitHub 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 RadestockandGitHub 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
DavidandGitHub 58d97bfdee Merge pull request #1818 from weaveworks/plugin-controls-ui
Add support for table based controls
2016-09-02 15:23:32 +02:00
SimonandGitHub 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
SimonandGitHub 574deeea9f Merge pull request #1823 from weaveworks/1809-make-services-initial-topo
Makes services the initial topology if available
2016-09-01 17:21:54 +02:00
DavidandGitHub 56f99fc665 Merge pull request #1836 from weaveworks/1825-fix-plugin-renderer
Fixes plugin renderer in status line
2016-09-01 14:47:34 +02:00
SimonandGitHub 0f06f0a257 Merge pull request #1822 from weaveworks/1802-sort-non-number-cols-default-ascending
Sort non-number columns ASCending by default.
2016-09-01 14:35:20 +02:00
Simon Howe 343a986951 Check for all k8s topos before defaulting to container topo
- Show something from k8s by default if its around.
2016-09-01 14:15:52 +02:00
Simon Howe eeeb1385c5 Makes services the initial topology if available
- Otherwise reverts to containers
2016-09-01 14:15:52 +02:00
Simon Howe a1dd4eb996 Small refactor of case insensitive table sorting. 2016-09-01 14:14:31 +02:00
Simon Howe 35ccc9acd1 Sory by label properly + sort case insensitivly! 2016-09-01 14:14:31 +02:00
Simon Howe 66191bd649 Correct sort order of label column on initial table load
- We still have a heuristic: sort first mertric column we find desc.
- If there is no metric sort by label column ascending
2016-09-01 14:14:31 +02:00
Simon Howe 66561e1d8e Sort non-number columns ASCending by default.
- And number columns DESCending by default.
- default: when you sort by that column for the first time.
2016-09-01 14:14:30 +02:00
Mike Lang 46249fd403 vendor github.com/tylerb/graceful and dependencies 2016-08-31 18:07:56 -07:00
David Kaltschmidt 8ac4d0bb62 Fixes plugin renderer in status line
The code assumed a plugin object was JS, but it's actually an immutable.
Calling `toJS` to fix.

Fixes #1825
2016-08-30 16:53:22 +02:00
Alfonso AcostaandGitHub fd82651f96 Merge pull request #1828 from weaveworks/1826-conntrack-into-kernel
Improve conntrack kernel-support detection for in-kernel compilations
2016-08-30 11:45:55 +01:00
Alfonso Acosta 7702905bbf Remove unused variable 2016-08-26 14:03:29 +00:00
Alfonso Acosta a904620908 Improve conntrack kernel-support detection for in-kernel compilations 2016-08-26 14:03:29 +00:00
Matthias Radestock fa784140a4 appease linter 2016-08-26 14:50:45 +01:00
Alfonso Acosta 151ce44d37 Merge commit '4fe078a730d70c7936f1c43a1eca881f934bffce' 2016-08-26 13:17:55 +00:00
Alfonso AcostaandGitHub 4fe078a730 Merge pull request #39 from weaveworks/fix-wrong-subtree-use
Sync changes done directly in scope/tools
2016-08-26 14:03:13 +01:00
Alfonso Acosta 3f4934d941 Remove generate_latest_map 2016-08-26 12:29:46 +00:00
Matthias RadestockandGitHub a5b491dd46 Merge pull request #1833 from weaveworks/simplify-container-stats
use go-dockerclient's Client.Stats

Fixes #1799
2016-08-26 13:07:16 +01:00
Alfonso Acosta 48beb60bbe Sync changes done directly in scope/tools
Applies tools changes from:

commit 7f46b90e27
Author: Krzesimir Nowak <krzesimir@kinvolk.io>
Date:   Thu Jul 21 11:55:08 2016 +0200

    Make LatestMap "generic"

    This commit makes the LatestMap type a sort of a base class, that
    should not be used directly. This also adds a generator for LatestMap
    "concrete" types with a specific data type in the LatestEntry.

commit 0f1cb82084
Author: Krzesimir Nowak <krzesimir@kinvolk.io>
Date:   Thu Jul 28 14:26:08 2016 +0200

    Allow testing only a subset of directories

    This can be done by calling TESTDIRS="./report ./probe" make tests

commit 97eb8d033d
Author: Krzesimir Nowak <krzesimir@kinvolk.io>
Date:   Thu Aug 4 11:44:21 2016 +0200

    Do not spell check Makefiles and JSON files

    Spell check does not handle JSON files very well. It finds misspelled
    words in hexadecimal hashes (like misspelled "dead" in "123daed456").

    Ignore Makefiles too - there is not so much free text to spell check
    and the spell check complains about words it was told by Makefile to
2016-08-26 11:55:56 +00:00
Matthias Radestock 3c4833fe97 use go-dockerclient's Client.Stats
...instead of rolling our own.

This also fixes #1799 - a race condition that could result in multiple
stats gatherers for a container.
2016-08-26 12:43:30 +01:00
Alfonso AcostaandGitHub 45dcdd584d Merge pull request #37 from weaveworks/fix-mflag-missing
Use mflag package from weaveworks fork until we find a better solution
2016-08-26 12:24:52 +01:00
Alfonso Acosta b895344d2b Use mflag package from weaveworks fork until we find a better solution 2016-08-26 11:02:46 +00:00
Alfonso AcostaandGitHub 7c2e3c87d3 Merge pull request #1832 from weaveworks/1824-wrong-pod-parents
Only consider pod parents living in the same namespace
2016-08-26 11:37:28 +01:00
Matthias RadestockandGitHub af48c7f240 Merge pull request #1830 from weaveworks/1664-correct-cpu-metrics
correct cpu metrics

Fixes #1664.
2016-08-26 11:18:56 +01:00
Alfonso Acosta 8a7812eab9 Only consider pod parents living in the same namespace 2016-08-25 16:05:01 +00:00
Matthias Radestock e2a80cfa14 correct host cpu metric
The host CPU metric was reported as a percentage of all available CPUs,
but the limit was set to n_cpus * 100%. So on a 4-core machine the
graphs and metrics-on-canvas would never show more than 1/4th usage. Now
the limit is set to 100%.

Fixes #1664.
2016-08-25 16:14:42 +01:00
Matthias Radestock b209d22e08 normalise container CPU metrics to 100%
The container CPU metric was reported in units of 100% = 1 CPU. So the
the ratio was correct, but since we don't show limits in most places it
is hard to interpret that figure. It also makes sorting by CPU usage
highly misleading. So now we normalise everything to 100%. That too can
be misleading, depending on what you are looking for, but it's generally
less surprising.
2016-08-25 16:13:36 +01:00
Alfonso AcostaandGitHub b56cc41527 Merge pull request #1821 from weaveworks/1698-make-shells-login
Use login shells in terminals
2016-08-25 15:04:11 +01:00