]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: initialize tableservers/clients on mds creation
authorSage Weil <sage@inktank.com>
Tue, 2 Apr 2013 20:04:48 +0000 (13:04 -0700)
committerSage Weil <sage@inktank.com>
Tue, 2 Apr 2013 20:05:49 +0000 (13:05 -0700)
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 <sage@inktank.com>
src/mds/MDS.cc

index 99b14d963ea912d091e49f4d4833985b28600eb3..1fa03039ecb7fcf4f31e274ebb8c62f6c583c916 100644 (file)
@@ -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;