Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: Pass empty string to clear mantle balancer #15282

Merged
merged 2 commits into from Jun 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mds/MDBalancer.cc
Expand Up @@ -393,7 +393,7 @@ void MDBalancer::handle_heartbeat(MHeartbeat *m)
/* avoid spamming ceph -w if user does not turn mantle on */
if (mds->mdsmap->get_balancer() != "") {
int r = mantle_prep_rebalance();
if (!r) return;
if (!r) goto out;
mds->clog->warn() << "using old balancer; mantle failed for "
<< "balancer=" << mds->mdsmap->get_balancer()
<< " : " << cpp_strerror(r);
Expand Down
5 changes: 4 additions & 1 deletion src/mon/FSCommands.cc
Expand Up @@ -295,7 +295,10 @@ class SetHandler : public FileSystemCommandHandler
});
}
} 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<Filesystem> fs)
Expand Down
4 changes: 2 additions & 2 deletions src/pybind/ceph_argparse.py
Expand Up @@ -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:
Expand Down