]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | $ cp "$TESTDIR/choose-args.crush" . |
2 | $ crushtool -c choose-args.crush -o choose-args.compiled | |
3 | $ crushtool -d choose-args.compiled -o choose-args.conf | |
4 | $ crushtool -c choose-args.conf -o choose-args.recompiled | |
5 | $ cmp choose-args.crush choose-args.conf | |
6 | $ cmp choose-args.compiled choose-args.recompiled | |
7 | $ crushtool -c choose-args.conf -o /dev/null --dump | |
8 | { | |
9 | "devices": [ | |
10 | { | |
11 | "id": 0, | |
12 | "name": "device0" | |
13 | }, | |
14 | { | |
15 | "id": 1, | |
16 | "name": "device1" | |
17 | }, | |
18 | { | |
19 | "id": 2, | |
20 | "name": "device2" | |
21 | } | |
22 | ], | |
23 | "types": [ | |
24 | { | |
25 | "type_id": 0, | |
26 | "name": "device" | |
27 | }, | |
28 | { | |
29 | "type_id": 1, | |
30 | "name": "host" | |
31 | }, | |
32 | { | |
33 | "type_id": 2, | |
34 | "name": "rack" | |
35 | }, | |
36 | { | |
37 | "type_id": 3, | |
38 | "name": "root" | |
39 | } | |
40 | ], | |
41 | "buckets": [ | |
42 | { | |
43 | "id": -1, | |
44 | "name": "host0", | |
45 | "type_id": 1, | |
46 | "type_name": "host", | |
47 | "weight": 65536, | |
28e407b8 | 48 | "alg": "straw2", |
7c673cae FG |
49 | "hash": "rjenkins1", |
50 | "items": [ | |
51 | { | |
52 | "id": 0, | |
53 | "weight": 65536, | |
54 | "pos": 0 | |
55 | } | |
56 | ] | |
57 | }, | |
58 | { | |
59 | "id": -2, | |
60 | "name": "host1", | |
61 | "type_id": 1, | |
62 | "type_name": "host", | |
63 | "weight": 65536, | |
28e407b8 | 64 | "alg": "straw2", |
7c673cae FG |
65 | "hash": "rjenkins1", |
66 | "items": [ | |
67 | { | |
68 | "id": 1, | |
69 | "weight": 65536, | |
70 | "pos": 0 | |
71 | } | |
72 | ] | |
73 | }, | |
74 | { | |
75 | "id": -3, | |
76 | "name": "rack0", | |
77 | "type_id": 2, | |
78 | "type_name": "rack", | |
79 | "weight": 196608, | |
28e407b8 | 80 | "alg": "straw2", |
7c673cae FG |
81 | "hash": "rjenkins1", |
82 | "items": [ | |
83 | { | |
84 | "id": -1, | |
85 | "weight": 65536, | |
86 | "pos": 0 | |
87 | }, | |
88 | { | |
89 | "id": -2, | |
90 | "weight": 65536, | |
91 | "pos": 1 | |
92 | }, | |
93 | { | |
94 | "id": -5, | |
95 | "weight": 65536, | |
96 | "pos": 2 | |
97 | } | |
98 | ] | |
99 | }, | |
100 | { | |
101 | "id": -4, | |
102 | "name": "root", | |
103 | "type_id": 3, | |
104 | "type_name": "root", | |
105 | "weight": 262144, | |
28e407b8 | 106 | "alg": "straw2", |
7c673cae FG |
107 | "hash": "rjenkins1", |
108 | "items": [ | |
109 | { | |
110 | "id": -3, | |
111 | "weight": 262144, | |
112 | "pos": 0 | |
113 | } | |
114 | ] | |
115 | }, | |
116 | { | |
117 | "id": -5, | |
118 | "name": "host2", | |
119 | "type_id": 1, | |
120 | "type_name": "host", | |
121 | "weight": 65536, | |
28e407b8 | 122 | "alg": "straw2", |
7c673cae FG |
123 | "hash": "rjenkins1", |
124 | "items": [ | |
125 | { | |
126 | "id": 2, | |
127 | "weight": 65536, | |
128 | "pos": 0 | |
129 | } | |
130 | ] | |
131 | } | |
132 | ], | |
133 | "rules": [ | |
134 | { | |
c07f9fc5 | 135 | "rule_id": 3, |
7c673cae | 136 | "rule_name": "data", |
7c673cae | 137 | "type": 1, |
7c673cae FG |
138 | "steps": [ |
139 | { | |
140 | "op": "take", | |
141 | "item": -4, | |
142 | "item_name": "root" | |
143 | }, | |
144 | { | |
145 | "op": "chooseleaf_firstn", | |
146 | "num": 0, | |
147 | "type": "rack" | |
148 | }, | |
149 | { | |
150 | "op": "emit" | |
151 | } | |
152 | ] | |
153 | } | |
154 | ], | |
155 | "tunables": { | |
156 | "choose_local_tries": 2, | |
157 | "choose_local_fallback_tries": 5, | |
158 | "choose_total_tries": 19, | |
159 | "chooseleaf_descend_once": 0, | |
160 | "chooseleaf_vary_r": 0, | |
161 | "chooseleaf_stable": 0, | |
162 | "straw_calc_version": 0, | |
163 | "allowed_bucket_algs": 22, | |
164 | "profile": "argonaut", | |
165 | "optimal_tunables": 0, | |
166 | "legacy_tunables": 1, | |
28e407b8 | 167 | "minimum_required_version": "hammer", |
7c673cae FG |
168 | "require_feature_tunables": 0, |
169 | "require_feature_tunables2": 0, | |
170 | "has_v2_rules": 0, | |
171 | "require_feature_tunables3": 0, | |
172 | "has_v3_rules": 0, | |
28e407b8 | 173 | "has_v4_buckets": 1, |
7c673cae FG |
174 | "require_feature_tunables5": 0, |
175 | "has_v5_rules": 0 | |
176 | }, | |
177 | "choose_args": { | |
178 | "1": [], | |
179 | "2": [ | |
180 | { | |
181 | "bucket_id": -3, | |
182 | "ids": [ | |
183 | -20, | |
184 | 30, | |
185 | -25 | |
186 | ] | |
187 | } | |
188 | ], | |
189 | "3": [ | |
190 | { | |
191 | "bucket_id": -3, | |
192 | "weight_set": [ | |
193 | [ | |
11fdf7f2 TL |
194 | 1, |
195 | 2, | |
196 | 5 | |
7c673cae FG |
197 | ], |
198 | [ | |
11fdf7f2 TL |
199 | 3, |
200 | 2, | |
201 | 5 | |
7c673cae FG |
202 | ] |
203 | ], | |
204 | "ids": [ | |
205 | -20, | |
206 | -30, | |
207 | -25 | |
208 | ] | |
209 | } | |
210 | ], | |
211 | "4": [ | |
212 | { | |
213 | "bucket_id": -2, | |
214 | "weight_set": [ | |
215 | [ | |
11fdf7f2 | 216 | 1 |
7c673cae FG |
217 | ], |
218 | [ | |
11fdf7f2 | 219 | 3 |
7c673cae FG |
220 | ] |
221 | ] | |
222 | } | |
223 | ], | |
224 | "5": [ | |
225 | { | |
226 | "bucket_id": -1, | |
227 | "ids": [ | |
228 | -450 | |
229 | ] | |
230 | } | |
231 | ], | |
232 | "6": [ | |
233 | { | |
234 | "bucket_id": -1, | |
235 | "ids": [ | |
236 | -450 | |
237 | ] | |
238 | }, | |
239 | { | |
240 | "bucket_id": -2, | |
241 | "weight_set": [ | |
242 | [ | |
11fdf7f2 | 243 | 1 |
7c673cae FG |
244 | ], |
245 | [ | |
11fdf7f2 | 246 | 3 |
7c673cae FG |
247 | ] |
248 | ] | |
249 | }, | |
250 | { | |
251 | "bucket_id": -3, | |
252 | "weight_set": [ | |
253 | [ | |
11fdf7f2 TL |
254 | 1, |
255 | 2, | |
256 | 5 | |
7c673cae FG |
257 | ], |
258 | [ | |
11fdf7f2 TL |
259 | 3, |
260 | 2, | |
261 | 5 | |
7c673cae FG |
262 | ] |
263 | ], | |
264 | "ids": [ | |
265 | -20, | |
266 | -30, | |
267 | -25 | |
268 | ] | |
269 | } | |
270 | ] | |
271 | } | |
272 | } | |
273 | ||
274 | ||
275 | $ crushtool -c choose-args.conf -o /dev/null --dump | jq .for_json_validation | |
276 | null |