]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge PR #20541 into master
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 6 Mar 2018 23:28:50 +0000 (15:28 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 6 Mar 2018 23:28:50 +0000 (15:28 -0800)
* refs/pull/20541/head:
ceph-mds: exit if invalid id

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
1  2 
src/ceph_mds.cc

diff --cc src/ceph_mds.cc
index e0c00f3bb8e6a5a2491945386abd751a46fc066e,ecc84aba387fa3231465e0da0eacdcfccb47bb3a..9d1a149fb00366ff750025504e98a4290e90b2f2
@@@ -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<uint64_t>();
  
    std::string public_msgr_type = g_conf->ms_public_type.empty() ? g_conf->get_val<std::string>("ms_type") : g_conf->ms_public_type;