Commit Graph

37 Commits

Author SHA1 Message Date
Tom Wilkie
92b5b639dd Extend docker module testing. 2015-09-24 05:30:40 +00:00
Tom Wilkie
792e274745 Audit uses to Topology.Nodes, use AddNode where appropriate. 2015-09-23 07:36:51 +00:00
Tom Wilkie
7d6b5a540e Revert "Merge pull request #450 from weaveworks/scope-284"
This reverts commit 46345e3bdb, reversing
changes made to bf3e9a1601.

Conflicts:
	probe/process/walker_darwin.go
2015-09-15 03:14:39 +00:00
Alvaro Saurin
2f9f54688f Keep a cache of open files, reducing the number of open/close cycles in the /proc dir 2015-09-14 10:59:23 +02:00
Alvaro Saurin
14dc6a5391 Cache processes and connections when reading from the /proc
Code cleanups
2015-09-14 10:53:24 +02:00
Alvaro Saurin
4331fb1c79 Drop all the dependencies we had on procspy by moving some code to probe. 2015-09-14 10:44:53 +02:00
Tom Wilkie
2fdfa1cbf5 Fix flaky docker tests. 2015-09-14 05:09:33 +00:00
Tom Wilkie
c9f39d4129 Address one intermittent failure in registry_test.go 2015-09-14 04:57:56 +00:00
Tom Wilkie
57f7b4f2e6 Rename NodeMetadata -> Node 2015-09-03 16:18:54 +00:00
Tom Wilkie
afc2788777 Move EdgeMetadata into the NodeMetadata struct. 2015-09-02 14:32:44 +00:00
Tom Wilkie
1f6b3d4a45 Move Adjacency info inside the NodeMetadata struct; move pseudo node generation to the probes. 2015-08-28 15:20:27 +00:00
Tom Wilkie
142aa067ec Fix test 2015-08-27 15:25:24 +00:00
Peter Bourgon
44e6fd2adb Merge pull request #399 from weaveworks/topology-copy
Moar functional: Topology Merge methods don't mutate the receiver
2015-08-27 17:05:12 +02:00
Alfonso Acosta
4db80108bf Merge pull request #400 from weaveworks/docker-labels
Report docker container labels and render them in the details pane
2015-08-27 14:11:35 +01:00
Alfonso Acosta
9ba37402cf Report/render both image and container labels
Daemon labels will have to wait since the go client (Docker API v1.14) doesn't support
them yet (daemon labels were exposed in Docker API v1.16)

See https://godoc.org/github.com/fsouza/go-dockerclient#Client.Info for details.
2015-08-27 09:45:30 +00:00
Tom Wilkie
7c1ca152fa Fail if want != have! 2015-08-26 16:24:42 +00:00
Alfonso Acosta
529aa3d84f Use a metadata key per docker label 2015-08-26 15:49:13 +00:00
Alfonso Acosta
e1c05012ca Report docker container labels and render them in the details pane 2015-08-26 13:38:53 +00:00
Tom Wilkie
1ad1197051 Review feedback 2015-08-26 13:00:33 +00:00
Peter Bourgon
d5ab8177f6 probe: fixes for new merge semantics 2015-08-26 12:02:03 +01:00
Tom Wilkie
d8ac16d3f3 Gather container IP addresses from Docker and Weave, and apply them to nodes in the container topology. 2015-08-26 10:19:08 +00:00
Tom Wilkie
ac34ce8c57 Change log message to make it clear this probably isn't an error. 2015-08-25 10:03:44 +00:00
Peter Bourgon
b9afa67ad6 gopacket-based traffic sniffing 2015-08-03 10:55:59 +02:00
Peter Bourgon
3dd59c8b9b Fixes to NodeMetadata
NewNodeMetadata -> MakeNodeMetadata. It doesn't return a pointer, so
Make is more idiomatic.

Invoke MakeNodeMetadata when necessary. The zero value for a
NodeMetadata is no longer valid.

Split MakeNodeMetadata to two constructors. MakeNodeMetadata when you
don't have anything to prepopulate; MakeNodeMetadataWith when you do.

Also, a fix to the tests in app. We unmarshal a RenderableNode struct,
which has a JSON-ignored NodeMetadata field. The zero value is invalid,
so we need to fix that before performing comparisons.
2015-07-30 17:20:44 +02:00
Peter Bourgon
70ffde9de3 Merge pull request #333 from weaveworks/consistent-variable-naming
Fix some variable names
2015-07-30 17:04:46 +02:00
Peter Bourgon
fc308d93b8 Normalize var names; use Addr/Port key constants 2015-07-30 16:36:27 +02:00
Peter Bourgon
70f8c62415 Don't panic tests on Darwin.
Use the proper DialStub in the container setup.

Also, one change to increase test coverage.
2015-07-30 15:16:26 +02:00
Tom Wilkie
f85195308c report.Metadata -> map[string]string 2015-07-16 12:06:05 +00:00
Tom Wilkie
c2065836e2 Make NodeMetadata a struct, move existing map[string]string to NodeMetadata.Metadata 2015-07-15 10:06:36 +00:00
Tom Wilkie
9fc02d941e Fix flaky tests
- Make poll take interfaces, do diff on error
- Use poll in TestRegistryEvents
- Improve the locking to prevent deadlocks and data races in registry_test.go
2015-07-08 13:54:09 +00:00
Tom Wilkie
d2d73c3cd4 Add -cpu 4 to tests. 2015-07-06 15:07:33 +00:00
Paul Bellamy
95f941ff2d const-izing NodeMetadata fields 2015-07-02 14:51:12 +01:00
Peter Bourgon
f4b3930a19 Probe re-org
- tag/weave* -> package overlay
- tag/origin_host* -> package host
- tag/topology* -> package main
2015-06-30 10:18:00 +02:00
Tom Wilkie
b9e968ff43 Cache the walk of the process tree, reusing it in docker tagger and process reporter.
Update the cache every spy tick.

This change make CPU usage of scope on my box go from ~40% to ~17%.
2015-06-29 11:16:38 +00:00
Tom Wilkie
560cf66454 Refactor PIDTree
- Move pidtree to its own module and disaggregate it into tree, walker and reporter.
- Extend testing for probe/process
- Extend process metadata; add command line & # threads.
2015-06-23 09:40:35 +00:00
Tom Wilkie
c793e86d5b Expose some more information on containers. 2015-06-19 13:02:07 +00:00
Tom Wilkie
314af5ca89 Improve probe docker code quality & test coverage.
- Move docker probe code into it's own module
- Put PIDTree behind and interface for mocking
- Disaggregate dockerTagger into a registry, tagger and reporter
- Similarly disaggregate tests
- Add mocks for docker container and registry
- Add test for docker events & stats
2015-06-18 17:09:33 +00:00