Merge pull request #1278 from weaveworks/1276_warn_on_iprange_overlap
warn on -iprange overlap
This commit is contained in:
commit
25c4a2961e
1 file changed
+7
-2
@@ -1041,10 +1041,15 @@ case "$COMMAND" in
|
|||||||
if [ -z "$IPRANGE_SPECIFIED" ] ; then
|
if [ -z "$IPRANGE_SPECIFIED" ] ; then
|
||||||
IPRANGE="10.128.0.0/10"
|
IPRANGE="10.128.0.0/10"
|
||||||
if command_exists netcheck && ! netcheck $IPRANGE ; then
|
if command_exists netcheck && ! netcheck $IPRANGE ; then
|
||||||
echo "Default -iprange $IPRANGE overlaps with existing route." >&2
|
echo "ERROR: Default -iprange $IPRANGE overlaps with existing route." >&2
|
||||||
echo "Please pick another range and set it on all hosts." >&2
|
echo "You must pick another range and set it on all hosts." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
fi
|
||||||
# Set WEAVE_DOCKER_ARGS in the environment in order to supply
|
# Set WEAVE_DOCKER_ARGS in the environment in order to supply
|
||||||
# additional parameters, such as resource limits, to docker
|
# additional parameters, such as resource limits, to docker
|
||||||
|
|||||||
Reference in new issue
Block a user