Commit Graph

468 Commits

Author SHA1 Message Date
Tom Wilkie
e7ab9816cd Use node:0.10 as the ui build image, and upgrade karma and karma webpack 2015-08-17 16:26:22 +00:00
Tom Wilkie
efeba4a2ed Use rebuild-image script from tools.git
- Add some extra files to build image
- Add make to UI build container
2015-08-17 16:26:06 +00:00
Tom Wilkie
3a1f376c29 Use tools.git 2015-08-17 16:26:04 +00:00
Tom Wilkie
9be81c520c Merge pull request #359 from weaveworks/use_sh_instead_of_bash
Use /bin/sh instead of /bin/bash so it can be used in boot2docker
2015-08-17 16:39:32 +01:00
Tom Wilkie
62a5fe364d Remove bash-ism 2015-08-17 14:54:16 +00:00
Alvaro Saurin
c34c80e368 Use /bin/sh instead of /bin/bash so it can be used in boot2docker 2015-08-17 14:50:29 +00:00
Tom Wilkie
a2ec507a14 Add apt-get update to circle 2015-08-17 12:58:03 +00:00
Paul Bellamy
a65b882901 Merge pull request #358 from weaveworks/endpoint
run.weave.works -> scope.weave.works
2015-08-17 11:13:12 +01:00
Tom Wilkie
b4d7b88265 run.weave.works -> scope.weave.works 2015-08-14 16:58:01 +00:00
Peter Bourgon
82e59bfe20 Merge pull request #351 from weaveworks/probe-id-header
Add X-Scope-Probe-ID header to POSTs
2015-08-13 14:03:38 +02:00
Peter Bourgon
43bfecbba4 Add X-Scope-Probe-ID header to POSTs 2015-08-13 13:01:58 +02:00
Tom Wilkie
9edc58f8ef Merge pull request #350 from weaveworks/service-args
Add parameter shortcut for SAAS
2015-08-12 14:56:58 +01:00
Tom Wilkie
8a7080c8d4 Merge pull request #349 from weaveworks/67-rm
Rm temporary containers.
2015-08-12 14:56:44 +01:00
Tom Wilkie
6f3828a431 Add parameter shortcut for saas 2015-08-12 12:04:06 +00:00
Tom Wilkie
e2a4bc9796 Rm temporary containers. 2015-08-12 11:45:24 +00:00
Paul Bellamy
106d16677f Merge pull request #347 from weaveworks/entrypoint-equals
Support --probe.foo=bar style in entrypoint.sh
2015-08-11 15:57:44 +01:00
Tom Wilkie
a17d0baf38 Support --probe.foo=bar style in entrypoint.sh 2015-08-11 13:54:19 +00:00
Tom Wilkie
6d4dfb59f7 Merge pull request #346 from weaveworks/fixing-circle
Fixing circle build
2015-08-11 14:24:02 +01:00
Paul Bellamy
ff86370df8 fixing and simplifying circle build
The integration tests were using two different versions of weave. One to
launch the weave container, and another used by scope.
2015-08-11 14:14:25 +01:00
Tom Wilkie
a69fad2283 Merge pull request #345 from weaveworks/no-probe
Add options for starting scope without app or probe.
2015-08-11 13:10:13 +01:00
Tom Wilkie
f4af9695f2 Add options for starting scope without app or probe. 2015-08-11 11:49:27 +00:00
Tom Wilkie
960c8e79a8 Merge pull request #344 from weaveworks/relative-paths
Relative paths for all API URLs
2015-08-11 10:57:47 +01:00
David Kaltschmidt
0e82f6b856 static build of relative paths 2015-08-11 09:50:34 +00:00
David Kaltschmidt
10c70595fb Make all URL request paths relative 2015-08-11 09:50:33 +00:00
Peter Bourgon
514f4bc534 Merge pull request #342 from weaveworks/reverse-publish
Probes POST to apps
2015-08-10 10:54:18 +02:00
Peter Bourgon
edf0ceb212 Authorization: Scope-Probe token=<token> 2015-08-07 18:52:16 +02:00
Peter Bourgon
7d51f173ea Probes POST to apps
- App takes POST report on /api/report
- Probe publishes to configured target(s)
- Name resolution happens on probe-side
- There's no longer an xfer.ProbePort
- xfer.Collector responsibility is reduced
- Fixes to remaining experimental components.
- rm experimental/bridge: it's not being used, and by changing the
  app/probe comm model, it would require a complete refactor anyway. We
  can easily rebuild it when we need to. It will even be much simpler.
- rm experimental/graphviz: it's broken for some time anyway, and we
  don't really need to play around with it as a rendering option
  anymore.
- rm experimental/oneshot: we never use this anymore.
2015-08-07 15:45:15 +02:00
Tom Wilkie
5a29b1b9fe Merge pull request #343 from weaveworks/no-logging-options-please
app may only log to stderr, just like probe
2015-08-06 19:12:57 +01:00
Peter Bourgon
3fd5fbcf25 app may only log to stderr, just like probe 2015-08-06 19:30:58 +02:00
Peter Bourgon
234b9cefeb Merge pull request #317 from weaveworks/sniff
gopacket sniffer
2015-08-06 16:21:12 +02:00
Peter Bourgon
3069ce01e0 Fix lockup bug on Linux 2015-08-04 12:15:15 +02:00
Peter Bourgon
0dafad763f Calculate rates in detailed nodes 2015-08-03 16:04:06 +02:00
Peter Bourgon
e1f7752a34 Split PacketCount to Egress and Ingress
Also, 1 packet may be counted in N topologies, so you can't rely on the
sum of all packet counts across topologies having any relation to the
sampling data.
2015-08-03 14:58:41 +02:00
Peter Bourgon
0361b11b87 Fix bugs in how we report bandwidth 2015-08-03 12:25:56 +02:00
Peter Bourgon
0aadf6447b Revert to correct edge construction
Another implicit invariant in the data model is that edges are always of the
form (local -> remote). That is, the source of an edge must always be a node
that originates from within Scope's domain of visibility. This was evident by
the presence of ingress and egress fields in edge/aggregate metadata.

When building the sniffer, I accidentally and incorrectly violated this
invariant, by constructing distinct edges for (local -> remote) and (remote ->
local), and collapsing ingress and egress byte counts to a single scalar. I
experienced a variety of subtle undefined behavior as a result. See #339.

This change reverts to the old, correct methodology. Consequently the sniffer
needs to be able to find out which side of the sniffed packet is local v.
remote, and to do that it needs access to local networks. I moved the
discovery from the probe/host package into probe/main.go.

As part of that work I discovered that package report also maintains its own,
independent "cache" of local networks. Except it contains only the (optional)
Docker bridge network, if it's been populated by the probe, and it's only used
by the report.Make{Endpoint,Address}NodeID constructors to scope local
addresses. Normally, scoping happens during rendering, and only for pseudo
nodes -- see current LeafMap Render localNetworks. This is pretty convoluted
and should be either be made consistent or heavily commented.
2015-08-03 10:55:59 +02:00
Peter Bourgon
64ebedccb1 Allow packet capture with effective sample rate 100% 2015-08-03 10:55:59 +02:00
Peter Bourgon
c7a06d2a43 Don't flat-embed sampling in the report
In the JSON representation, we want the Sampling data to be distinct.
2015-08-03 10:55:59 +02:00
Peter Bourgon
b9afa67ad6 gopacket-based traffic sniffing 2015-08-03 10:55:59 +02:00
Peter Bourgon
8fdbc44680 Merge pull request #339 from weaveworks/fix-render-map-bug
Fix a subtle bug in render mapping
2015-08-03 10:53:37 +02:00
Peter Bourgon
b3868c58d7 Fix a subtle bug in render mapping
During rendering, RenderableNodes are created by Map funcs, which take only
NodeMetadata. Previously, it was simply assumed that the relevant keys for a
given Map func would be present in the metadata. If that implicit invariant
failed, the returned RenderableNode would be invalid, with e.g. an ID of
"hostid::". That, in turn, would trigger undefined behavior later on in the
rendering workflow.

This bug was detected by creating a partial node metadata for a non-local
endpoint node. That node was detected during the first phase of rendering, and
given an invalid renderable node ID of "myhostname::", which prevented it from
attaching to TheInternet pseudonode. It eventually got removed from the  set
of valid nodes, which meant nodes that were adjacent to it suddenly became
orphans, and got filtered out by the FilterUnconnected step of the rendering
pipeline.

With this change, every map func checks for the presence of mandatory fields,
i.e. the fields that compose the resulting renderable node's ID.

Also,

- Add unit tests for LeafMapFuncs
- Topology Validate checks NodeMetadatas must not have nil Metadata
2015-08-03 10:43:07 +02:00
Peter Bourgon
ed337dc9aa Merge pull request #335 from weaveworks/fix-new-node-metadata
Fix new node metadata
2015-07-31 14:53:06 +02:00
Paul Bellamy
625a08bd21 forgot to remove reference to gce-parameterize branch of weave 2015-07-31 11:46:50 +01:00
Paul Bellamy
e5806f5318 Merge pull request #338 from weaveworks/334-fix-integration-tests
Fixing the build
2015-07-31 10:53:59 +01:00
Paul Bellamy
8aede5aaf9 Fixing the build
* override the weave template and hosts count for gce
* weave gce script wants jq as well now
* build the new weave go test runner
2015-07-31 10:31:07 +01: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
2a22cc29c2 Merge pull request #332 from weaveworks/dont-panic-on-darwin
Don't panic tests on Darwin.
2015-07-30 16:40:59 +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
Peter Bourgon
a565acc871 Unbreak the build 2015-07-22 14:26:09 +01:00