Marc CARRE
507e734d1a
Merge remote-tracking branch 'origin/1.9'
...
- PR #2926 - Branch issues/2808-improve-hairpin-messages - Fixes #2808 .
- PR #2907 - Branch issues/2771-checkpoint-net-modes - Fixes #2771 .
2017-05-03 20:28:31 +01:00
Marc Carré
d128488339
Merge pull request #2926 from weaveworks/issues/2808-improve-hairpin-messages
...
Fixes #2808 . Improve hairpin log messages.
2017-05-03 20:21:20 +01:00
Marc Carré
c8c61adca4
Merge pull request #2907 from weaveworks/issues/2771-checkpoint-net-modes
...
Add checkpoint flag per connection type
2017-05-03 18:20:30 +01:00
Bryan Boreham
7c8f33f525
Add checkpoint flag per connection type
2017-05-03 16:56:49 +00:00
Bryan Boreham
b19f2df6f8
Improve hairpin log messages
2017-05-03 14:35:20 +00:00
Bryan Boreham
b3ac56e3d2
Update mesh library and check for errors newly returned
2017-05-03 11:08:28 +00:00
Marc Carré
e4cab53a11
Merge pull request #2920 from weaveworks/issues/2919-move-plugin-network-create
...
Move plugin network creation from shell script to Go
2017-05-02 17:26:50 +01:00
Marc CARRE
e0303a0dda
Merge remote-tracking branch 'origin/1.9'
2017-05-02 11:53:53 +01:00
Bryan Boreham
24c2743a58
Check addresses are IPv4 in kube-peers
2017-04-28 11:05:38 +00:00
Bryan Boreham
d2cbb2749e
Move plugin network creation from shell script to Go
...
In the process, use the default subnet instead of the whole IP
allocation range.
2017-04-27 17:07:59 +00:00
Bryan Boreham
eab5ec206a
Merge branch '1.9'
2017-04-27 14:29:29 +00:00
Mike Bryant
e78be1fc35
fix(kube-peers): Add support for ExternalIP addresses
...
Why:
* In some environments Nodes have an ExternalIP but no InternalIP
This change addresses the need by:
* Falling back to ExternalIP addresses if there isn't an InternalIP for a node
2017-04-27 13:56:23 +01:00
Bryan Boreham
334974472d
Rename router.Bridge to router.InjectorConsumer
...
since what it does it injects and consumes packets, and something else
entirely does bridging.
2017-04-25 11:03:32 +01:00
Bryan Boreham
a731d47d97
Rename bridge detection/creation functions
2017-04-24 16:42:05 +00:00
Bryan Boreham
9fd1a43769
Put back some weave bridge options
...
ability to set MTU was lost in an earlier change
2017-04-24 14:55:53 +00:00
Bryan Boreham
108f4784a6
Add back check for datapath supported
2017-04-20 16:12:42 +00:00
Bryan Boreham
a7feb41e62
Replace switch statements with Bridge polymorphism
2017-04-20 15:57:49 +00:00
Bryan Boreham
fddb3ee06e
Review feedback
2017-04-20 15:57:49 +00:00
Bryan Boreham
3574da267b
Remove -enforce_docker_bridge_addr_assign_type no longer used
2017-04-17 19:41:47 +00:00
Bryan Boreham
ae625a18c8
Move awsvpc bridge expose from weave script to Go code
2017-04-17 19:41:47 +00:00
Bryan Boreham
4ad1c22ef6
Move initial DNS population into Go code
2017-04-17 19:41:47 +00:00
Bryan Boreham
ef9f95f653
Let weaver create the bridge in weave-kube
2017-04-17 19:41:47 +00:00
Bryan Boreham
3b54372eab
Let weaver create the bridge in net-plugin launch
2017-04-17 19:41:47 +00:00
Bryan Boreham
f05bb6c4e0
Don't assume we always run in in host pid space
...
Pass the path to the proc filesystem down
2017-04-17 19:41:47 +00:00
Bryan Boreham
c3a41286fd
Use the bridge name passed in on the command-line more
2017-04-17 19:41:47 +00:00
Bryan Boreham
8297652204
Read our peerName from persistence file if necessary
...
Mount directories for machine ID files into weave container
2017-04-17 19:41:47 +00:00
Bryan Boreham
a26fc67ded
New way of initializing; remove --iface option
2017-04-17 19:41:47 +00:00
Bryan Boreham
abadbf883a
AWSVPC mode now part of BridgeConfig
2017-04-17 19:41:47 +00:00
Bryan Boreham
e7e3608642
Move creation of bridge inside router
2017-04-17 19:41:47 +00:00
Bryan Boreham
dd232775e6
Move expect-npc setup from weave script to Go code
2017-04-17 19:41:47 +00:00
Bryan Boreham
a8eb7966b6
Wire up enforce_docker_bridge_addr_assign_type
2017-04-17 19:41:47 +00:00
Bryan Boreham
8051f51d46
Move bridge-creation code from weave script into Go code
...
via weaveutil create-bridge function
2017-04-17 19:41:47 +00:00
Bryan Boreham
986a3f8079
Pass bridge name into awsvpc
2017-04-17 19:41:47 +00:00
Marc CARRE
7c5dda353d
Only list active containers.
...
Previously was using `docker.ListContainersOptions{All: true}`, which is the equivalent of `docker ps -a`, and is not what we want here.
2017-04-13 12:12:49 +01:00
Marc Carré
8961041469
Merge pull request #2727 from weaveworks/issues/2397-v2-plugin
...
Create a V2 Docker plugin
2017-04-12 14:27:34 +01:00
Martynas Pumputis
1a3537a8f4
Replace noDNS by dns in plugin
...
Just to avoid double negation.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
09606db9c3
Exit when launching plugin-v2 if node is not active in Swarm
...
We retrieve the list of swarm masters for peer discovery when launching
plugin-v2, thus the node should belong to any Swarm when enabling the
plugin.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
4a708c2a82
Rename prog/plugin-v2 to prog/net-plugin
...
Consensus was to call the plugin-v2 as weaveworks/net-plugin.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
01bfa602ad
Pass noDNS and isPluginV2 flags to plugin
...
- "noDNS" controls whether upon ContainerStarted event a container
should be registered within the Weave DNS.
- "isPluginV2" will be used to determine a path to host's /proc.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
332762201a
Reuse docker client instance in plugin
...
Instead of creating a new one, reuse one created in weaver.
The change removes the pinning of client API versions (1.21 in our
case).
2017-04-12 13:05:40 +00:00
Martynas Pumputis
568290afb7
Do not start local scope plugin (mesh) in plugin-v2
...
Currently, plugin-v2 works only in "swarm" scope, as it depends
on swarm for peer discovery.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
3c11c8aa38
Add comment about failures to is-docker-plugin-enabled cmd
2017-04-12 13:05:40 +00:00
Martynas Pumputis
0ff37d3492
Do "docker plugin inspect" inside weaveutil
...
We cannot do it from weaveexec, because the latter is distributed
with an old version of Docker client which does not support
Plugins API.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
d7306c66f7
Get rid of deprecated --no-multicast-route
2017-04-12 13:05:40 +00:00
Martynas Pumputis
1f42a9d2f9
Merge plugin into weaver
...
This simplifies the following:
- plugin-v2 does not need to start "plugin" as a separate process, thus
Docker is able to properly restart plugin-v2 in a case of any child
process failing.
- No need for weaveplugin container.
plugin is enabled by default when running "weave launch". when starting
only the router, you should pass "--plugin" parameter to enable it.
The env var WEAVE_NO_PLUGIN is no more.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
4f42029228
Enable WEAVE_{MTU,PASSWORD} env vars, persistence and ARP settings in plugin-v2
...
The vars can be customized before enabling the plugin with e.g.:
docker plugin set $PLUGIN_NAME set WEAVE_MTU=8160
The ARP settings apply to "weave" bridge. In order to manipulate them,
we bind mount the host's /proc to /host/proc.
(The mount type of /proc changed to bind, Otherwise (when type =
"proc"), the kernel does not propagate pids of host processes as the
plugin runs in a separate PID ns.)
Persistence relies on weave.db which is stored under
/var/lib/weave/weave.db on the host.
NOTE: we do not persist peer list for plugin-v2, as it gets
restored from existing alive master nodes during the peer discovery.
2017-04-12 13:05:39 +00:00
Martynas Pumputis
4916badcc4
Move prog/v2-plugin to prog/plugin-v2
2017-04-12 13:05:39 +00:00
Martynas Pumputis
82b56848a9
Add peer discovery for Docker Swarm
...
The peer discovery relies on "GET /info" API call which returns
list of master nodes. The peer list is passed to weaver when
launching it.
If node is a master, then we pass "--ipalloc-alloc
consensus=$(MASTER_NODES_COUNT)" to weaver. Otherwise, we pass
"--ipalloc-alloc observer".
2017-04-12 13:05:39 +00:00
Marc CARRE
b048b6deb0
Bind-mount /proc in V2 plugin container.
...
This allows to pass ARP settings from the host, e.g.:
```
$ sudo docker-runc exec 512af90f342f16dddebc7b7245985d5eb67557e76798b4033eed2ff7adaa4eb5 cat /proc/sys/net/ipv4/neigh/weave/ucast_solicit
3
$ cat /proc/sys/net/ipv4/neigh/weave/ucast_solicit
3
$ cat /proc/sys/net/ipv4/neigh/weave/ucast_solicit
1
$ sudo docker-runc exec 512af90f342f16dddebc7b7245985d5eb67557e76798b4033eed2ff7adaa4eb5 cat /proc/sys/net/ipv4/neigh/weave/ucast_solicit
1
```
2017-04-12 13:05:39 +00:00
Bryan Boreham
0c23e47124
Allow docker API location to be specified or blanked
2017-04-12 13:05:39 +00:00