]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart: infer the mon public_network
authorMichael Fritch <mfritch@suse.com>
Tue, 28 Jul 2020 17:24:21 +0000 (11:24 -0600)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 4 Aug 2020 14:21:44 +0000 (16:21 +0200)
set the mon public_network when deploying with the cephadm flag

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 6442662bbe45af2591427e9522eef45604cebbfa)

src/vstart.sh

index 1b914a841409e43a9828b38acdd315dcf61ddfa1..bbff220b128231c7e807c117177fffa3cfab6ff9 100755 (executable)
@@ -1314,6 +1314,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