Merge branch '1.9'

This commit is contained in:
Bryan Boreham committed 2017-03-16 19:43:50 +00:00
commit 9810a84475
14 files changed
+116 -45

No files matched your search

+1 -1
View File
@@ -117,7 +117,7 @@ post_start_actions() {
post_start_actions &
exec /home/weave/weaver $EXTRA_ARGS --port=6783 $BRIDGE_OPTIONS \
/home/weave/weaver $EXTRA_ARGS --port=6783 $BRIDGE_OPTIONS \
--http-addr=$HTTP_ADDR --status-addr=$STATUS_ADDR --docker-api='' --no-dns \
--ipalloc-range=$IPALLOC_RANGE $NICKNAME_ARG \
--ipalloc-init $IPALLOC_INIT \
+12 -4
View File
@@ -80,14 +80,22 @@ func resetIPTables(ipt *iptables.IPTables) error {
}
func resetIPSets(ips ipset.Interface) error {
// TODO should restrict ipset operations to the `weave-` prefix:
// Remove ipsets prefixed `weave-` only
if err := ips.FlushAll(); err != nil {
sets, err := ips.List(npc.IpsetNamePrefix)
if err != nil {
common.Log.Errorf("Failed to retrieve list of ipsets")
return err
}
if err := ips.DestroyAll(); err != nil {
return err
common.Log.Debugf("Got list of ipsets: %v", sets)
for _, s := range sets {
common.Log.Debugf("Destroying ipsets '%s'", string(s))
if err := ips.Destroy(s); err != nil {
common.Log.Errorf("Failed to destroy ipset '%s'", string(s))
return err
}
}
return nil
+4 -3
View File
@@ -3,7 +3,8 @@ package main
import (
"os"
cni "github.com/appc/cni/pkg/skel"
cni "github.com/containernetworking/cni/pkg/skel"
"github.com/containernetworking/cni/pkg/version"
weaveapi "github.com/weaveworks/weave/api"
"github.com/weaveworks/weave/common"
@@ -14,13 +15,13 @@ import (
func cniNet(args []string) error {
weave := weaveapi.NewClient(os.Getenv("WEAVE_HTTP_ADDR"), common.Log)
n := netplugin.NewCNIPlugin(weave)
cni.PluginMain(n.CmdAdd, n.CmdDel)
cni.PluginMain(n.CmdAdd, n.CmdDel, version.PluginSupports("0.1.0", "0.2.0", "0.3.0"))
return nil
}
func cniIPAM(args []string) error {
weave := weaveapi.NewClient(os.Getenv("WEAVE_HTTP_ADDR"), common.Log)
i := ipamplugin.NewIpam(weave)
cni.PluginMain(i.CmdAdd, i.CmdDel)
cni.PluginMain(i.CmdAdd, i.CmdDel, version.PluginSupports("0.1.0", "0.2.0", "0.3.0"))
return nil
}