3 # attempt to trigger #6047
15 if [[ $ret -ne $expected ]]; then
16 echo "[$cmd_no] unexpected return '$ret', expected '$expected'"
21 ceph osd pool delete
test test --yes-i-really-really-mean-it || true
22 expect
'ceph osd pool create test 256 256' 0
23 expect
'ceph osd pool mksnap test snapshot' 0
24 expect
'ceph osd pool rmsnap test snapshot' 0
26 expect
'rbd --pool=test pool init' 0
27 expect
'rbd --pool=test --rbd_validate_pool=false create --size=102400 image' 0
28 expect
'rbd --pool=test snap create image@snapshot' 22
30 expect
'ceph osd pool delete test test --yes-i-really-really-mean-it' 0
31 expect
'ceph osd pool create test 256 256' 0
32 expect
'rbd --pool=test pool init' 0
33 expect
'rbd --pool=test create --size=102400 image' 0
34 expect
'rbd --pool=test snap create image@snapshot' 0
35 expect
'rbd --pool=test snap ls image' 0
36 expect
'rbd --pool=test snap rm image@snapshot' 0
38 expect
'ceph osd pool mksnap test snapshot' 22
40 expect
'ceph osd pool delete test test --yes-i-really-really-mean-it' 0
42 # reproduce 7210 and expect it to be fixed
43 # basically create such a scenario where we end up deleting what used to
44 # be an unmanaged snapshot from a not-unmanaged pool
46 ceph osd pool delete test-foo test-foo
--yes-i-really-really-mean-it || true
47 expect
'rados mkpool test-foo' 0
48 expect
'rbd --pool test-foo create --size 1024 image' 0
49 expect
'rbd --pool test-foo snap create image@snapshot' 0
51 ceph osd pool delete test-bar test-bar
--yes-i-really-really-mean-it || true
52 expect
'rados mkpool test-bar' 0
53 expect
'rados cppool test-foo test-bar --yes-i-really-mean-it' 0
54 expect
'rbd --pool test-bar snap rm image@snapshot' 95
55 expect
'ceph osd pool delete test-foo test-foo --yes-i-really-really-mean-it' 0
56 expect
'ceph osd pool delete test-bar test-bar --yes-i-really-really-mean-it' 0