It is the same flag that is given to common_preinit. The service thread
is not initialized if CINIT_FLAG_NO_DAEMON_ACTIONS is set.
Signed-off-by: Loic Dachary <loic@dachary.org>
// resolve public_network -> public_addr
pick_addresses(g_ceph_context, CEPH_PICK_ADDRESS_PUBLIC);
- common_init_finish(g_ceph_context);
+ common_init_finish(g_ceph_context, flags);
bufferlist monmapbl, osdmapbl;
std::string error;
/* Please be sure that this can safely be called multiple times by the
* same application. */
-void common_init_finish(CephContext *cct)
+void common_init_finish(CephContext *cct, int flags)
{
ceph::crypto::init(cct);
- cct->start_service_thread();
+
+ if (!(flags & CINIT_FLAG_NO_DAEMON_ACTIONS))
+ cct->start_service_thread();
if (cct->_conf->lockdep) {
g_lockdep = true;
* libraries. The most obvious reason for this is that the threads started by
* the Ceph libraries would be destroyed by a fork().
*/
-void common_init_finish(CephContext *cct);
+void common_init_finish(CephContext *cct, int flags = 0);
#endif