Skip to content

Commit

Permalink
mon: remove range=100 from reweight-by-* commands
Browse files Browse the repository at this point in the history
Specifying the range makes it skip instead of error when you give
it a bad value.

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Mar 9, 2016
1 parent 651f05b commit 661891a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion qa/workunits/cephtool/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ function test_mon_osd_misc()
ceph pg set_full_ratio 95 2>$TMPFILE; check_response 'not in range' $? 22

# expect "not in range" for invalid overload percentage
ceph osd reweight-by-utilization 80 2>$TMPFILE; check_response 'not in range' $? 22
ceph osd reweight-by-utilization 80 2>$TMPFILE; check_response 'higher than 100' $? 22

set -e

Expand Down
8 changes: 4 additions & 4 deletions src/mon/MonCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -705,28 +705,28 @@ COMMAND("osd utilization",
"get basic pg distribution stats",
"osd", "r", "cli,rest")
COMMAND("osd reweight-by-utilization " \
"name=oload,type=CephInt,range=100,req=false " \
"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",\
"reweight OSDs by utilization [overload-percentage-for-consideration, default 120]", \
"osd", "rw", "cli,rest")
COMMAND("osd test-reweight-by-utilization " \
"name=oload,type=CephInt,range=100,req=false " \
"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",\
"dry run of reweight OSDs by utilization [overload-percentage-for-consideration, default 120]", \
"osd", "rw", "cli,rest")
COMMAND("osd reweight-by-pg " \
"name=oload,type=CephInt,range=100,req=false " \
"name=oload,type=CephInt,req=false " \
"name=max_change,type=CephFloat,req=false " \
"name=max_osds,type=CephInt,req=false " \
"name=pools,type=CephPoolname,n=N,req=false", \
"reweight OSDs by PG distribution [overload-percentage-for-consideration, default 120]", \
"osd", "rw", "cli,rest")
COMMAND("osd test-reweight-by-pg " \
"name=oload,type=CephInt,range=100,req=false " \
"name=oload,type=CephInt,req=false " \
"name=max_change,type=CephFloat,req=false " \
"name=max_osds,type=CephInt,req=false " \
"name=pools,type=CephPoolname,n=N,req=false", \
Expand Down

0 comments on commit 661891a

Please sign in to comment.