Martynas Pumputis
e611f04f41
Move NetDev utils from common/ to net/
2016-10-19 17:03:30 +01:00
Martynas Pumputis
05baa566c6
Refactor common.GetBridgeNetDev
...
- Optimize. Use LinkByName instead of iterating over list of available
links. Linux does not support interfaces with the same names.
- Remove unnecessary indirection in utility functions which return
common.NetDev.
2016-07-05 15:12:39 +01:00
Matthias Radestock
7a1bd27a58
Merge branch '1.5'
2016-06-13 15:24:49 +01:00
Matthias Radestock
aca34191da
Merge pull request #2365 from weaveworks/issues/2283-validate-cidrs
...
Validate CIDRs in proxy before attaching a container
Fixes #2283
2016-06-13 15:15:48 +01:00
Martynas Pumputis
df5508c0f3
Check CIDRs before attaching a container in proxy
...
If any cidr is invalid, a user will get the following error:
"docker: Error response from daemon: invalid WEAVE_CIDR: $CIDR".
2016-06-13 14:54:16 +01:00
Adam Harrison
d4de48aeee
Merge branch '1.5'
...
Closes #2302
2016-06-06 15:21:54 +01:00
Bryan Boreham
dac2124cd1
Don't weave-attach containers which are using a network plugin
...
Particularly intended for cases where the user has configured the
proxy and also said --net=weave, but will catch any other plugin
similarly
2016-06-03 14:11:15 +01:00
Bryan Boreham
153ed601be
Check if socket is identical to weave socket after trimming prefix.
...
This allows us to run 'weave proxy -H /var/run/weave/weave.sock'
2016-06-03 13:34:43 +01:00
Bryan Boreham
ff81ecfd41
Move kill-on-failure responsibility to caller of weave script
2016-05-16 13:38:22 +01:00
Bryan Boreham
8d71467802
Kill process instead of container, on container restart.
...
When Docker restarts a container and something goes wrong attaching
the network, kill the process inside the container instead of killing
the container, so that Docker will restart it again
2016-05-06 18:02:11 +01:00
Bryan Boreham
5993b3e846
Refactor: extract function to look up waiting channel for container
2016-05-06 12:45:03 +01: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
Bryan Boreham
f2e38ae6c5
Abstract out logging function from weave api package to reduce dependencies
2016-03-07 15:37:51 +00:00
Adam Harrison
adf56d316d
Remove obsolete alternative procfs support
2016-03-01 20:10:47 +00:00
Matthias Radestock
3283bc89fc
Merge branch '1.4'
2016-02-23 13:56:56 +00:00
Matthias Radestock
26519333c0
cosmetic: correct comment
2016-02-23 13:36:56 +00:00
Matthias Radestock
639cde0f67
refactor: inline
2016-02-23 13:34:14 +00:00
Matthias Radestock
6a9f9f66dc
don't check for 'Restarting' when attaching on startup
...
It is overkill.
2016-02-23 13:20:22 +00:00
Matthias Radestock
4a7157959a
don't attempt to attach 'restarting' containers
...
this is an optimisation... there is no point attempting to attach a
'restarting' container - it will fail.
When the container *actually* restarts we'll get a 'Start' event, and
attach at that point.
Also, there is no point checking for 'Paused' since 'Paused' ->
'Running'.
2016-02-20 11:00:04 +00:00
Bryan Boreham
ed3c50f43e
Merge pull request #1951 from weaveworks/issues/1940-remove-proxy-dockerbridgeip-dep
...
Use netlink instead of shelling out to `weave docker-bridge-ip`
2016-02-08 11:05:10 +00:00
Matthias Radestock
98d76e1099
Merge pull request #1941 from weaveworks/issues/1873-check-running-master
...
Improve visibility of startup problems
Fixes #1873 .
2016-02-04 16:50:50 +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
feee4f0494
refactor: make proxy use weave/api
...
and extend that api as required, namely with DNSDomain()
2016-02-02 20:45:30 +00:00
Bryan Boreham
78f2d82984
Extract function to listen on Unix socket
2016-02-01 10:11:46 +00:00
Bryan Boreham
b2b293a8ee
Added 'ContainerDestroyed()' callback from docker client
2016-01-12 14:38:44 +00:00
Paul Bellamy
8ddbb3d8af
[proxy] Keep retrying container attaches until they succeed.
2016-01-07 17:09:34 +00:00
Matthias Radestock
75d9e95b15
appease linter
2016-01-02 12:35:10 +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