]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
vstart: infer the mon public_network
authorMichael Fritch <mfritch@suse.com>
Tue, 28 Jul 2020 17:24:21 +0000 (11:24 -0600)
committerMichael Fritch <mfritch@suse.com>
Tue, 28 Jul 2020 21:06:10 +0000 (15:06 -0600)
set the mon public_network when deploying with the cephadm flag

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/vstart.sh

index 94abdd8821f02fd1ccf7f791233495eccaf91807..1e7b84917356d41b17d13c6dba02af231055e470 100755 (executable)
@@ -1304,6 +1304,11 @@ mds_debug_scatterstat = true
 mds_verify_scatter = true
 EOF
     fi
+    if [ "$cephadm" -gt 0 ]; then
+        debug echo Setting mon public_network ...
+        public_network=$(ip route list | grep -w "$IP" | awk '{print $1}')
+        ceph_adm config set mon public_network $public_network
+    fi
 fi
 
 if [ $CEPH_NUM_MGR -gt 0 ]; then