]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: MDSMonitor: return if fs exists on 'fs new'
authorJoao Eduardo Luis <joao@redhat.com>
Fri, 17 Oct 2014 16:37:03 +0000 (17:37 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Fri, 17 Oct 2014 16:37:03 +0000 (17:37 +0100)
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 <joao@redhat.com>
src/mon/MDSMonitor.cc

index d8050a8cc0c3ab08b1dd0e40cb765ddf216a7d42..dd3a6698e5ce1989f6bb7cf56e8e477cd9ffc40f 100644 (file)
@@ -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);