]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_osd: move auto-upgrade to after fork
authorSamuel Just <sam.just@inktank.com>
Mon, 18 Jun 2012 21:02:28 +0000 (14:02 -0700)
committerSage Weil <sage@inktank.com>
Mon, 18 Jun 2012 21:33:33 +0000 (14:33 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/ceph_osd.cc

index 6ced00268a0b6fbcc507fd426ecbfdc69e294131..dc4e13f1958d7a9914a1545898372ec326e85222 100644 (file)
@@ -255,16 +255,14 @@ int main(int argc, const char **argv)
   }
 
 
-  if (convertfilestore ||
-      g_conf->filestore_update_to >= (int)FileStore::on_disk_version) {
+  if (convertfilestore) {
     int err = OSD::convertfs(g_conf->osd_data, g_conf->osd_journal);
     if (err < 0) {
       derr << TEXT_RED << " ** ERROR: error converting store " << g_conf->osd_data
           << ": " << cpp_strerror(-err) << TEXT_NORMAL << dendl;
       exit(1);
     }
-    if (convertfilestore)
-      exit(0);
+    exit(0);
   }
   
   string magic;
@@ -400,6 +398,15 @@ int main(int argc, const char **argv)
   global_init_daemonize(g_ceph_context, CINIT_FLAG_NO_CLOSE_STDERR);
   common_init_finish(g_ceph_context);
 
+  if (g_conf->filestore_update_to >= (int)FileStore::on_disk_version) {
+    int err = OSD::convertfs(g_conf->osd_data, g_conf->osd_journal);
+    if (err < 0) {
+      derr << TEXT_RED << " ** ERROR: error converting store " << g_conf->osd_data
+          << ": " << cpp_strerror(-err) << TEXT_NORMAL << dendl;
+      exit(1);
+    }
+  }
+
   MonClient mc(g_ceph_context);
   if (mc.build_initial_monmap() < 0)
     return -1;