]> 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, 30 Jan 2015 11:18:04 +0000 (11:18 +0000)
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>
(cherry picked from commit 07b7f101057a80d1356bd20040180e94cd20c211)

src/mon/MDSMonitor.cc

index ade49a945fd0777c99ced099e6cca1525261b05a..c0b831f1043c02e6dda536724d45a91b4ecea579 100644 (file)
@@ -1108,6 +1108,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);