Bryan Boreham
b1917d909a
Move proxy attach from shell to Go
...
Note we don't need to propagate shell-script env vars now
2017-05-12 06:56:52 +00:00
Bryan Boreham
0a2521e7a4
Introduce StubProxy() so weaveutil can call functions on it
...
implies change type of docker client to weavedocker
so we can call things like Info() on it
2017-05-12 06:56:52 +00:00
Bryan Boreham
11d120bb5b
Debug log any error returned by exec-ing weave
2017-03-06 11:29:09 +00:00
Matthias Radestock
c25bfafcb2
refactor: make proxy log via a package-local var
...
which gets rid of a bunch of (dot) imports.
2016-03-20 08:31:23 +00:00
Adam Harrison
cb9af20a2e
Replace PROCFS with --pid=host
2016-03-01 20:10:47 +00:00
Adam Harrison
e2ec2b436d
Use netlink instead of shelling out to weave docker-bridge-ip
2016-02-04 14:00:01 +00:00
Bryan Boreham
1d3c80ab49
Merge pull request #1944 from weaveworks/issues/1940-remove-proxy-weaveps-dep
...
Use netlink instead of shelling out to `weave ps`
2016-02-04 13:45:58 +00:00
Adam Harrison
65c48707f6
Use netlink instead of shelling out to weave ps
2016-02-04 12:51:18 +00:00
Matthias Radestock
dde244160b
make proxy pay attention to WEAVE_HTTP_ADDR
2016-02-03 11:28:38 +00:00
Matthias Radestock
34ab86124b
fix typo
2016-02-02 20:31:38 +00:00
Paul Bellamy
0afc3db383
First pass at passing DOCKER_HOST=unix://* through to the weave and proxy
2015-12-15 18:02:27 +00:00
Paul Bellamy
ec5a1a3977
When container is started in host (or container) networkMode, we mount a noop weavewait, so it can continue
...
review feedback
2015-11-03 10:18:05 +00:00
Adam Harrison
4792fe6391
Improved detection of router container restart
...
Use the container name in addition to the entrypoint to avoid triggering
reattachment unnecessarily.
2015-10-27 14:41:26 +00:00
Bryan Boreham
697ee62d9a
Use entrypoint to detect weave router
2015-10-19 15:47:43 +00:00
Bryan Boreham
efb12f41b2
Also print intercepted responses
2015-10-15 15:07:02 +01:00
Bryan Boreham
05dbe23563
Print request and response json when debugging
2015-10-14 13:45:51 +01:00
David Wragg
b56ff7678c
Make code coverage work through the proxy
...
Previously, the proxy would run the weave script in ways that did
not run the weaver executable. Now they can. This is a problem because
of the contortions involved in using golang's code coverage support
in the integration tests, which require the weaver command line args to
be slightly mangled.
2015-10-12 21:27:11 +01:00
Paul Bellamy
fbb2c213a9
[proxy] all request modification is done through map[string]interface{}
...
That way we are less likely fall victim to go-dockerclient, or the API changing.
2015-10-12 15:53:07 +01:00
Bryan Boreham
c50968a0a4
Stop marshalling numbers as floats
2015-09-04 20:01:31 +01:00
Paul Bellamy
32a12578f3
Don't use go-dockerclient to en/decode inspects in the proxy
2015-09-04 13:40:07 +01:00
Paul Bellamy
19ceb424c3
[proxy] refactoring out common marshalling logic
2015-09-04 13:40:07 +01:00
Paul Bellamy
e21a204eed
[proxy] add --rewrite-inspect flag
...
To return the weave ip/mac for docker inspect calls.
2015-09-04 13:40:06 +01:00
Matthias Radestock
9a4bbb55da
Merge branch '1.0'
...
Conflicts:
proxy/common.go
weave
2015-07-14 18:09:25 +01:00
Paul Bellamy
acd8bdec21
[proxy] respect custom DOCKER_BRIDGE
2015-07-14 16:33:35 +01:00
Paul Bellamy
7821412bf7
[proxy] print all stderr from callWeave to the proxy logs, even if successful
2015-07-03 15:45:09 +01:00
Bryan Boreham
d82578d895
Replace logging calls with new style
2015-07-01 12:26:23 +01:00
Paul Bellamy
6c26a55b5a
[proxy] refactor weaveCIDRsFromConfig slightly
2015-06-17 14:51:12 +01:00
Paul Bellamy
ca681bce13
[proxy] Add support for WEAVE_CIDR=none
...
Tells the proxy not to do anything with this container. We set it when
running weaveexec/weave/etc containers, so that the weave script works
through the proxy.
2015-06-17 14:51:12 +01:00
Paul Bellamy
e3e5934c51
Merge remote-tracking branch 'upstream/0.11'
...
Conflicts:
proxy/common.go
2015-05-28 17:43:30 +01:00
Paul Bellamy
169eb19523
allow proxy to intercept unversioned (i.e. 1.0) urls
2015-05-28 16:24:02 +01:00
Matthias Radestock
fc9475592d
shorten proxy entrypoint
...
...so that the default output of the likes of `docker ps` shows some
of the real entrypoint/command.
Closes #768 .
2015-05-28 06:35:10 +01:00
Paul Bellamy
46bdd8c67d
Proxy support for IPAM
...
Pass `-e WEAVE_CIDR=` to your container to use IPAM. If IPAM is not
enabled on the weave router, the container will be booted without weave
networking.
I'm not crazy about adding *another* undocumented weave cli command
(ipam-cidr), but it saves the proxy messing around finding container
IPs.
2015-05-21 15:37:37 +01:00
Paul Bellamy
e6b587ea8d
proxy needs to add weavewait to execs as well
...
Bug came up in a test where we are restarting and doing an exec checking
a network interface right away. weavewait is only added if the container
has a WEAVE_CIDR var set, the same as at container creation.
2015-05-19 17:36:53 +01:00
Paul Bellamy
96a69d2303
Add dns support for the proxy
...
In the proxy, I swapped the 'flag' library for
'code.google.com/p/getopt', which uses double-dash flags.
proxy lets 'weave attach' do dns registration on container start
proxy needs to set DNSSearch if not specified
2015-05-19 10:34:45 +01:00