{
int r;
AdminSocket *admin_socket = g_ceph_context->get_admin_socket();
+ assert(asok_hook == nullptr);
asok_hook = new MDSSocketHook(this);
r = admin_socket->register_command("status", "status", asok_hook,
"high-level status of MDS");
sleep(10);
}
+ // Set up admin socket before taking mds_lock, so that ordering
+ // is consistent (later we take mds_lock within asok callbacks)
+ set_up_admin_socket();
+
mds_lock.Lock();
if (beacon.get_want_state() == MDSMap::STATE_DNE) {
suicide(); // we could do something more graceful here
// schedule tick
reset_tick();
- set_up_admin_socket();
g_conf->add_observer(this);
mds_lock.Unlock();