]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/OSDMonitor: set result code properly if we fail to process "swap-bucket"
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 23 Jun 2017 10:26:02 +0000 (18:26 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 23 Jun 2017 10:37:35 +0000 (18:37 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/OSDMonitor.cc

index ea45ddfb663afb5347a20f32dfb0cad2b3bb03d5..ee49e404d67bebbbb7166162fb3e0813c4f172fa 100644 (file)
@@ -7461,6 +7461,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
     int r = newcrush.swap_bucket(g_ceph_context, sid, did);
     if (r < 0) {
       ss << "failed to swap bucket contents: " << cpp_strerror(r);
+      err = r;
       goto reply;
     }
     ss << "swapped bucket of " << source << " to " << dest;