blob: 8597b7147c88da8efc5395a17ed0e9ce3f295ade (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash -x
set -e
expect_1()
{
set -x
set +e
"$@"
if [ $? == 1 ]; then return 0; else return 1; fi
}
key=`ceph auth get-or-create-key client.poolaccess1 mon 'allow r' osd 'allow *'`
rados --id poolaccess1 --key $key -p rbd ls
key=`ceph auth get-or-create-key client.poolaccess2 mon 'allow r' osd 'allow * pool=nopool'`
expect_1 rados --id poolaccess2 --key $key -p rbd ls
key=`ceph auth get-or-create-key client.poolaccess3 mon 'allow r' osd 'allow rw pool=nopool'`
expect_1 rados --id poolaccess3 --key $key -p rbd ls
echo OK
|