]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Make --get-journal-fsid not really start the osd.
authorSage Weil <sage@inktank.com>
Fri, 5 Oct 2012 16:10:31 +0000 (09:10 -0700)
committerTommi Virtanen <tv@inktank.com>
Fri, 5 Oct 2012 22:41:35 +0000 (15:41 -0700)
This way, it won't need -i ID and it won't access the osd_data_dir.
That makes it useful for locating the right osd to use with an
external journal partition.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
src/ceph_osd.cc

index 66789509458ccb99ef6b18c7068d709bc4db98ef..54aa95e5df174868f818615eb19a7e9f95aa028b 100644 (file)
@@ -265,6 +265,14 @@ int main(int argc, const char **argv)
     exit(0);
   }
   
+  if (get_journal_fsid) {
+    uuid_d fsid;
+    int r = OSD::peek_journal_fsid(g_conf->osd_journal, fsid);
+    if (r == 0)
+      cout << fsid << std::endl;
+    exit(r);
+  }
+
   string magic;
   uuid_d cluster_fsid, osd_fsid;
   int w;
@@ -297,13 +305,6 @@ int main(int argc, const char **argv)
     cout << osd_fsid << std::endl;
     exit(0);
   }
-  if (get_journal_fsid) {
-    uuid_d fsid;
-    int r = OSD::peek_journal_fsid(g_conf->osd_journal, fsid);
-    if (r == 0)
-      cout << fsid << std::endl;
-    exit(r);
-  }
 
   pick_addresses(g_ceph_context);