Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / qa / workunits / mgr / test_localpool.sh
1 #!/bin/sh -ex
2
3 ceph config-key set mgr/localpool/subtree host
4 ceph config-key set mgr/localpool/failure_domain osd
5 ceph mgr module enable localpool
6
7 while ! ceph osd pool ls | grep '^by-host-'
8 do
9     sleep 5
10 done
11
12 ceph mgr module disable localpool
13 for p in `ceph osd pool ls | grep '^by-host-'`
14 do
15     ceph osd pool rm $p $p --yes-i-really-really-mean-it
16 done
17
18 ceph config-key rm mgr/localpool/subtree
19 ceph config-key rm mgr/localpool/failure_domain
20
21 echo OK