]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: fix reweight-by-utilization cephbool flag
authorSage Weil <sage@newdream.net>
Mon, 24 May 2021 19:17:58 +0000 (15:17 -0400)
committerSage Weil <sage@newdream.net>
Fri, 4 Jun 2021 20:56:17 +0000 (16:56 -0400)
This was broken, since it was trying to get a CephChoices as a bool.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mgr/DaemonServer.cc
src/mgr/MgrCommands.h

index ea41ba05887099fafa470117716b82f18d2443c9..479ea7a80cb099a1612256ecaa59e0702c1c9e27 100644 (file)
@@ -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) {
index bc3350da448ebd25e1e90bed6d644d22503c0d5c..11607446b84bc12bb93d54167aca08cca6e9a9b4 100644 (file)
@@ -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 " \