]> git.proxmox.com Git - ceph.git/blame - ceph/qa/workunits/mon/pool_ops.sh
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / qa / workunits / mon / pool_ops.sh
CommitLineData
11fdf7f2 1#!/usr/bin/env bash
7c673cae 2
11fdf7f2 3set -ex
7c673cae
FG
4
5function expect_false()
6{
7 set -x
8 if "$@"; then return 1; else return 0; fi
9}
10
11# note: we need to pass the other args or ceph_argparse.py will take
12# 'invalid' that is not replicated|erasure and assume it is the next
13# argument, which is a string.
14expect_false ceph osd pool create foo 123 123 invalid foo-profile foo-ruleset
15
16ceph osd pool create foo 123 123 replicated
17ceph osd pool create fooo 123 123 erasure default
18ceph osd pool create foooo 123
19
20ceph osd pool create foo 123 # idempotent
21
22ceph osd pool set foo size 1
23ceph osd pool set foo size 4
24ceph osd pool set foo size 10
25expect_false ceph osd pool set foo size 0
26expect_false ceph osd pool set foo size 20
27
28# should fail due to safety interlock
29expect_false ceph osd pool delete foo
30expect_false ceph osd pool delete foo foo
31expect_false ceph osd pool delete foo foo --force
32expect_false ceph osd pool delete foo fooo --yes-i-really-mean-it
33expect_false ceph osd pool delete foo --yes-i-really-mean-it foo
34
35ceph osd pool delete foooo foooo --yes-i-really-really-mean-it
36ceph osd pool delete fooo fooo --yes-i-really-really-mean-it
37ceph osd pool delete foo foo --yes-i-really-really-mean-it
38
39# idempotent
40ceph osd pool delete foo foo --yes-i-really-really-mean-it
41ceph osd pool delete fooo fooo --yes-i-really-really-mean-it
42ceph osd pool delete fooo fooo --yes-i-really-really-mean-it
43
44# non-existent pool
45ceph osd pool delete fuggg fuggg --yes-i-really-really-mean-it
46
47echo OK
48
49