From 60ed88785d027151568436eb697c05a801e28e54 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 10 Jan 2020 14:27:07 -0800 Subject: [PATCH] mds: clarify message about blocked scrub Also, non-recursive scrub still needs rejected: a given directory's fragments may be on other ranks. Signed-off-by: Patrick Donnelly --- src/mds/MDSRank.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index bf01333c3ca..0314f036abd 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -2524,16 +2524,14 @@ void MDSRankDispatcher::handle_asok_command( cmd_getval(g_ceph_context, cmdmap, "scrubops", scrubop_vec); cmd_getval(g_ceph_context, cmdmap, "path", path); cmd_getval(g_ceph_context, cmdmap, "tag", tag); - /* if there are more than one mds active and a recursive scrub is requested, - * dishonor the request - */ - bool is_recursive = std::find(scrubop_vec.begin(), scrubop_vec.end(), string("recursive")) != scrubop_vec.end(); - if (mdsmap->get_max_mds() > 1 && is_recursive) { - ss << "There is more than one MDS active. Hence a recursive scrub " - "request cannot be started."; + + /* Multiple MDS scrub is not currently supported. See also: https://tracker.ceph.com/issues/12274 */ + if (mdsmap->get_max_mds() > 1) { + ss << "Scrub is not currently supported for multiple active MDS. Please reduce max_mds to 1 and then scrub."; r = -EINVAL; goto out; } + finisher->queue( new LambdaContext( [this, on_finish, f, path, tag, scrubop_vec](int r) { -- 2.39.5