From 07b7f101057a80d1356bd20040180e94cd20c211 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Fri, 17 Oct 2014 17:37:03 +0100 Subject: [PATCH] mon: MDSMonitor: return if fs exists on 'fs new' We were just setting return code to -EINVAL, while allowing the logic to continue regardless. If we are to return error, then we should abort the operation as well and let the user know it went wrong instead of continuing as if nothing had happened. Signed-off-by: Joao Eduardo Luis --- src/mon/MDSMonitor.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index d8050a8cc0c3a..dd3a6698e5ce1 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -1109,6 +1109,7 @@ bool MDSMonitor::management_command( /* We currently only support one filesystem, so cannot create a second */ ss << "A filesystem already exists, use `ceph fs rm` if you wish to delete it"; r = -EINVAL; + return true; } pg_pool_t const *data_pool = mon->osdmon()->osdmap.get_pg_pool(data); -- 2.39.5