]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: if 'pg <pgid> ..' doesn't parse a pgid, send to mon
authorSage Weil <sage.weil@dreamhost.com>
Tue, 21 Feb 2012 04:40:35 +0000 (20:40 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 21 Feb 2012 04:40:35 +0000 (20:40 -0800)
E.g., 'pg dump'.  Sigh.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/tools/common.cc

index 655e81a54ec25a9572bc6114a88fe795f06e6798..b473b4cb04d3523f71065d161f21f56201dbe3ee 100644 (file)
@@ -472,11 +472,10 @@ int do_command(CephToolCtx *ctx,
       cerr << "no pgid specified" << std::endl;
       return -EINVAL;
     }
-    if (!pending_target_pgid.parse(cmd[1].c_str())) {
-      cerr << "'" << cmd[1] << "' not a valid pgid" << std::endl;
-      return -EINVAL;
+    if (pending_target_pgid.parse(cmd[1].c_str())) {
+      pending_tell_pgid = true;
     }
-    pending_tell_pgid = true;
+    // otherwise, send the request on to the monitor (e.g., 'pg dump').  sigh.
   }
 
   send_command(ctx);