From 2e54efe34d3be15c7c6bfe7802e1857d2a79c574 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 22 Oct 2015 14:42:03 +0100 Subject: [PATCH 1/4] Stop the proxy last, so we can stop the router before being unable to communicate with docker when $DOCKER_HOST is pointing at the proxy --- weave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave b/weave index 0c94206f..3e954067 100755 --- a/weave +++ b/weave @@ -1927,8 +1927,8 @@ EOF ;; stop) [ $# -eq 0 ] || usage - stop_proxy stop_router + stop_proxy ;; stop-router) [ $# -eq 0 ] || usage From b888ace508729031e0ff3953bdf777e76c893df9 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 22 Oct 2015 16:12:37 +0100 Subject: [PATCH 2/4] remove superfluous code in ApplyUpdate If the local peer's short ID was updated, we broadcastPeerUpdate at the end (in unlockAndNotify), so there is no need to include the local peer in the current update. Also, reading peers.ourself.Version is bad here - we don't take a lock and it's written by other goroutines. Doesn't actually break anything though since it's a uint64 and hence atomic. --- router/peers.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/router/peers.go b/router/peers.go index 098a7825..f3d238d0 100644 --- a/router/peers.go +++ b/router/peers.go @@ -327,8 +327,6 @@ func (peers *Peers) ApplyUpdate(update []byte) (PeerNameSet, PeerNameSet, error) return nil, nil, err } - ourVersion := peers.ourself.Version - // By this point, we know the update doesn't refer to any peers we // have no knowledge of. We can now apply the update. Start by // adding in any new peers. @@ -349,13 +347,6 @@ func (peers *Peers) ApplyUpdate(update []byte) (PeerNameSet, PeerNameSet, error) updateNames[peer.Name] = void } - if peers.ourself.Version != ourVersion { - // Our short id changed, i.e. due to a short ID - // change. So we need to include ourself in the - // update - newUpdate[peers.ourself.Name] = void - } - return updateNames, newUpdate, nil } From 3a029686e3b4761326926baf7e0d38f88729d52d Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Thu, 22 Oct 2015 15:07:52 -0700 Subject: [PATCH 3/4] Add Pardot script --- site/_includes/footer.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/site/_includes/footer.html b/site/_includes/footer.html index 1d114958..049968be 100644 --- a/site/_includes/footer.html +++ b/site/_includes/footer.html @@ -69,3 +69,17 @@ s.parentNode.insertBefore(wf, s); })(); + From 9b4f2297b04550e37c1ef9636fff635813063825 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Wed, 28 Oct 2015 09:19:10 +0000 Subject: [PATCH 4/4] drop quotes in `eval "$(weave env)"` They are unnecessary and unwieldy. Fixes #1596 --- site/proxy.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/proxy.md b/site/proxy.md index ca5d14c8..acf3a379 100644 --- a/site/proxy.md +++ b/site/proxy.md @@ -57,13 +57,13 @@ All docker commands can be run via the proxy, so it is safe to adjust your `DOCKER_HOST` to point at the proxy. Weave provides a convenient command for this: - host1$ eval "$(weave env)" + host1$ eval $(weave env) host1$ docker ps ... The prior settings can be restored with - host1$ eval "$(weave env --restore)" + host1$ eval $(weave env --restore) Alternatively, the proxy host can be set on a per-command basis with @@ -194,7 +194,7 @@ ultimately be handed over to weaveDNS for registration. For instance, we can launch the proxy using all three flags host1$ weave launch-router && weave launch-proxy --hostname-from-label hostname-label --hostname-match '^aws-[0-9]+-(.*)$' --hostname-replacement 'my-app-$1' - host1$ eval "$(weave env)" + host1$ eval $(weave env) Note how regexp substitution groups should be prepended with a dollar sign (e.g. `$1`). For further details on the regular expression syntax please see @@ -264,7 +264,7 @@ with $ mkdir -pv ~/.docker $ cp -v {ca,cert,key}.pem ~/.docker - $ eval "$(weave env)" + $ eval $(weave env) $ export DOCKER_TLS_VERIFY=1 $ docker version ...