From 5e7cb6082734aeec2a399e8a2d63895d4e390d92 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 6 Oct 2014 11:18:51 +0100 Subject: [PATCH] mds: deprecation-warn on numeric mds names 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 --- src/ceph_mds.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc index b1ab386cc67..7f4e082de97 100644 --- a/src/ceph_mds.cc +++ b/src/ceph_mds.cc @@ -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()); -- 2.47.3