<< " fsid " << monmap.get_fsid()
<< dendl;
- err = msgr->bindv(bind_addrs);
- if (err < 0) {
- derr << "unable to bind monitor to " << bind_addrs << dendl;
- prefork.exit(1);
- }
-
- // if the public and bind addr are different set the msgr addr
- // to the public one, now that the bind is complete.
- if (public_addrs != bind_addrs) {
- msgr->set_addrs(public_addrs);
- }
-
Messenger *mgr_msgr = Messenger::create(g_ceph_context, public_msgr_type,
entity_name_t::MON(rank), "mon-mgrc",
getpid(), 0);
prefork.exit(1);
}
- dout(0) << "starting " << g_conf()->name << " rank " << rank
- << " at " << public_addrs
- << " mon_data " << g_conf()->mon_data
- << " fsid " << monmap.get_fsid()
- << dendl;
-
- // start monitor
mon = new Monitor(g_ceph_context, g_conf()->name.get_id(), store,
msgr, mgr_msgr, &monmap);
derr << "done compacting" << dendl;
}
+ // bind
+ err = msgr->bindv(bind_addrs);
+ if (err < 0) {
+ derr << "unable to bind monitor to " << bind_addrs << dendl;
+ prefork.exit(1);
+ }
+
+ // if the public and bind addr are different set the msgr addr
+ // to the public one, now that the bind is complete.
+ if (public_addrs != bind_addrs) {
+ msgr->set_addrs(public_addrs);
+ }
+
if (g_conf()->daemonize) {
global_init_postfork_finish(g_ceph_context);
prefork.daemonize();
// add ourselves as a conf observer
g_conf().add_observer(this);
+ messenger->set_auth_client(this);
+ messenger->set_auth_server(this);
+ mgr_messenger->set_auth_client(this);
+
+ auth_registry.refresh_config();
+
lock.Unlock();
return 0;
}
// i'm ready!
messenger->add_dispatcher_tail(this);
- messenger->set_auth_client(this);
- messenger->set_auth_server(this);
mgr_client.init();
mgr_messenger->add_dispatcher_tail(&mgr_client);
mgr_messenger->add_dispatcher_tail(this); // for auth ms_* calls
- mgr_messenger->set_auth_client(this);
-
- auth_registry.refresh_config();
bootstrap();
// add features of myself into feature_map