Move AWSVPC/IPAM check to Go code
The weave script check was broken in an earlier commit. The Go error message is less specific because it checks more cases.
This commit is contained in:
1 parent
cce818995a
commit
9f4030cdb6
2 files changed
+3
-4
No files matched your search
@@ -316,6 +316,9 @@ func main() {
|
||||
if bridgeConfig.AWSVPC && len(config.Password) > 0 {
|
||||
Log.Fatalf("--awsvpc mode is not compatible with the --password option")
|
||||
}
|
||||
if bridgeConfig.AWSVPC && !ipamConfig.Enabled() {
|
||||
Log.Fatalf("--awsvpc mode requires IPAM enabled")
|
||||
}
|
||||
|
||||
db, err := db.NewBoltDB(dbPrefix)
|
||||
checkFatal(err)
|
||||
|
||||
@@ -1252,10 +1252,6 @@ launch() {
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [ -n "$AWSVPC" -a -z "$IPRANGE" ] ; then
|
||||
echo "ERROR: Empty --ipalloc-range is not compatible with --awsvpc." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -n "$IPRANGE" ] && ! check_overlap $IPRANGE ; then
|
||||
echo "WARNING: Specified --ipalloc-range $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
|
||||
|
||||
Reference in new issue
Block a user