Adam Harrison
a3974c2aeb
Abort inspect exec rewrite unless Containers node is present
2016-01-20 14:24:28 +00:00
Bryan Boreham
357f67255e
Move logging of Docker API info to callers
2015-12-17 08:25:51 +00:00
Adam Harrison
ce18509aa7
Merge pull request #1781 from weaveworks/1754-no-with-dns
...
Remove --with-dns option from proxy
2015-12-16 14:02:30 +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
Adam Harrison
ce25f58639
weave launch-proxy accepts --no-multicast-route
2015-12-14 11:53:06 +00:00
Bryan Boreham
68d6c262d1
Remove --with-dns option from proxy
2015-12-12 14:12:39 +00:00
Paul Bellamy
ac1cf633c7
clarify some variable shadowing
2015-12-01 16:16:39 +00:00
Paul Bellamy
6f25d2170d
[proxy] have symlinking respond to WEAVE_DEBUG not DEBUG
2015-12-01 15:51:16 +00:00
Paul Bellamy
295a2ced32
[proxy] treat addrs prefix with / as unix addrs
2015-12-01 15:45:32 +00:00
Paul Bellamy
cd7c88e5a5
[proxy] Symlink sockets to /var/run/weave/weave.sock from inside the proxy
...
We copy docker.sock owner to symlinks. Permissions are not copied,
because the permissions will inherit from the target.
use versioned exec image to create symlinks
2015-11-30 15:45:30 +00:00
Paul Bellamy
3bae4b0d93
Revert "Automatically symlink /var/run/*.sock sockets to /var/run/weave/*.sock"
2015-11-20 16:23:40 +00:00
Adam Harrison
1432bd7a81
Merge pull request #1696 from weaveworks/1694-symlink-into-var-run
...
Automatically symlink /var/run/*.sock sockets to /var/run/weave/*.sock
2015-11-20 16:23:12 +00:00
Bryan Boreham
bbf26fc3e8
Raise minimum Docker version to 1.6 to address #1683
2015-11-20 10:44:45 +00:00
Paul Bellamy
77bc22baf5
[proxy] Auto-symlink /var/run/*.sock in from /var/run/weave/*.sock
...
Avoids the obscure warning for users
2015-11-17 17:25:21 +00:00
Matthias Radestock
878a12002c
set http listen address solely through the weave script
...
Previously it was set by the script only in fastdp mode; and in the
router's main.go otherwise. Yet every interaction of the script with
weave assumes the port is the script's HTTP_PORT=6784. By always
starting the router with options to listen on that port we ensure that
the router is in fact listening where the script expects it to.
In doing this get rid of router.HTTPPort. We do need to hard-code the
port in the proxy instead, but relying on router.HTTPPort was flawed
anyway, for the above reasons.
2015-11-07 18:01:12 +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
Bryan Boreham
f7cb2ef25d
have waitForStartByIdent() return an error
2015-10-30 13:46:30 +00:00
Bryan Boreham
949f8bb2e7
Move updateContainerNetworkSettings() into proxy
2015-10-30 13:34:16 +00:00
Bryan Boreham
5eaff802d4
Make inspect-rewrite wait if the start operation is still in progress
2015-10-30 13:34:16 +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
Paul Bellamy
bc9db72212
[proxy] Add notifyWaiters to fix anticipated race condition.
...
* User makes /start request, and blocks on the waiter
* ContainerStarted fires with ID
* Container goes away
* We try to inspect the container to get the entrypoint, which fails
* Previously, this wouldn't call notifyWaiters and the /start would hang (I expect)
2015-10-22 09:50:12 +01:00
Paul Bellamy
63339c026d
[proxy] return errors when attaching new containers
...
I had implemented this with a promise, but was informed that as
waitForStart is only called once, we are safe to just put the error into
the channel.
2015-10-21 13:05:05 +01:00
Adam Harrison
c5f5d4543e
Merge pull request #1518 from weaveworks/401-reattach-weave2
...
Get proxy to re-attach weave router if it restarts
2015-10-20 15:31:13 +01:00
Bryan Boreham
17b030cca1
Cope with client sending a HostConfig named HostConfig
2015-10-20 11:26:29 +01:00
Bryan Boreham
50198a2159
Don't create a HostConfig accidentally if none was passed in
2015-10-20 11:26:29 +01:00
Bryan Boreham
20c8b1eaf6
Reverse the sense of a test, to simplify the next change
...
and remove unused struct
2015-10-20 11:26:21 +01:00
Bryan Boreham
08f6dcf08d
Missing format
2015-10-19 15:47:44 +00:00
Bryan Boreham
697ee62d9a
Use entrypoint to detect weave router
2015-10-19 15:47:43 +00:00
Bryan Boreham
a87cc5c3b1
Get the proxy to re-attach the weave router if it sees it restart
2015-10-19 15:46:47 +00:00
Matthias Radestock
db9229f485
Merge pull request #1551 from weaveworks/1547-proxy-restart-no-kill-containers
...
Proxy restart shouldn't kill containers
Fixes #1547 .
2015-10-19 13:55:48 +01:00
Paul Bellamy
ace6c01b00
Review feedback
2015-10-19 13:53:20 +01:00
Bryan Boreham
50cc15af3b
Merge pull request #1477 from weaveworks/weave-1374
...
LGTM. Fixes #1374
2015-10-16 18:02:16 +01:00
Paul Bellamy
a0f0367e60
[proxy] don't kill containers when starting the proxy
2015-10-16 15:33:43 +01:00
Alvaro Saurin
6a674d0d67
Add hosts when attaching
2015-10-16 11:47:07 +02:00
Matthias Radestock
5c114fc6fe
Merge pull request #1536 from weaveworks/1515-print-json
...
Print request and response json when debugging weaveproxy
Fixes #1515
2015-10-15 15:59:35 +01:00
Bryan Boreham
efb12f41b2
Also print intercepted responses
2015-10-15 15:07:02 +01:00
Matthias Radestock
5f62f9edc7
Merge branch '1.1'
2015-10-15 13:05:35 +01:00
Bryan Boreham
05dbe23563
Print request and response json when debugging
2015-10-14 13:45:51 +01:00
Paul Bellamy
36de840c91
[proxy] only attempt to rewrite successful inspects
2015-10-14 11:28:43 +01:00
Tom Wilkie
5b8ce8ebae
Expose some tls functions from the proxy for use elsewhere.
2015-10-13 14:56:11 +00: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
375fd9140b
review feedback
...
* Opted to remove json path traversal, as it added more code than it saved.
2015-10-12 15:53:07 +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
Paul Bellamy
18872cc8ae
[proxy] remove status.sock before binding status.sock
2015-10-09 17:44:16 +01:00
Alfonso Acosta
c24dc6609d
[proxy] Handle null HostConfigs gracefully in start
2015-10-01 11:40:50 +01:00
Paul Bellamy
d704ba175f
[proxy] use a container-local unix socket to get the address, instead of logs
2015-09-28 16:08:25 +01:00
Paul Bellamy
547c9e7f5a
Removing confusing variable from getDNSDomain, just return "" when disabled
2015-09-22 15:09:32 +01:00
Paul Bellamy
3e4d8a3ffe
review feedback
2015-09-22 15:09:32 +01:00
Paul Bellamy
74c3b0d079
[proxy] Override sneaky /start HostConfig params
2015-09-22 15:09:32 +01:00
Paul Bellamy
b86d9bf1ab
[proxy] fix race condition when waiting for containers to start
...
If ContainerStarted fired before the response handler, then the "waiter"
chan would be nil, and the response handler would hang.
2015-09-22 12:50:36 +01:00