diff --git a/build/Dockerfile b/build/Dockerfile index 89cc7df1..b9b0bfa9 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 hkp://keyserver.ubuntu.com:80 --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 diff --git a/prog/weave-npc/main.go b/prog/weave-npc/main.go index 4a2f205f..e6818875 100644 --- a/prog/weave-npc/main.go +++ b/prog/weave-npc/main.go @@ -90,8 +90,17 @@ 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("Destroying ipsets '%s'", string(s)) + 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 { common.Log.Errorf("Failed to destroy ipset '%s'", string(s)) return err 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 eb2e65de..6225f734 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..7600c573 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 @@ -82,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)