]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: Fail if a mon has no address set.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Mon, 25 Apr 2011 17:21:39 +0000 (10:21 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Mon, 25 Apr 2011 17:21:39 +0000 (10:21 -0700)
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
src/mkcephfs.in

index 5362e94e166f3a10737f68315bed2c1a3c59da2d..11f96a2daf4c44f8b5b27ce38ced714ee0899437 100644 (file)
@@ -182,6 +182,10 @@ if [ $preparemonmap -eq 1 ]; then
     for name in $mons; do
        id=`echo $name | cut -c 4- | sed 's/^\\.//'`
        get_conf addr "" "mon addr"
+       if [ -z "$addr" ]; then
+           echo "$0: monitor $name has no address defined." 1>&2
+           exit 1
+       fi
        args=$args" --add $id $addr"
     done