mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
qa/workunits/mon/auth_caps.sh: Revert "qa/workunits: mon: auth_caps: account for mon blank caps"
This reverts commit f0653c0401
.
--force is not implemented by AuthMonitor. so revert this change to test
it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
93317c9ec1
commit
9e1d85775a
@ -13,8 +13,7 @@ for i in ${combinations}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# add special caps
|
# add special caps
|
||||||
# force blank cap with '--force'
|
keymap["blank"]=`ceph auth get-or-create-key client.blank mon 'allow'` || exit 1
|
||||||
keymap["blank"]=`ceph auth get-or-create-key client.blank mon 'allow' --force` || exit 1
|
|
||||||
keymap["all"]=`ceph auth get-or-create-key client.all mon 'allow *'` || exit 1
|
keymap["all"]=`ceph auth get-or-create-key client.all mon 'allow *'` || exit 1
|
||||||
|
|
||||||
tmp=`mktemp`
|
tmp=`mktemp`
|
||||||
@ -80,7 +79,6 @@ write_ops() {
|
|||||||
local caps=$1
|
local caps=$1
|
||||||
local has_read=1 has_write=1 has_exec=1
|
local has_read=1 has_write=1 has_exec=1
|
||||||
local ret
|
local ret
|
||||||
local err
|
|
||||||
local args
|
local args
|
||||||
|
|
||||||
( echo $caps | grep 'r' ) || has_read=0
|
( echo $caps | grep 'r' ) || has_read=0
|
||||||
@ -103,16 +101,9 @@ write_ops() {
|
|||||||
expect $ret ceph auth add client.foo $args
|
expect $ret ceph auth add client.foo $args
|
||||||
expect $ret "ceph auth caps client.foo mon 'allow *' $args"
|
expect $ret "ceph auth caps client.foo mon 'allow *' $args"
|
||||||
expect $ret ceph auth get-or-create client.admin $args
|
expect $ret ceph auth get-or-create client.admin $args
|
||||||
echo "wtf -- before: err=$err ret=$ret"
|
expect $ret "ceph auth get-or-create client.bar mon 'allow' $args"
|
||||||
err=$ret
|
|
||||||
[[ $ret -eq 0 ]] && err=22 # EINVAL
|
|
||||||
expect $err "ceph auth get-or-create client.bar mon 'allow' $args"
|
|
||||||
echo "wtf -- after: err=$err ret=$ret"
|
|
||||||
expect $ret "ceph auth get-or-create client.bar mon 'allow' --force $args"
|
|
||||||
expect $ret ceph auth get-or-create-key client.admin $args
|
expect $ret ceph auth get-or-create-key client.admin $args
|
||||||
expect $ret ceph auth get-or-create-key client.baz $args
|
expect $ret ceph auth get-or-create-key client.baz $args
|
||||||
expect $ret ceph auth del client.bar $args
|
|
||||||
expect $ret ceph auth del client.baz $args
|
|
||||||
expect $ret ceph auth del client.foo $args
|
expect $ret ceph auth del client.foo $args
|
||||||
expect $ret ceph auth import -i $tmp $args
|
expect $ret ceph auth import -i $tmp $args
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user