Skip to content

Commit f939c35

Browse files
authored
Merge pull request ceph#56531 from rzarzynski/wip-bug-65183
mon, qa: suites override ec profiles with --yes_i_really_mean_it; monitors accept that Reviewed-by: Laura Flores <[email protected]>
2 parents bcaf28c + 0e70f67 commit f939c35

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

qa/standalone/mon/osd-erasure-code-profile.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ function TEST_set() {
5656
ceph osd erasure-code-profile get $profile | \
5757
grep -e key=value -e plugin=isa || return 1
5858
#
59-
# --force is required to override an existing profile
59+
# --force & --yes-i-really-mean-it are required to override
60+
# an existing profile
6061
#
6162
! ceph osd erasure-code-profile set $profile > $dir/out 2>&1 || return 1
6263
grep 'will not override' $dir/out || return 1
63-
ceph osd erasure-code-profile set $profile key=other --force || return 1
64+
ceph osd erasure-code-profile set $profile key=other --force --yes-i-really-mean-it || return 1
6465
ceph osd erasure-code-profile get $profile | \
6566
grep key=other || return 1
6667

qa/workunits/cephtool/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2553,7 +2553,7 @@ function test_mon_osd_erasure_code()
25532553
ceph osd erasure-code-profile set fooprofile a=b c=d
25542554
ceph osd erasure-code-profile set fooprofile a=b c=d
25552555
expect_false ceph osd erasure-code-profile set fooprofile a=b c=d e=f
2556-
ceph osd erasure-code-profile set fooprofile a=b c=d e=f --force
2556+
ceph osd erasure-code-profile set fooprofile a=b c=d e=f --force --yes-i-really-mean-it
25572557
ceph osd erasure-code-profile set fooprofile a=b c=d e=f
25582558
expect_false ceph osd erasure-code-profile set fooprofile a=b c=d e=f g=h
25592559
# make sure rule-foo doesn't work anymore

qa/workunits/rados/test_rados_tool.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ run_expect_nosignal "$RADOS_TOOL" --object-locator "asdf" ls
8989
run_expect_nosignal "$RADOS_TOOL" --namespace "asdf" ls
9090

9191
run_expect_succ "$CEPH_TOOL" osd pool create "$POOL" 8
92-
run_expect_succ "$CEPH_TOOL" osd erasure-code-profile set myprofile k=2 m=1 stripe_unit=2K crush-failure-domain=osd --force
92+
run_expect_succ "$CEPH_TOOL" osd erasure-code-profile set myprofile k=2 m=1 stripe_unit=2K crush-failure-domain=osd --force --yes-i-really-mean-it
9393
run_expect_succ "$CEPH_TOOL" osd pool create "$POOL_EC" 100 100 erasure myprofile
9494

9595

@@ -779,7 +779,7 @@ function test_stat()
779779
############ rados df test (EC pool): ##############
780780
$RADOS_TOOL purge $POOL_EC --yes-i-really-really-mean-it
781781
$CEPH_TOOL osd pool rm $POOL_EC $POOL_EC --yes-i-really-really-mean-it
782-
$CEPH_TOOL osd erasure-code-profile set myprofile k=2 m=1 stripe_unit=2K crush-failure-domain=osd --force
782+
$CEPH_TOOL osd erasure-code-profile set myprofile k=2 m=1 stripe_unit=2K crush-failure-domain=osd --force --yes-i-really-mean-it
783783
$CEPH_TOOL osd pool create $POOL_EC 8 8 erasure
784784

785785
# put object

src/mon/MonCommands.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,8 @@ COMMAND("osd unpause", "unpause osd", "osd", "rw")
857857
COMMAND("osd erasure-code-profile set "
858858
"name=name,type=CephString,goodchars=[A-Za-z0-9-_.] "
859859
"name=profile,type=CephString,n=N,req=false "
860-
"name=force,type=CephBool,req=false",
860+
"name=force,type=CephBool,req=false "
861+
"name=yes_i_really_mean_it,type=CephBool,req=false",
861862
"create erasure code profile <name> with [<key[=value]> ...] pairs. Add a --force at the end to override an existing profile (VERY DANGEROUS)",
862863
"osd", "rw")
863864
COMMAND("osd erasure-code-profile get "

0 commit comments

Comments
 (0)