summaryrefslogtreecommitdiffstats
path: root/src/test/cli/crushtool/add-bucket.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/test/cli/crushtool/add-bucket.t
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/cli/crushtool/add-bucket.t')
-rw-r--r--src/test/cli/crushtool/add-bucket.t69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/test/cli/crushtool/add-bucket.t b/src/test/cli/crushtool/add-bucket.t
new file mode 100644
index 00000000..b6c3cedc
--- /dev/null
+++ b/src/test/cli/crushtool/add-bucket.t
@@ -0,0 +1,69 @@
+ $ crushtool -i "$TESTDIR/simple.template" --add-bucket host0 host --loc cluster cluster0 -o map0 > /dev/null
+ $ crushtool -i map0 --add-bucket host1 host -o map1 > /dev/null
+ $ crushtool -i map1 --move host1 --loc cluster cluster0 -o map2 > /dev/null
+ $ crushtool -i map2 --add-item 1 1.0 device1 --loc cluster cluster0 -o map3 > /dev/null
+ $ crushtool -i map3 --move device1 --loc host host0 -o map4 > /dev/null
+ $ crushtool -d map4
+ # begin crush map
+
+ # devices
+ device 1 device1
+
+ # types
+ type 0 device
+ type 1 host
+ type 2 cluster
+
+ # buckets
+ host host0 {
+ \tid -2\t\t# do not change unnecessarily (esc)
+ \t# weight 1.000 (esc)
+ \talg straw (esc)
+ \thash 0\t# rjenkins1 (esc)
+ \titem device1 weight 1.000 (esc)
+ }
+ host host1 {
+ \tid -3\t\t# do not change unnecessarily (esc)
+ \t# weight 0.000 (esc)
+ \talg straw (esc)
+ \thash 0\t# rjenkins1 (esc)
+ }
+ cluster cluster0 {
+ \tid -1\t\t# do not change unnecessarily (esc)
+ \t# weight 1.000 (esc)
+ \talg straw (esc)
+ \thash 0\t# rjenkins1 (esc)
+ \titem host0 weight 1.000 (esc)
+ \titem host1 weight 0.000 (esc)
+ }
+
+ # rules
+ rule data {
+ \tid 0 (esc)
+ \ttype replicated (esc)
+ \tmin_size 1 (esc)
+ \tmax_size 10 (esc)
+ \tstep take cluster0 (esc)
+ \tstep chooseleaf firstn 0 type host (esc)
+ \tstep emit (esc)
+ }
+ rule metadata {
+ \tid 1 (esc)
+ \ttype replicated (esc)
+ \tmin_size 1 (esc)
+ \tmax_size 10 (esc)
+ \tstep take cluster0 (esc)
+ \tstep chooseleaf firstn 0 type host (esc)
+ \tstep emit (esc)
+ }
+ rule rbd {
+ \tid 2 (esc)
+ \ttype replicated (esc)
+ \tmin_size 1 (esc)
+ \tmax_size 10 (esc)
+ \tstep take cluster0 (esc)
+ \tstep chooseleaf firstn 0 type host (esc)
+ \tstep emit (esc)
+ }
+
+ # end crush map