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
Paul Bellamy
e39974eb07
Merge pull request #1210 from weaveworks/401-proxy-start-events
...
make proxy attach network on docker start event
2015-09-15 10:18:48 +01:00
Bryan Boreham
76895c76a1
Use Mutex instead of RWMutex, for simplicity
2015-09-14 17:11:56 +01:00
Bryan Boreham
c50968a0a4
Stop marshalling numbers as floats
2015-09-04 20:01:31 +01:00
Alfonso Acosta
ce5dd847e9
[proxy] Add --hostname-from-label
...
This allows registering container hostnames based on a label provided when
creating the container.
2015-09-04 17:02:07 +01:00
Matthias Radestock
633df0cdaf
refactor: extract docker API endpoint regexp creation
2015-09-04 13:40:07 +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
Paul Bellamy
704e6a8676
errcheck says I should handle this case
2015-09-04 10:40:47 +01:00
Bryan Boreham
1e2344341d
Wait for container to be attached before returning from {re}start request
2015-09-01 17:48:22 +01:00
Bryan Boreham
9ae6435317
Attach existing weave containers at startup
2015-09-01 17:48:22 +01:00
Bryan Boreham
81e8ba223f
Do network attach on docker event rather than intercepting start and restart commands.
...
This means it also works when the docker daemon restarts a container.
2015-09-01 17:48:12 +01:00
Matthias Radestock
8960a3a898
Merge branch '1.0'
...
Conflicts:
proxy/create_exec_interceptor.go
test/600_proxy_docker_py_test.sh
2015-08-28 20:29:43 +01:00
Matthias Radestock
24de98e188
refactor
2015-08-28 18:08:24 +01:00
Paul Bellamy
6b5f35e574
[proxy] Only replace the request body if we've modified it.
...
This is a temporary fix for a failure in docker-py tests:
"test_valid_no_config_specified".
2015-08-28 15:09:33 +01:00
Bryan Boreham
3d25620d13
In proxy, rewrite /etc/hosts from 'weave attach', via new utility weavehosts
2015-08-27 15:03:41 +01:00
Bryan Boreham
6e89b036e2
Wait for ethwe via netlink, not via polling or signals
...
('docker kill' breaks restart policy)
2015-08-27 15:03:41 +01:00
Matthias Radestock
375af0a7b9
Improve log messages for when the proxy ignores a container
...
- 'ignoring' could be misread as 'dropped request', so change that to
'leaving container alone'
- more elaborate reasons
2015-08-17 16:15:45 +01:00
Matthias Radestock
067f96023a
correct option name in log message
2015-08-17 09:37:46 +01:00
Paul Bellamy
0de292c0d4
[proxy] attach containers with --net=none to weave
2015-08-14 13:48:32 +01:00
Matthias Radestock
d5de0b41f9
Merge branch '1.0'
...
Conflicts:
proxy/proxy.go
2015-08-13 13:57:02 +01:00
Paul Bellamy
4961e83686
[proxy] support new docker 1.8 --net="default"
2015-08-13 13:36:47 +01:00
Paul Bellamy
f70dc6660a
[proxy] lock docker api usage to 1.15
2015-08-13 13:36:47 +01:00
Tom Wilkie
42debde746
Merge pull request #1259 from weaveworks/1257-proxy-chunking
...
Proxy chunking should handle arbitrarily large chunks
2015-08-10 15:57:19 +01:00
Paul Bellamy
6d7e784c25
review feedback
2015-08-10 11:02:51 +01:00
Paul Bellamy
f55655216f
[proxy] rewrite /etc/hosts from outside the container
...
Avoids problems when container user is non-root. Added a test for this
and the --no-rewrite-hosts flag.
2015-08-06 13:14:18 +01:00
Paul Bellamy
b85b90ef4e
Proxy chunking should handle arbitrarily large chunks
2015-08-04 17:47:51 +01:00
Paul Bellamy
1d1ebc103d
Merge remote-tracking branch 'upstream/1.0'
2015-08-04 14:29:12 +01:00
Paul Bellamy
7cc53c4c68
[proxy] Handle case where no command is specified.
...
The docker daemon can't do this because we set /w/w.
2015-08-04 12:32:42 +01:00
Paul Bellamy
55051f0194
Merge remote-tracking branch 'upstream/1.0'
2015-07-31 11:01:19 +01:00
Paul Bellamy
4958b8d37a
[proxy] Mount /w from the host for weavewaited containers
...
We set it at container create. Had tried also setting it at start, but
it seems to cause weird behaviour, and there is no way to do it from the
CLI.
2015-07-30 15:11:03 +01:00
Paul Bellamy
e2389a4061
[proxy] Don't try to attach if container failed to start
2015-07-30 13:31:47 +01:00
Matthias Radestock
3c107d675a
Merge branch '1.0'
2015-07-21 11:42:49 +01:00
Paul Bellamy
aa8466f688
[proxy] Mount weavewait readonly so it can't be tampered with
2015-07-21 11:30:56 +01:00
Paul Bellamy
dba116bae1
Merge remote-tracking branch 'upstream/1.0'
2015-07-21 10:13:24 +01:00
Michael Bridgen
c44c61dc83
Merge branch '1103-proxy-chunking' of github.com:weaveworks/weave into pr1112
2015-07-20 15:09:50 +01:00
Paul Bellamy
11663dd29f
[proxy] rewrote chunked response handler
...
1) We cannot send "Connection: close", because the fsouza docker client
expects the tcp socket to stay open between requests.
2) Because we cannot force-close the connection, we can't hijack the
connection (because go's net/http doesn't let use un-hijack it).
3) Because we need to maintain the individual chunking of messages (for
docker-py), we can't just copy the response body, as Go will remove and
re-add the chunking willy-nilly.
Therefore, we have to read each chunk one-by-one, and flush the
ResponseWriter after each one.
2015-07-20 14:43:16 +01:00
Paul Bellamy
3f4b385b0f
[proxy] If we can't CloseWrite a connection (tls), just Close it so clients don't hang
2015-07-17 14:09:27 +01:00
Paul Bellamy
5fc16a8267
[proxy] use a waitgroup as it's more semantically accurate
2015-07-17 14:08:51 +01:00
Paul Bellamy
a0876becbc
Merge remote-tracking branch 'upstream/1.0'
...
Conflicts:
proxy/create_container_interceptor.go
proxy/create_exec_interceptor.go
proxy/proxy.go
proxy/start_container_interceptor.go
2015-07-16 15:29:29 +01:00
Paul Bellamy
c6fa9cb17e
refactor weaveCIDRsFromConfig to return an error message
2015-07-16 15:15:32 +01:00
Paul Bellamy
9619a27f8c
[proxy] adding log message for ignored containers
2015-07-16 14:01:22 +01:00
Paul Bellamy
c13154eea9
updating comment as per golint
2015-07-16 13:58:30 +01:00
Paul Bellamy
1132d26d47
[proxy] do not weave attach containers in '--net=host|container:<name|id>'
2015-07-16 13:58:27 +01:00