245 Commits
Author SHA1 Message Date
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
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