]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: deprecation-warn on numeric mds names
authorJohn Spray <john.spray@redhat.com>
Mon, 6 Oct 2014 10:18:51 +0000 (11:18 +0100)
committerJohn Spray <john.spray@redhat.com>
Wed, 8 Oct 2014 10:58:19 +0000 (11:58 +0100)
To be turned into strict check in post-hammer
release, so that we can always unambiguously
discriminate a string into one of name, rank, gid.

Signed-off-by: John Spray <john.spray@redhat.com>
src/ceph_mds.cc

index b1ab386cc6762b446c52051f66c0ee69c8416bdc..7f4e082de97f69d0126185bfadf4174c34e9efed 100644 (file)
@@ -142,6 +142,12 @@ int main(int argc, const char **argv)
     usage();
   }
 
+  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.  "
+      "MDS names may not start with a numeric digit." << dendl;
+  }
+
   Messenger *messenger = Messenger::create(g_ceph_context,
                                           entity_name_t::MDS(-1), "mds",
                                           getpid());