cct->_log->start();
}
- if (!conf->no_mon_config) {
- // make sure our mini-session gets legacy values
- conf.apply_changes(nullptr);
-
- MonClient mc_bootstrap(g_ceph_context);
- if (mc_bootstrap.get_monmap_and_config() < 0) {
- cct->_log->flush();
- cerr << "failed to fetch mon config (--no-mon-config to skip)"
- << std::endl;
- _exit(1);
- }
- }
if (!cct->_log->is_started()) {
cct->_log->start();
}
# endif
#endif
+ //
+ // Utterly important to run first network connection after setuid().
+ // In case of rdma transport uverbs kernel module starts returning
+ // -EACCESS on each operation if credentials has been changed, see
+ // callers of ib_safe_file_access() for details.
+ //
+ // fork() syscall also matters, so daemonization won't work in case
+ // of rdma.
+ //
+ if (!g_conf()->no_mon_config) {
+ // make sure our mini-session gets legacy values
+ g_conf().apply_changes(nullptr);
+
+ MonClient mc_bootstrap(g_ceph_context);
+ if (mc_bootstrap.get_monmap_and_config() < 0) {
+ g_ceph_context->_log->flush();
+ cerr << "failed to fetch mon config (--no-mon-config to skip)"
+ << std::endl;
+ _exit(1);
+ }
+ }
+
// Expand metavariables. Invoke configuration observers. Open log file.
g_conf().apply_changes(nullptr);