From a246a567767ae5941e23897f32d3e61c0562889d Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 16 Sep 2020 01:10:31 +0530 Subject: [PATCH] mon/MDSMonitor: return zero when mds is absent for "mds fail" ... instead of EINVAL. Signed-off-by: Rishabh Dave --- src/mon/MDSMonitor.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 391c5c7c47bc0..f00460e684aaa 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -1456,7 +1456,9 @@ int MDSMonitor::filesystem_command( MDSMap::mds_info_t failed_info; mds_gid_t gid = gid_from_arg(fsmap, who, ss); if (gid == MDS_GID_NONE) { - return -EINVAL; + ss << "MDS named '" << who << "' does not exist, is not up or you " + << "lack the permission to see."; + return 0; } if(!fsmap.gid_exists(gid, op->get_session()->get_allowed_fs_names())) { ss << "MDS named '" << who << "' does not exist, is not up or you " -- 2.39.5