summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <samuel.just@dreamhost.com>2011-09-02 18:02:10 -0700
committerSamuel Just <samuel.just@dreamhost.com>2011-09-02 18:03:02 -0700
commit2a10fba72ea0ff7a5954a6d1a1d108e4777697b7 (patch)
tree6ea0a42fd6c927526a417e55cb01d5a18825eda3
parent78d13e49d60aa73cb671bfec9d20af1db0b2379f (diff)
downloadceph-2a10fba72ea0ff7a5954a6d1a1d108e4777697b7.tar.gz
cosd: Do filestore conversion after common_init_finish
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
-rw-r--r--src/cosd.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/cosd.cc b/src/cosd.cc
index 7ff132723a3..7e16deba766 100644
--- a/src/cosd.cc
+++ b/src/cosd.cc
@@ -193,15 +193,13 @@ int main(int argc, const char **argv)
exit(0);
}
- 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) {
- derr << "Converted Filestore " << g_conf->osd_data << dendl;
- exit(0);
+ 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);
+ }
}
string magic;
@@ -293,6 +291,14 @@ int main(int argc, const char **argv)
// Leave stderr open in case we need to report errors.
global_init_daemonize(g_ceph_context, CINIT_FLAG_NO_CLOSE_STDERR);
common_init_finish(g_ceph_context);
+
+ 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;