]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: pick_addresses before common_init_finish
authorSage Weil <sage@newdream.net>
Wed, 23 Nov 2011 00:28:42 +0000 (16:28 -0800)
committerSage Weil <sage@newdream.net>
Wed, 23 Nov 2011 00:28:42 +0000 (16:28 -0800)
We can't modify g_conf->public_addr after that.

Signed-off-by: Sage Weil <sage@newdream.net>
src/ceph_mon.cc

index 9da2d44fa09a772e1789eafcaf122c50bff9f519..5c46a367f0534f6735ecef721facdac57998142e 100644 (file)
@@ -99,6 +99,9 @@ int main(int argc, const char **argv)
 
   // -- mkfs --
   if (mkfs) {
+    // resolve public_network -> public_addr
+    pick_addresses(g_ceph_context);
+
     common_init_finish(g_ceph_context);
 
     bufferlist monmapbl, osdmapbl;
@@ -127,9 +130,6 @@ int main(int argc, const char **argv)
        exit(1);
       }
       
-      // resolve public_network -> public_addr
-      pick_addresses(g_ceph_context);
-      
       // am i part of the initial quorum?
       if (monmap.contains(g_conf->name.get_id())) {
        // hmm, make sure the ip listed exists on the current host?