From: Zhi Zhang Date: Thu, 25 May 2017 08:05:31 +0000 (+0800) Subject: Pass empty string to clear mantle balancer X-Git-Tag: v12.1.0~324^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a1214a702cfd8465deb91847f4dc63c0e80fb586;p=ceph-ci.git Pass empty string to clear mantle balancer Signed-off-by: Zhi Zhang --- diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index 630736c3989..0ef7c8a2d43 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -295,7 +295,10 @@ public: }); } } else if (var == "balancer") { - ss << "setting the metadata load balancer to " << val; + if (val.empty()) + ss << "unsetting the metadata load balancer"; + else + ss << "setting the metadata load balancer to " << val; fsmap.modify_filesystem( fs->fscid, [val](std::shared_ptr fs) diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 9328b6c47d8..f188d8f236a 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -920,12 +920,12 @@ def validate(args, signature, flags=0, partial=False): # no arg, but not required? Continue consuming mysig # in case there are later required args - if not myarg and not desc.req: + if myarg == None and not desc.req: break # out of arguments for a required param? # Either return (if partial validation) or raise - if not myarg and desc.req: + if myarg == None and desc.req: if desc.N and desc.numseen < 1: # wanted N, didn't even get 1 if partial: