Allow 'weave create-bridge', if the user insists.

For example this is used when setting up CNI for Kubernetes, in
an environment where we know none of the bad consequences apply.
This commit is contained in:
Bryan Boreham committed 2016-08-08 17:20:25 +01:00
1 parent ed83efbceb
commit 7a5d7fca6c
1 file changed
+9 -7
+9 -7
View File
@@ -1933,22 +1933,24 @@ case "$COMMAND" in
# intentionally undocumented since it assumes knowledge of weave
# internals
create-bridge)
cat 1>&2 <<EOF
if [ "$1" != "--force" ] ; then
cat 1>&2 <<EOF
WARNING: 'weave create-bridge' is deprecated. Instead use 'weave attach-bridge'
to link the docker and weave bridges after both docker and weave have been
started. Note that, unlike 'weave create-bridge', 'weave attach-bridge' is
compatible with fast data path.
EOF
# This subcommand may be run without the docker daemon, but
# fastdp needs to run the router container to setup the ODP
# bridge, hence:
if [ -z "$WEAVE_NO_FASTDP" ] ; then
cat 1>&2 <<EOF
# This subcommand may be run without the docker daemon, but
# fastdp needs to run the router container to setup the ODP
# bridge, hence:
if [ -z "$WEAVE_NO_FASTDP" ] ; then
cat 1>&2 <<EOF
ERROR: 'weave create-bridge' is not compatible with fast data path. If you
really want to do this please set the WEAVE_NO_FASTDP environment variable.
EOF
exit 1
exit 1
fi
fi
create_bridge --without-ethtool
;;