]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix asok on rank 0 3202/head
authorJohn Spray <john.spray@redhat.com>
Thu, 18 Dec 2014 12:14:25 +0000 (12:14 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 18 Dec 2014 12:16:13 +0000 (12:16 +0000)
Broken by:
1b2b34431 (MDS: do not allow invocation of most commands on an inactive MDS)

MDS::whoami is a rank, so check for inactive is <0, not <=0

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDS.cc

index 0344a1be079caf900716c38f2188524200f1c4bd..8c104c4a328f8072a4ab1bea092d0cfaa04c7837 100644 (file)
@@ -238,7 +238,7 @@ bool MDS::asok_command(string command, cmdmap_t& cmdmap, string format,
     f->dump_unsigned("osdmap_epoch_barrier", get_osd_epoch_barrier());
     f->close_section(); // status
   } else {
-    if (whoami <= 0) {
+    if (whoami < 0) {
       dout(1) << "Can't run that command on an inactive MDS!" << dendl;
       f->dump_string("error", "mds_not_active");
     } else if (command == "dump_ops_in_flight") {