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
Bryan Boreham
70b595c4a2
Clarify status message when allocator is awaiting consensus
2015-05-19 14:12:08 +01:00
Matthias Radestock
f59facf5a6
Merge pull request #701 from bboreham/684-improve-errors
...
Improve ipam error messages
Closes #684 .
2015-05-19 13:34:22 +01:00
Bryan Boreham
0e55f75d86
Oops
2015-05-19 13:16:36 +01:00
Bryan Boreham
ee7dac9e28
Improve error messages
...
Make clear that they come from the IP allocator, and reduce repetition in the text.
Also include the nickname for other peer, if known.
2015-05-19 12:37:57 +01:00
Matthias Radestock
9f85cbc07d
Merge pull request #696 from bboreham/692-ipam-status
...
Document ipam additions to `weave status`
Closes #692 .
2015-05-19 12:05:53 +01:00
Bryan Boreham
454bbdbc68
Make reference into a link
2015-05-19 11:48:11 +01:00
Paul Bellamy
62242cb640
fixup bad golint refactor
2015-05-19 11:46:03 +01:00
Bryan Boreham
9363193fe8
Review feedback
2015-05-19 11:43:59 +01:00
Matthias Radestock
29601610c0
Merge pull request #698 from paulbellamy/proxy-minimal
...
remove usage of backticks in sh script
2015-05-19 11:33:00 +01:00
Paul Bellamy
fdd0bd3b35
remove usage of backticks in bash script
2015-05-19 11:26:55 +01:00
Bryan Boreham
4d3234aa36
Merge pull request #695 from rade/merge_ipam_tests_with_rest
...
LGTM
2015-05-19 11:25:50 +01:00
Matthias Radestock
8b66b8ae47
Merge pull request #655 from paulbellamy/proxy-minimal
...
Minimal implementation of the proxy
closes #47 , closes #230 , closes #251 , closes #400 .
2015-05-19 10:59:00 +01:00
Paul Bellamy
ee07d645b4
golint cleanup of else block
2015-05-19 10:47:57 +01:00
Bryan Boreham
bffe9f811a
Document 'weave status' section for IPAM
2015-05-19 10:41:45 +01:00
Bryan Boreham
b6a8c48097
Tidy up IPAM parts of 'weave status'
...
- removed detailed "free" and "owned" printout of 'space'
- removed "free" counts from ring lines - limited usefulness and often out of date.
- removed trailing newline
- changed "Ring" to "Owned Ranges"
- print subnet in CIDR format
2015-05-19 10:38:26 +01:00
Paul Bellamy
b71a428369
proxy should be sending error code to client, instead of exiting
2015-05-19 10:34:46 +01:00
Paul Bellamy
6911dc8d38
updating proxy with-dns description to match docs
2015-05-19 10:34:46 +01:00
Paul Bellamy
1e7c82bb58
use busybox instead of ubuntu for proxy image pulling test
...
busybox is smaller. gliderlabs/alpine is even smaller, but is used by
weaveexec, so we can't remove it.
2015-05-19 10:34:46 +01:00
Paul Bellamy
2f8c5d7bd9
proxy interceptors implicitly modify arguments, instead of returning them
2015-05-19 10:34:46 +01:00
Matthias Radestock
126d4f4079
some refactoring and tidying
...
- some inlining
- compile regexps once
- consistent error messages
- always mention container id in startContainerInterceptor errors
2015-05-19 10:34:46 +01:00
Paul Bellamy
ca4b8e6f8e
add proxy support for 'docker restart'
2015-05-19 10:34:46 +01:00
Paul Bellamy
2a120e5565
refactor proxy rawStream handler
2015-05-19 10:34:46 +01:00
Paul Bellamy
6fa0a9d70c
moving weaveproxy docs off 'experimental-features'
2015-05-19 10:34:46 +01:00
Paul Bellamy
55d17ba3bf
separate proxy package into weaveproxy and proxy
2015-05-19 10:34:46 +01:00
Paul Bellamy
bedc20c7c1
extract docker-bridge-ip fetching from proxy into bash script
2015-05-19 10:34:46 +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
Paul Bellamy
444b1482fa
add weavewait
...
binocarlos/wait-for-weave is Apache2 licensed, so attribution/etc applies. Thus, we
re-invent the wheel here.
2015-05-19 10:34:45 +01:00
Paul Bellamy
9389001a1d
[docs] Initial version of proxy docs
2015-05-19 10:34:45 +01:00
Paul Bellamy
5a6a67f632
Add integration test for the proxy, using docker-py client
2015-05-19 10:34:45 +01:00
Michael Bridgen
6c4271f15d
Add launch-proxy command to cli
...
Use curl /weave to wait for the proxy to boot before returning.
2015-05-19 09:48:12 +01:00
Michael Bridgen
6d7de3ddff
Proxy implementation
...
This adds a docker remote API proxy to the weaveexec image. The proxy
has hooks for (post-) container start and (pre-) container create; the
former attaches a weave interface to a container given a WEAVE_CIDR
environment entry, and the latter adjusts the entrypoint of a container
to wait for the ethwe interface.
Notes:
None of the hooks need to inspect/change large bodies. In order to avoid
a crash when handling images larger than memory we need to ensure that
the entire request body is never loaded into memory (i.e. No
ioutils.ReadAll).
When proxying a raw-stream response, we can't use http.WriteHeader. It
sets the Transfer-Encoding to chunked, which will throw off the clients.
Instead we have to hijack the socket, and write out http status code
manually.
For chunked transfer-encodings, clients (docker-py) depend on each http
chunk containing exactly one JSON object. Therefore, we cannot re-chunk
the body, and have to pass it across verbatim.
Proxy needs to pass multi-cidrs separately when calling weave. Otherwise
they get smashed together on the command line, and the call fails.
When creating the image, if no entrypoint is specified on the container,
it should use the entrypoint of the image. Code for this is based on
powerstrip-weave.
We handle WEAVE_CIDR='' by acting like it is not set. The reason being,
that because WEAVE_CIDR is inherited from images (along with env vars),
setting it to blank is equivalent to unsetting it.
2015-05-19 09:48:12 +01:00
Paul Bellamy
d8e1d0798e
replace test usage of ifconfig with ip link show
2015-05-19 09:48:12 +01:00
Matthias Radestock
e9963945d6
cosmetic
2015-05-18 23:38:37 +01:00
Matthias Radestock
9017888b9c
merge IPAM tests with rest
...
keeping them separate leads to too much duplication
2015-05-18 23:28:35 +01:00
Matthias Radestock
8e1ac2b300
Merge pull request #693 from bboreham/677-document-rmpeer
...
Illustrate the usage of 'weave rmpeer'
Closes #677 .
2015-05-18 17:37:19 +01:00
Bryan Boreham
25c70cfad6
Illustrate the usage of 'weave rmpeer'
2015-05-18 17:26:24 +01:00
Matthias Radestock
cf34335ec7
Merge pull request #691 from bboreham/681-ipam-docs
...
Expand documentation of 'weave launch' parameters for IPAM
Closes #669 and #681 .
2015-05-18 17:09:26 +01:00
Bryan Boreham
4ea9cfca48
Expanded description of 'weave launch' parameters for IPAM
2015-05-18 16:49:45 +01:00
Matthias Radestock
94525f0497
Merge pull request #690 from bboreham/and_true
...
Fix typo '&& true' in weave script, that could cause partial population of DNS
2015-05-18 16:47:28 +01:00
Bryan Boreham
0227f7e727
'&& true' was a typo - replaced with '|| true'
2015-05-18 16:06:38 +01:00
Bryan Boreham
bb4dd716c8
Document -iprange a bit more, and warn not to use its addresses elsewhere
2015-05-18 16:03:34 +01:00
Matthias Radestock
d53ec858a2
Merge pull request #689 from bboreham/671-hide-errors
...
Silence complaints from http_call when at end of 'weave hide'
Fixes #671 .
2015-05-18 15:59:45 +01:00
Bryan Boreham
286c46653c
Add smoke tests for 'weave expose' and 'weave hide' when weave isn't running
2015-05-18 15:43:44 +01:00
Bryan Boreham
7cf8234d9f
Silence complaints from http_call when at end of 'weave hide'
2015-05-18 14:54:46 +01:00
Matthias Radestock
fd0282ee05
Merge pull request #686 from bboreham/672-ipam-run-local
...
Fetch an address from IPAM for 'weave --local run'
Fixes #672 .
2015-05-18 14:44:46 +01:00
Bryan Boreham
5cc3036498
Extend smoke test for 'weave run --local' to include IPAM
2015-05-18 14:38:12 +01:00
Matthias Radestock
957c8a1954
Merge pull request #665 from pradeepchhetri/dockerfile
...
Merged two run commands into one in weavexec Dockerfile
2015-05-18 12:44:17 +01:00
Matthias Radestock
94c7e7f646
Merge pull request #567 from bboreham/pktdebug
...
Rename per-packet debugging flag to `-pktdebug`
2015-05-18 12:21:40 +01:00
Matthias Radestock
5f16854e1f
Merge pull request #685 from bboreham/679-ipam-docs
...
Give 'weave ps' example with IPAM and link to docs
Closes #679 .
2015-05-18 12:20:03 +01:00