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
833eb6166f
Add AWSVPC bridge type
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
6fd9f471ff
Bridge setup iptables rules
2017-04-17 19:41:47 +00:00
Bryan Boreham
2d037d874c
MTU selection closer to weave script
...
Note that if initFastdp sets the MTU for the datapath then the same
value is used for the bridge also.
2017-04-17 19:41:47 +00:00
Bryan Boreham
8e5384ee01
Create pcap veth for no-fastdp operation
2017-04-17 19:41:47 +00:00
Adam Harrison
7dd37d2a13
Add functions to create bridge
2017-04-17 19:41:47 +00:00
Adam Harrison
36521b04a2
Utility function to enforce docker bridge addr_assign_type
2017-04-17 19:41:47 +00:00
Bryan Boreham
f5d0a277fb
Move canonicalisation and checking of DNS entries into nameserver
2017-04-17 19:41:47 +00:00
Bryan Boreham
986a3f8079
Pass bridge name into awsvpc
2017-04-17 19:41:47 +00:00
Bryan Boreham
de4ec23809
Remove unused check_docker_server_api_version()
...
The last code that called it was removed in 1f42a9d2f9
2017-04-17 19:29:28 +00:00
Marc Carré
1cc0794e75
Merge pull request #2897 from weaveworks/stop-old-plugin
...
More help for upgraders who use plugin commands
2017-04-13 17:47:22 +01:00
Marc Carré
3cca0887c7
Merge pull request #2898 from weaveworks/weaveutil-allids-without-all
...
Only list active containers in weaveutil/addrs.go#containerAddrs
2017-04-13 13:12:41 +01:00
Marc Carré
0e1d39120e
Merge pull request #2895 from bjhaid/patch-1
...
Highlight the forward rules
2017-04-13 13:05:28 +01:00
Bryan Boreham
a072cf2e0a
Merge pull request #2894 from weaveworks/fix-typo-plugin
...
Fix typo: 'JSON encode payload' -> 'JSON encoded'.
2017-04-13 12:28:07 +01:00
Marc CARRE
0f0f3649a4
Fix typo: 'JSON encode payload' -> 'JSON encoded'.
2017-04-13 12:26:50 +01:00
Bryan Boreham
54c95c04af
Stop trying to publish the old plugin container
2017-04-13 11:13:24 +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
Bryan Boreham
c42400de4f
Remove warning about create-bridge not working with fastdp
...
This hasn't been true for a long time.
2017-04-13 10:15:08 +00:00
Bryan Boreham
9b5cef9167
Stop and reset old weaveplugin container
...
in case user has upgraded from <v2.0 and left it running
2017-04-13 09:14:04 +00:00
Bryan Boreham
6081c400fb
Print special 'removed' message on launch-plugin and stop-plugin
2017-04-13 09:13:50 +00:00
Bryan Boreham
cb339523de
Remove mentions of deleted commands
2017-04-13 09:03:26 +00:00
Àbéjídé Àyodélé
538902b207
Highlight the forward rules
2017-04-12 10:37:25 -05: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
cfe26ae346
Add an ugly way to match whether network is ours to plugin
...
Docker Plugin V2 does not expose a plugin name to the plugin, so we
check for "net-plugin" within driver name of a network to detect
whether network is ours.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
bdfa06dbe9
Use $(SUDO) for each docker cmd when building net-plugin
2017-04-12 13:05:40 +00: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
735a7f9154
Use correct path to netns of container in plugin-v2
...
Used when configuring ARP settings of a container upon ContainerStarted
event.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
7478e78ab7
Add NSPathByPidWithRoot
...
The function is used in a case when /proc is bind mounted to
other than /proc dir.
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
2ba360f33a
Better plugin detection functions in weave script
...
Renamed to "is_plugin_v1_enabled" and "is_plugin_v2_enabled".
Improve weave status and weave launch* err message when plugin-v2 is running
```
$ weave launch
Docker plugin "weaveworks/net-plugin" is running; Aborting.
$ weave status
<..>
Service: plugin (v2)
DriverName: weaveworks/net-plugin
```
2017-04-12 13:05:40 +00:00
Martynas Pumputis
7fc56e54b3
Add plugin_publish target to Makefile
...
"docker plugin" does not support tagging plugin images, therefore
we need to build plugin images two times - one for :latest and
for :$(WEAVE_VERSION).
Pushing of :latest happens only if $UPDATE_LATEST is not false.
2017-04-12 13:05:40 +00:00
Martynas Pumputis
16062ea62d
Rename weaveworks/pluginv2 to weaveworks/net-plugin
2017-04-12 13:05:40 +00:00
Martynas Pumputis
e852ae99ca
Report correct plugin driver name in "weave status"
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
b3866ebd94
Update vendor/github.com/docker/docker to v1.13.1
2017-04-12 13:05:40 +00:00
Marc CARRE
3031372442
weave --local launch* with V2 plugin on exits with error.
...
For example:
```
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$ docker plugin ls
ID NAME DESCRIPTION ENABLED
e80beb4367a6 weaveworks/pluginv2:latest Weave Net plugin for Docker true
$ weave --local launch
weaveworks/pluginv2 is already running.
$ weave --local launch-proxy
weaveworks/pluginv2 is already running.
$ weave --local launch-router
weaveworks/pluginv2 is already running.
$ weave --local launch-plugin
```
2017-04-12 13:05:40 +00:00
Martynas Pumputis
d3d2de5f1f
Make NetworkAllocate to return original options
...
NetworkAllocate is called on Swarm master node which creates a network.
The return option map is used to describe the network, and is passed
to CreateNetwork which is called on all nodes when a service is
created.
Returning nil instead the actual options made Docker to omit
the "works.weave.multicast" flag, thus no multicast could be used
in Swarm.
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
Marc CARRE
8c917eeb17
weave --local status now reports plugin.
...
Prints the following when running:
```
Service: plugin
DriverName: weave
```
See also:
- https://weaveworks.slack.com/archives/net/p1488563299009870
- https://weaveworks.slack.com/archives/net/p1488539841009756
2017-04-12 13:05:39 +00:00