Move plugin network creation from shell script to Go

In the process, use the default subnet instead of the whole IP
allocation range.
This commit is contained in:
Bryan Boreham committed 2017-04-27 17:07:59 +00:00
1 parent eab5ec206a
commit d2cbb2749e
6 files changed
+34 -60

No files matched your search

+6
View File
@@ -431,6 +431,12 @@ func main() {
if enablePlugin || enablePluginV2 {
go plugin.Start(httpAddr, dockerCli, pluginSocket, pluginMeshSocket, !noDNS, enablePluginV2)
}
if enablePlugin {
Log.Println("Creating default 'weave' network")
options := map[string]interface{}{plugin.MulticastOption: "true"}
// TODO: the driver name should be extracted from pluginMeshSocket
dockerCli.EnsureNetwork("weave", "weavemesh", defaultSubnet.String(), options)
}
if bridgeConfig.AWSVPC {
// Run this on its own goroutine because the allocator can block