Skip to content

Commit

Permalink
use new api and fix some wrong flag caller
Browse files Browse the repository at this point in the history
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
  • Loading branch information
Yunchuan Wen committed Nov 12, 2015
1 parent 628f69f commit 0669cba
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ceph_mds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ int main(int argc, const char **argv)
exit(1);

if (shadow != MDSMap::STATE_ONESHOT_REPLAY)
global_init_daemonize(g_ceph_context, 0);
global_init_daemonize(g_ceph_context);
common_init_finish(g_ceph_context);

// get monmap
Expand Down
6 changes: 3 additions & 3 deletions src/ceph_mon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ int main(int argc, const char **argv)
// resolve public_network -> public_addr
pick_addresses(g_ceph_context, CEPH_PICK_ADDRESS_PUBLIC);

common_init_finish(g_ceph_context, flags);
common_init_finish(g_ceph_context);

bufferlist monmapbl, osdmapbl;
std::string error;
Expand Down Expand Up @@ -496,7 +496,7 @@ int main(int argc, const char **argv)
// screwing us over
Preforker prefork;
if (!(flags & CINIT_FLAG_NO_DAEMON_ACTIONS)) {
if (global_init_prefork(g_ceph_context, 0) >= 0) {
if (global_init_prefork(g_ceph_context) >= 0) {
string err_msg;
err = prefork.prefork(err_msg);
if (err < 0) {
Expand Down Expand Up @@ -749,7 +749,7 @@ int main(int argc, const char **argv)
}

if (g_conf->daemonize) {
global_init_postfork_finish(g_ceph_context, 0);
global_init_postfork_finish(g_ceph_context);
prefork.daemonize();
}

Expand Down
2 changes: 1 addition & 1 deletion src/ceph_osd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ int main(int argc, const char **argv)
exit(1);

// Set up crypto, daemonize, etc.
global_init_daemonize(g_ceph_context, 0);
global_init_daemonize(g_ceph_context);
common_init_finish(g_ceph_context);

TracepointProvider::initialize<osd_tracepoint_traits>(g_ceph_context);
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ int main(int argc, const char **argv)
check_curl();

if (g_conf->daemonize) {
global_init_daemonize(g_ceph_context, 0);
global_init_daemonize(g_ceph_context);
}
Mutex mutex("main");
SafeTimer init_timer(g_ceph_context, mutex);
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_object_expirer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int main(const int argc, const char **argv)
}

if (g_conf->daemonize) {
global_init_daemonize(g_ceph_context, 0);
global_init_daemonize(g_ceph_context);
}

common_init_finish(g_ceph_context);
Expand Down

0 comments on commit 0669cba

Please sign in to comment.