]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/cli/crushtool/choose-args.crush
update sources to 12.2.7
[ceph.git] / ceph / src / test / cli / crushtool / choose-args.crush
CommitLineData
7c673cae
FG
1# begin crush map
2
3# devices
4device 0 device0
5device 1 device1
6device 2 device2
7
8# types
9type 0 device
10type 1 host
11type 2 rack
12type 3 root
13
14# buckets
15host host0 {
16 id -1 # do not change unnecessarily
17 # weight 1.000
28e407b8 18 alg straw2
7c673cae
FG
19 hash 0 # rjenkins1
20 item device0 weight 1.000
21}
22host host1 {
23 id -2 # do not change unnecessarily
24 # weight 1.000
28e407b8 25 alg straw2
7c673cae
FG
26 hash 0 # rjenkins1
27 item device1 weight 1.000
28}
29host host2 {
30 id -5 # do not change unnecessarily
31 # weight 1.000
28e407b8 32 alg straw2
7c673cae
FG
33 hash 0 # rjenkins1
34 item device2 weight 1.000
35}
36rack rack0 {
37 id -3 # do not change unnecessarily
38 # weight 3.000
28e407b8 39 alg straw2
7c673cae
FG
40 hash 0 # rjenkins1
41 item host0 weight 1.000
42 item host1 weight 1.000
43 item host2 weight 1.000
44}
45root root {
46 id -4 # do not change unnecessarily
47 # weight 4.000
28e407b8 48 alg straw2
7c673cae
FG
49 hash 0 # rjenkins1
50 item rack0 weight 4.000
51}
52
53# rules
54rule data {
c07f9fc5 55 id 3
7c673cae
FG
56 type replicated
57 min_size 2
58 max_size 2
59 step take root
60 step chooseleaf firstn 0 type rack
61 step emit
62}
63
64# choose_args
65choose_args 1 {
66}
67choose_args 2 {
68 {
69 bucket_id -3
70 ids [ -20 30 -25 ]
71 }
72}
73choose_args 3 {
74 {
75 bucket_id -3
76 weight_set [
77 [ 1.000 2.000 5.000 ]
78 [ 3.000 2.000 5.000 ]
79 ]
80 ids [ -20 -30 -25 ]
81 }
82}
83choose_args 4 {
84 {
85 bucket_id -2
86 weight_set [
87 [ 1.000 ]
88 [ 3.000 ]
89 ]
90 }
91}
92choose_args 5 {
93 {
94 bucket_id -1
95 ids [ -450 ]
96 }
97}
98choose_args 6 {
99 {
100 bucket_id -1
101 ids [ -450 ]
102 }
103 {
104 bucket_id -2
105 weight_set [
106 [ 1.000 ]
107 [ 3.000 ]
108 ]
109 }
110 {
111 bucket_id -3
112 weight_set [
113 [ 1.000 2.000 5.000 ]
114 [ 3.000 2.000 5.000 ]
115 ]
116 ids [ -20 -30 -25 ]
117 }
118}
119
120# end crush map