From f4e7c8521972b5f40f37b76c62975922e43c08f4 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 10 Aug 2015 13:27:06 +0100 Subject: [PATCH 1/2] warn on -iprange overlap Closes #1276. --- weave | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/weave b/weave index 2ea86d3b..2f4d1bdd 100755 --- a/weave +++ b/weave @@ -1041,10 +1041,15 @@ case "$COMMAND" in if [ -z "$IPRANGE_SPECIFIED" ] ; then IPRANGE="10.128.0.0/10" if command_exists netcheck && ! netcheck $IPRANGE ; then - echo "Default -iprange $IPRANGE overlaps with existing route." >&2 - echo "Please pick another range and set it on all hosts." >&2 + echo "ERROR: Default -iprange $IPRANGE overlaps with existing route." >&2 + echo "You must pick another range and set it on all hosts." >&2 exit 1 fi + else + if command_exists netcheck && ! netcheck $IPRANGE ; then + echo "WARNING: Specified -iprange $IPRANGE overlaps with existing route." >&2 + echo "Unless this is deliberate, you must pick another range and set it on all hosts." >&2 + fi fi # Set WEAVE_DOCKER_ARGS in the environment in order to supply # additional parameters, such as resource limits, to docker From 9e65cc20cbf3eea47e3274975db303ee3309e2d9 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 10 Aug 2015 17:33:45 +0100 Subject: [PATCH 2/2] cosmetic --- weave | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weave b/weave index 2f4d1bdd..e7573cb1 100755 --- a/weave +++ b/weave @@ -1041,13 +1041,13 @@ case "$COMMAND" in if [ -z "$IPRANGE_SPECIFIED" ] ; then IPRANGE="10.128.0.0/10" if command_exists netcheck && ! netcheck $IPRANGE ; then - echo "ERROR: Default -iprange $IPRANGE overlaps with existing route." >&2 + echo "ERROR: Default -iprange $IPRANGE overlaps with existing route on host." >&2 echo "You must pick another range and set it on all hosts." >&2 exit 1 fi else if command_exists netcheck && ! netcheck $IPRANGE ; then - echo "WARNING: Specified -iprange $IPRANGE overlaps with existing route." >&2 + echo "WARNING: Specified -iprange $IPRANGE overlaps with existing route on host." >&2 echo "Unless this is deliberate, you must pick another range and set it on all hosts." >&2 fi fi