Skip to content

Commit

Permalink
mgr: fix reweight-by-utilization cephbool flag
Browse files Browse the repository at this point in the history
This was broken, since it was trying to get a CephChoices as a bool.

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
liewegas committed May 24, 2021
1 parent a2234fe commit c51b824
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mgr/DaemonServer.cc
Expand Up @@ -1443,7 +1443,7 @@ bool DaemonServer::_handle_command(
return true;
}
bool no_increasing = false;
cmd_getval(cmdctx->cmdmap, "no_increasing", no_increasing);
cmd_getval_compat_cephbool(cmdctx->cmdmap, "no_increasing", no_increasing);
string out_str;
mempool::osdmap::map<int32_t, uint32_t> new_weights;
r = cluster_state.with_osdmap_and_pgmap([&](const OSDMap &osdmap, const PGMap& pgmap) {
Expand Down
2 changes: 1 addition & 1 deletion src/mgr/MgrCommands.h
Expand Up @@ -111,7 +111,7 @@ COMMAND("osd reweight-by-utilization " \
"name=oload,type=CephInt,req=false " \
"name=max_change,type=CephFloat,req=false " \
"name=max_osds,type=CephInt,req=false " \
"name=no_increasing,type=CephChoices,strings=--no-increasing,req=false",\
"name=no_increasing,type=CephBool,req=false",\
"reweight OSDs by utilization [overload-percentage-for-consideration, default 120]", \
"osd", "rw")
COMMAND("osd test-reweight-by-utilization " \
Expand Down

0 comments on commit c51b824

Please sign in to comment.