From: Patrick Donnelly Date: Tue, 6 Mar 2018 23:28:50 +0000 (-0800) Subject: Merge PR #20541 into master X-Git-Tag: v13.0.2~74 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eb7732b73580bd10cf5d093c806701098310bf0e;p=ceph.git Merge PR #20541 into master * refs/pull/20541/head: ceph-mds: exit if invalid id Reviewed-by: Patrick Donnelly --- eb7732b73580bd10cf5d093c806701098310bf0e diff --cc src/ceph_mds.cc index e0c00f3bb8e6,ecc84aba387f..9d1a149fb003 --- a/src/ceph_mds.cc +++ b/src/ceph_mds.cc @@@ -141,29 -139,11 +141,29 @@@ int main(int argc, const char **argv if (g_conf->name.get_id().empty() || (g_conf->name.get_id()[0] >= '0' && g_conf->name.get_id()[0] <= '9')) { - derr << "deprecation warning: MDS id '" << g_conf->name - << "' is invalid and will be forbidden in a future version. " + derr << "MDS id '" << g_conf->name << "' is invalid. " "MDS names may not start with a numeric digit." << dendl; + exit(1); } + if (global_init_prefork(g_ceph_context) >= 0) { + std::string err; + int r = forker.prefork(err); + if (r < 0) { + cerr << err << std::endl; + return r; + } + if (forker.is_parent()) { + if (forker.parent_wait(err) != 0) { + return -ENXIO; + } + return 0; + } + global_init_postfork_start(g_ceph_context); + } + common_init_finish(g_ceph_context); + global_init_chdir(g_ceph_context); + auto nonce = ceph::util::generate_random_number(); std::string public_msgr_type = g_conf->ms_public_type.empty() ? g_conf->get_val("ms_type") : g_conf->ms_public_type;