From: John Spray Date: Mon, 6 Oct 2014 10:18:51 +0000 (+0100) Subject: mds: deprecation-warn on numeric mds names X-Git-Tag: v0.88~97^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e7cb6082734aeec2a399e8a2d63895d4e390d92;p=ceph.git 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 --- diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc index b1ab386cc676..7f4e082de97f 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());