From fa29b18be7dccc60bddb312c3c9d3e74b78e3b9f Mon Sep 17 00:00:00 2001 From: Marcus Cobden Date: Tue, 9 May 2017 09:32:54 +0000 Subject: [PATCH 1/5] Use cross-compilers from debian rather than ubuntu --- build/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 81c2bacb..78d1b1cb 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -20,13 +20,12 @@ ENV GCC_CROSSCOMPILERS \ # Temporarily add the Ubuntu repositories, because we're going to install gcc cross-compilers from there # Install the build-essential and crossbuild-essential-ARCH packages -RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" > /etc/apt/sources.list.d/cgocrosscompiling.list \ - && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 3B4FE6ACC0B21F32 \ +RUN echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/cgocrosscompiling.list \ + && curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add - \ + && for platform in ${DEB_CROSSPLATFORMS}; do dpkg --add-architecture $platform; done \ && apt-get update \ && apt-get install -y build-essential \ && for platform in ${DEB_CROSSPLATFORMS}; do apt-get install -y crossbuild-essential-${platform}; done \ - && rm /etc/apt/sources.list.d/cgocrosscompiling.list \ - && apt-get update \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Install some required packages From 42953faf70c5bc1ac66883e2f6bf85771fda3e01 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Fri, 5 May 2017 12:42:05 +0100 Subject: [PATCH 2/5] Fix some broken links in documentation --- site/cni-plugin.md | 2 +- site/operational-guide/tasks.md | 2 +- site/plugin.md | 1 - site/weavedns/load-balance-fault-weavedns.md | 2 +- site/weavedns/managing-entries-weavedns.md | 4 ---- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/site/cni-plugin.md b/site/cni-plugin.md index 1afc632d..a3d114a3 100644 --- a/site/cni-plugin.md +++ b/site/cni-plugin.md @@ -12,7 +12,7 @@ search_type: Documentation CNI, the [_Container Network Interface_](https://github.com/containernetworking/cni), is a proposed standard for configuring network interfaces for Linux application containers. CNI is supported by -[Kubernetes](http://kubernetes.io/), [Apache Mesos](mesos.apache.org) +[Kubernetes](http://kubernetes.io/), [Apache Mesos](http://mesos.apache.org) and [others](https://github.com/containernetworking/cni#who-is-using-cni). diff --git a/site/operational-guide/tasks.md b/site/operational-guide/tasks.md index 370426a0..3cb14c87 100644 --- a/site/operational-guide/tasks.md +++ b/site/operational-guide/tasks.md @@ -44,7 +44,7 @@ or possible: In some cases you may already be aware of the problem, as you were unable to execute `weave reset` successfully or because you know through other channels that the host has died. In these cases you can -proceed straight to [Manually Reclaiming Lost Address Space](#reclaim-address-space). +proceed straight to [Manually Reclaiming Lost Address Space](#manually-reclaim-address-space). However in some scenarios it may not be obvious that space has been lost, in which case you can check for it periodically with the diff --git a/site/plugin.md b/site/plugin.md index 476eeee2..deb8b1de 100644 --- a/site/plugin.md +++ b/site/plugin.md @@ -6,7 +6,6 @@ search_type: Documentation * [Launching Weave Net and Running Containers Using the Plugin](#launching) * [Restarting the Plugin](#restarting) - * [Configuring the Plugin](#configuring) Docker versions 1.9 and later have a plugin mechanism for adding different network providers. Weave Net installs itself as a network diff --git a/site/weavedns/load-balance-fault-weavedns.md b/site/weavedns/load-balance-fault-weavedns.md index 78991cb4..d55c416a 100644 --- a/site/weavedns/load-balance-fault-weavedns.md +++ b/site/weavedns/load-balance-fault-weavedns.md @@ -49,7 +49,7 @@ WeaveDNS removes the addresses of any container that dies. This offers a simple way to implement redundancy. E.g. if in our example we stop one of the `pingme` containers and re-run the ping tests, eventually (within ~30s at most, since that is the weaveDNS -[cache expiry time](#ttl)) we will only be hitting the address of the +[cache expiry time](/site/weavedns/managing-entries-weavedns.md#ttl)) we will only be hitting the address of the container that is still alive. **See Also** diff --git a/site/weavedns/managing-entries-weavedns.md b/site/weavedns/managing-entries-weavedns.md index edfb6408..b2085248 100644 --- a/site/weavedns/managing-entries-weavedns.md +++ b/site/weavedns/managing-entries-weavedns.md @@ -4,17 +4,13 @@ menu_order: 40 search_type: Documentation --- - The following topics are discussed: * [Adding and removing extra DNS entries](#add-remove) * [Resolving WeaveDNS entries from the Host](#resolve-weavedns-entries-from-host) * [Hot-swapping Service Containers](#hot-swapping) -* [Retaining DNS Entries When Containers Stop](#retain-stopped) * [Configuring a Custom TTL](#ttl) - - ### Adding and Removing Extra DNS Entries If you want to give the container a name in DNS *other* than its From e370ef700765bd2de0e8cbe707d14740b6431f6a Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 11 May 2017 15:05:14 +0000 Subject: [PATCH 3/5] Fix 'How Weave Finds Containers' link --- site/weavedns/managing-entries-weavedns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/weavedns/managing-entries-weavedns.md b/site/weavedns/managing-entries-weavedns.md index b2085248..7600c573 100644 --- a/site/weavedns/managing-entries-weavedns.md +++ b/site/weavedns/managing-entries-weavedns.md @@ -78,6 +78,6 @@ weaveDNS instance will receive. **See Also** - * [How Weave Finds Containers](/site/how-works-weavedns.md) + * [How Weave Finds Containers](/site/weavedns/how-works-weavedns.md) * [Load Balancing and Fault Resilience with WeaveDNS](/site/weavedns/load-balance-fault-weavedns.md) * [Managing Domains](/site/weavedns/managing-domains-weavedns.md) From 95ee99d652aac08622b73a6ee55bcce88c4f7007 Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Fri, 12 May 2017 09:25:35 +0100 Subject: [PATCH 4/5] style: singular vs plural --- prog/weave-npc/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prog/weave-npc/main.go b/prog/weave-npc/main.go index 4a2f205f..8644c191 100644 --- a/prog/weave-npc/main.go +++ b/prog/weave-npc/main.go @@ -91,7 +91,7 @@ func resetIPSets(ips ipset.Interface) error { common.Log.Debugf("Got list of ipsets: %v", sets) for _, s := range sets { - common.Log.Debugf("Destroying ipsets '%s'", string(s)) + common.Log.Debugf("Destroying ipset '%s'", string(s)) if err := ips.Destroy(s); err != nil { common.Log.Errorf("Failed to destroy ipset '%s'", string(s)) return err From 8668f6bb1e31f10a493c0121c3f72a15c6ac5fff Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Fri, 12 May 2017 09:27:55 +0100 Subject: [PATCH 5/5] Flush weave ipsets before destroying ipsets can't be destroyed when there are references to them. This takes the easy way out and flushes all weave ipsets first. Fixes #2915 --- prog/weave-npc/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/prog/weave-npc/main.go b/prog/weave-npc/main.go index 8644c191..e6818875 100644 --- a/prog/weave-npc/main.go +++ b/prog/weave-npc/main.go @@ -90,6 +90,15 @@ func resetIPSets(ips ipset.Interface) error { common.Log.Debugf("Got list of ipsets: %v", sets) + // Must remove references to ipsets by other ipsets before they're destroyed + for _, s := range sets { + common.Log.Debugf("Flushing ipset '%s'", string(s)) + if err := ips.Flush(s); err != nil { + common.Log.Errorf("Failed to flush ipset '%s'", string(s)) + return err + } + } + for _, s := range sets { common.Log.Debugf("Destroying ipset '%s'", string(s)) if err := ips.Destroy(s); err != nil {