mirror of
https://github.com/ceph/ceph
synced 2025-01-29 14:34:40 +00:00
test: fix the plugin_exists()
in 8e61a99
, we try to init the plugin when user set a profile using
"ceph osd erasure-code-profile set <profile-name> <profile>", so
if user passes in an unknown plugin, ceph will reject it right away,
instead of loading the plugin when "ceph osd crush rule create-erasure".
Fixes: #11870
Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
1957c88c81
commit
6bd425b025
@ -105,15 +105,13 @@ function plugin_exists() {
|
||||
local plugin=$1
|
||||
|
||||
local status
|
||||
./ceph osd erasure-code-profile set TESTPROFILE plugin=$plugin
|
||||
if ./ceph osd crush rule create-erasure TESTRULE TESTPROFILE 2>&1 |
|
||||
if ./ceph osd erasure-code-profile set TESTPROFILE plugin=$plugin 2>&1 |
|
||||
grep "$plugin.*No such file" ; then
|
||||
status=1
|
||||
else
|
||||
./ceph osd crush rule rm TESTRULE
|
||||
status=0
|
||||
./ceph osd erasure-code-profile rm TESTPROFILE
|
||||
fi
|
||||
./ceph osd erasure-code-profile rm TESTPROFILE
|
||||
return $status
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user