From: Sage Weil Date: Tue, 2 Apr 2013 20:04:48 +0000 (-0700) Subject: mds: initialize tableservers/clients on mds creation X-Git-Tag: v0.62~106^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5cf0c492e70d5cd9a2189b8f5145e91c2e3efd58;p=ceph.git mds: initialize tableservers/clients on mds creation The handle_mds_recovery(who) path initializes the anchorclients by having the server send a 'ready' message on recovery when the server is active and a peer becomes active. Similarly, recovery_done() does the same when the server becomes active. However, this misses the creation path. Handle that explicitly in boot_create. Fixes: #4619 Signed-off-by: Sage Weil --- diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index 99b14d963ea9..1fa03039ecb7 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -964,7 +964,7 @@ void MDS::handle_mds_map(MMDSMap *m) // did i just recover? if ((is_active() || is_clientreplay()) && (oldstate == MDSMap::STATE_REJOIN || - oldstate == MDSMap::STATE_RECONNECT)) + oldstate == MDSMap::STATE_RECONNECT)) recovery_done(); if (is_active()) { @@ -1157,10 +1157,12 @@ void MDS::boot_create() dout(10) << "boot_create creating fresh anchortable" << dendl; anchorserver->reset(); anchorserver->save(fin.new_sub()); + anchorserver->handle_mds_recovery(whoami); dout(10) << "boot_create creating fresh snaptable" << dendl; snapserver->reset(); snapserver->save(fin.new_sub()); + snapserver->handle_mds_recovery(whoami); } fin.activate(); } @@ -1506,7 +1508,6 @@ void MDS::active_start() finish_contexts(g_ceph_context, waiting_for_active); // kick waiters } - void MDS::recovery_done() { dout(1) << "recovery_done -- successful recovery!" << dendl;