]> git.proxmox.com Git - ceph.git/blob - ceph/src/mon/MonCommands.h
update sources to v12.1.1
[ceph.git] / ceph / src / mon / MonCommands.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2013 Inktank Storage, Inc.
7 * Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com>
8 *
9 * Author: Loic Dachary <loic@dachary.org>
10 *
11 * This is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License version 2.1, as published by the Free Software
14 * Foundation. See file COPYING.
15 *
16 */
17
18 /* no guard; may be included multiple times */
19
20 /*
21 * Define commands that are reported by the monitor's
22 * "get_command_descriptions" command, and parsed by the Python
23 * frontend 'ceph' (and perhaps by other frontends, such as a RESTful
24 * server). The format is:
25 *
26 * COMMAND(signature, helpstring, modulename, req perms, availability)
27 * where:
28 * signature: describes the command and its parameters (more below)
29 * helpstring: displays in CLI help, API help (nice if it refers to
30 * parameter names from signature, 40-a few hundred chars)
31 * modulename: the monitor module or daemon this applies to:
32 * mds, osd, pg (osd), mon, auth, log, config-key, mgr
33 * req perms: required permission in that modulename space to execute command
34 * this also controls what type of REST command is accepted
35 * availability: cli, rest, or both
36 *
37 * The commands describe themselves completely enough for the separate
38 * frontend(s) to be able to accept user input and validate it against
39 * the command descriptions, and generate a JSON object that contains
40 * key:value mappings of parameter names to validated parameter values.
41 *
42 * 'signature' is a space-separated list of individual command descriptors;
43 * each descriptor is either a literal string, which can contain no spaces or
44 * '=' signs (for instance, in "pg stat", both "pg" and "stat" are literal
45 * strings representing one descriptor each), or a list of key=val[,key=val...]
46 * which also includes no spaces.
47 *
48 * The key=val form describes a non-literal parameter. Each will have at
49 * least a name= and type=, and each type can have its own type-specific
50 * parameters. The parser is the arbiter of these types and their
51 * interpretation. A few more non-type-specific key=val pairs exist:
52 *
53 * req=false marks an optional parameter (default for req is 'true')
54 * n=<n> is a repeat count for how many of this argument must be supplied.
55 * n=1 is the default.
56 * n=N is a special case that means "1 or more".
57 *
58 * A perhaps-incomplete list of types:
59 *
60 * CephInt: Optional: range=min[|max]
61 * CephFloat: Optional range
62 * CephString: optional badchars
63 * CephSocketpath: validation involves "is it S_ISSOCK"
64 * CephIPAddr: v4 or v6 addr with optional port, syntax validated
65 * CephEntityAddr: CephIPAddr + optional '/nonce'
66 * CephPoolname: Plainold string
67 * CephObjectname: Another plainold string
68 * CephPgid: n.xxx where n is an int > 0, xxx is a hex number > 0
69 * CephName: daemon name, '*' or '<type>.<id>' (id must be int for type osd)
70 * CephOsdName: osd name, '*' or '<id> or 'osd.<id>' (id must be int)
71 * CephChoices: strings="foo|bar" means this param can be either
72 * CephFilepath: openable file
73 * CephFragment: cephfs 'fragID': val/bits, val in hex 0xnnn, bits in dec
74 * CephUUID: uuid in text matching Python uuid.UUID()
75 * CephPrefix: special type assigned to literals
76 *
77 * Example:
78 *
79 * COMMAND("auth add " \
80 * "name=entity,type=CephString " \
81 * "name=caps,type=CephString,n=N,req=false", \
82 * "add auth info for <name> from input file, or random key " \
83 * "if no input given, and/or any caps specified in the command")
84 *
85 * defines a command "auth add" that takes a required argument "entity"
86 * of type "CephString", and from 1 to N arguments named "caps" of type
87 * CephString, at least one of which is required. The front end will
88 * validate user input against this description. Let's say the user
89 * enters auth add client.admin 'mon rwx' 'osd *'. The result will be a
90 * JSON object like {"prefix":"auth add", "entity":"client.admin",
91 * "caps":["mon rwx", "osd *"]}.
92 * Note that
93 * - string literals are accumulated into 'prefix'
94 * - n=1 descriptors are given normal string or int object values
95 * - n=N descriptors are given array values
96 *
97 * NOTE: be careful with spaces. Each descriptor must be separated by
98 * one space, no other characters, so if you split lines as above, be
99 * sure to close and reopen the quotes, and be careful to include the '
100 * separating spaces in the quoted string.
101 *
102 * The monitor marshals this JSON into a std::map<string, cmd_vartype>
103 * where cmd_vartype is a boost::variant type-enforcing discriminated
104 * type, so the monitor is expected to know the type of each argument.
105 * See cmdparse.cc/h for more details.
106 *
107 * The flag parameter for COMMAND_WITH_FLAGS macro must be passed using
108 * FLAG(f), where 'f' may be one of the following:
109 *
110 * NONE - no flag assigned
111 * NOFORWARD - command may not be forwarded
112 * OBSOLETE - command is considered obsolete
113 * DEPRECATED - command is considered deprecated
114 * MGR - command goes to ceph-mgr (for luminous+)
115 *
116 * A command should always be first considered DEPRECATED before being
117 * considered OBSOLETE, giving due consideration to users and conforming
118 * to any guidelines regarding deprecating commands.
119 */
120
121 /*
122 * pg commands PGMonitor.cc
123 */
124
125 // note: this should be replaced shortly!
126 COMMAND("pg force_create_pg name=pgid,type=CephPgid", \
127 "force creation of pg <pgid>", "pg", "rw", "cli,rest")
128 COMMAND_WITH_FLAG("pg set_full_ratio name=ratio,type=CephFloat,range=0.0|1.0", \
129 "set ratio at which pgs are considered full", \
130 "pg", "rw", "cli,rest", FLAG(DEPRECATED))
131 COMMAND_WITH_FLAG("pg set_nearfull_ratio " \
132 "name=ratio,type=CephFloat,range=0.0|1.0", \
133 "set ratio at which pgs are considered nearly full", \
134 "pg", "rw", "cli,rest", FLAG(DEPRECATED))
135
136 COMMAND("pg map name=pgid,type=CephPgid", "show mapping of pg to osds", \
137 "pg", "r", "cli,rest")
138 COMMAND("osd last-stat-seq name=id,type=CephOsdName", \
139 "get the last pg stats sequence number reported for this osd", \
140 "osd", "r", "cli,rest")
141
142 /*
143 * auth commands AuthMonitor.cc
144 */
145
146 COMMAND("auth export name=entity,type=CephString,req=false", \
147 "write keyring for requested entity, or master keyring if none given", \
148 "auth", "rx", "cli,rest")
149 COMMAND("auth get name=entity,type=CephString", \
150 "write keyring file with requested key", "auth", "rx", "cli,rest")
151 COMMAND("auth get-key name=entity,type=CephString", "display requested key", \
152 "auth", "rx", "cli,rest")
153 COMMAND("auth print-key name=entity,type=CephString", "display requested key", \
154 "auth", "rx", "cli,rest")
155 COMMAND("auth print_key name=entity,type=CephString", "display requested key", \
156 "auth", "rx", "cli,rest")
157 COMMAND("auth list", "list authentication state", "auth", "rx", "cli,rest")
158 COMMAND("auth import", "auth import: read keyring file from -i <file>", \
159 "auth", "rwx", "cli,rest")
160 COMMAND("auth add " \
161 "name=entity,type=CephString " \
162 "name=caps,type=CephString,n=N,req=false", \
163 "add auth info for <entity> from input file, or random key if no " \
164 "input is given, and/or any caps specified in the command",
165 "auth", "rwx", "cli,rest")
166 COMMAND("auth get-or-create-key " \
167 "name=entity,type=CephString " \
168 "name=caps,type=CephString,n=N,req=false", \
169 "get, or add, key for <name> from system/caps pairs specified in the command. If key already exists, any given caps must match the existing caps for that key.", \
170 "auth", "rwx", "cli,rest")
171 COMMAND("auth get-or-create " \
172 "name=entity,type=CephString " \
173 "name=caps,type=CephString,n=N,req=false", \
174 "add auth info for <entity> from input file, or random key if no input given, and/or any caps specified in the command", \
175 "auth", "rwx", "cli,rest")
176 COMMAND("auth caps " \
177 "name=entity,type=CephString " \
178 "name=caps,type=CephString,n=N", \
179 "update caps for <name> from caps specified in the command", \
180 "auth", "rwx", "cli,rest")
181 COMMAND("auth del " \
182 "name=entity,type=CephString", \
183 "delete all caps for <name>", \
184 "auth", "rwx", "cli,rest")
185 COMMAND("auth rm " \
186 "name=entity,type=CephString", \
187 "remove all caps for <name>", \
188 "auth", "rwx", "cli,rest")
189
190 /*
191 * Monitor commands (Monitor.cc)
192 */
193 COMMAND_WITH_FLAG("compact", "cause compaction of monitor's leveldb storage", \
194 "mon", "rw", "cli,rest", \
195 FLAG(NOFORWARD)|FLAG(DEPRECATED))
196 COMMAND_WITH_FLAG("scrub", "scrub the monitor stores", \
197 "mon", "rw", "cli,rest", \
198 FLAG(DEPRECATED))
199 COMMAND("fsid", "show cluster FSID/UUID", "mon", "r", "cli,rest")
200 COMMAND("log name=logtext,type=CephString,n=N", \
201 "log supplied text to the monitor log", "mon", "rw", "cli,rest")
202 COMMAND("log last "
203 "name=num,type=CephInt,range=1,req=false "
204 "name=level,type=CephChoices,strings=debug|info|sec|warn|error,req=false "
205 "name=channel,type=CephChoices,strings=*|cluster|audit,req=false", \
206 "print last few lines of the cluster log", \
207 "mon", "rw", "cli,rest")
208 COMMAND_WITH_FLAG("injectargs " \
209 "name=injected_args,type=CephString,n=N", \
210 "inject config arguments into monitor", "mon", "rw", "cli,rest",
211 FLAG(NOFORWARD))
212 COMMAND("status", "show cluster status", "mon", "r", "cli,rest")
213 COMMAND("health name=detail,type=CephChoices,strings=detail,req=false", \
214 "show cluster health", "mon", "r", "cli,rest")
215 COMMAND("time-sync-status", "show time sync status", "mon", "r", "cli,rest")
216 COMMAND("df name=detail,type=CephChoices,strings=detail,req=false", \
217 "show cluster free space stats", "mon", "r", "cli,rest")
218 COMMAND("report name=tags,type=CephString,n=N,req=false", \
219 "report full status of cluster, optional title tag strings", \
220 "mon", "r", "cli,rest")
221 COMMAND("features", "report of connected features", \
222 "mon", "r", "cli,rest")
223 COMMAND("quorum_status", "report status of monitor quorum", \
224 "mon", "r", "cli,rest")
225
226 COMMAND_WITH_FLAG("mon_status", "report status of monitors", "mon", "r", "cli,rest",
227 FLAG(NOFORWARD))
228 COMMAND_WITH_FLAG("sync force " \
229 "name=validate1,type=CephChoices,strings=--yes-i-really-mean-it,req=false " \
230 "name=validate2,type=CephChoices,strings=--i-know-what-i-am-doing,req=false", \
231 "force sync of and clear monitor store", \
232 "mon", "rw", "cli,rest", \
233 FLAG(NOFORWARD)|FLAG(DEPRECATED))
234 COMMAND_WITH_FLAG("heap " \
235 "name=heapcmd,type=CephChoices,strings=dump|start_profiler|stop_profiler|release|stats", \
236 "show heap usage info (available only if compiled with tcmalloc)", \
237 "mon", "rw", "cli,rest", FLAG(NOFORWARD))
238 COMMAND("quorum name=quorumcmd,type=CephChoices,strings=enter|exit,n=1", \
239 "enter or exit quorum", "mon", "rw", "cli,rest")
240 COMMAND("tell " \
241 "name=target,type=CephName " \
242 "name=args,type=CephString,n=N", \
243 "send a command to a specific daemon", "mon", "rw", "cli,rest")
244 COMMAND_WITH_FLAG("version", "show mon daemon version", "mon", "r", "cli,rest",
245 FLAG(NOFORWARD))
246
247 COMMAND("node ls " \
248 "name=type,type=CephChoices,strings=all|osd|mon|mds,req=false",
249 "list all nodes in cluster [type]", "mon", "r", "cli,rest")
250 /*
251 * Monitor-specific commands under module 'mon'
252 */
253 COMMAND_WITH_FLAG("mon compact", \
254 "cause compaction of monitor's leveldb storage", \
255 "mon", "rw", "cli,rest", \
256 FLAG(NOFORWARD))
257 COMMAND_WITH_FLAG("mon scrub",
258 "scrub the monitor stores", \
259 "mon", "rw", "cli,rest", \
260 FLAG(NONE))
261 COMMAND_WITH_FLAG("mon sync force " \
262 "name=validate1,type=CephChoices,strings=--yes-i-really-mean-it,req=false " \
263 "name=validate2,type=CephChoices,strings=--i-know-what-i-am-doing,req=false", \
264 "force sync of and clear monitor store", \
265 "mon", "rw", "cli,rest", \
266 FLAG(NOFORWARD))
267 COMMAND("mon metadata name=id,type=CephString,req=false",
268 "fetch metadata for mon <id>",
269 "mon", "r", "cli,rest")
270 COMMAND("mon count-metadata name=property,type=CephString",
271 "count mons by metadata field property",
272 "mon", "r", "cli,rest")
273 COMMAND("mon versions",
274 "check running versions of monitors",
275 "mon", "r", "cli,rest")
276
277
278 /*
279 * MDS commands (MDSMonitor.cc)
280 */
281
282 COMMAND("mds stat", "show MDS status", "mds", "r", "cli,rest")
283 COMMAND_WITH_FLAG("mds dump "
284 "name=epoch,type=CephInt,req=false,range=0", \
285 "dump legacy MDS cluster info, optionally from epoch",
286 "mds", "r", "cli,rest", FLAG(DEPRECATED))
287 COMMAND("fs dump "
288 "name=epoch,type=CephInt,req=false,range=0", \
289 "dump all CephFS status, optionally from epoch", "mds", "r", "cli,rest")
290 COMMAND_WITH_FLAG("mds getmap " \
291 "name=epoch,type=CephInt,req=false,range=0", \
292 "get MDS map, optionally from epoch", "mds", "r", "cli,rest", FLAG(DEPRECATED))
293 COMMAND("mds metadata name=who,type=CephString,req=false",
294 "fetch metadata for mds <who>",
295 "mds", "r", "cli,rest")
296 COMMAND("mds count-metadata name=property,type=CephString",
297 "count MDSs by metadata field property",
298 "mds", "r", "cli,rest")
299 COMMAND("mds versions",
300 "check running versions of MDSs",
301 "mds", "r", "cli,rest")
302 COMMAND_WITH_FLAG("mds tell " \
303 "name=who,type=CephString " \
304 "name=args,type=CephString,n=N", \
305 "send command to particular mds", "mds", "rw", "cli,rest", FLAG(OBSOLETE))
306 COMMAND("mds compat show", "show mds compatibility settings", \
307 "mds", "r", "cli,rest")
308 COMMAND_WITH_FLAG("mds stop name=who,type=CephString", "stop mds", \
309 "mds", "rw", "cli,rest", FLAG(DEPRECATED))
310 COMMAND("mds deactivate name=who,type=CephString",
311 "clean up specified MDS rank (use with `set max_mds` to shrink cluster)", \
312 "mds", "rw", "cli,rest")
313 COMMAND_WITH_FLAG("mds set_max_mds " \
314 "name=maxmds,type=CephInt,range=0", \
315 "set max MDS index", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
316 COMMAND_WITH_FLAG("mds set " \
317 "name=var,type=CephChoices,strings=max_mds|max_file_size"
318 "|allow_new_snaps|inline_data|allow_multimds|allow_dirfrags " \
319 "name=val,type=CephString " \
320 "name=confirm,type=CephString,req=false", \
321 "set mds parameter <var> to <val>", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
322 // arbitrary limit 0-20 below; worth standing on head to make it
323 // relate to actual state definitions?
324 // #include "include/ceph_fs.h"
325 COMMAND("mds set_state " \
326 "name=gid,type=CephInt,range=0 " \
327 "name=state,type=CephInt,range=0|20", \
328 "set mds state of <gid> to <numeric-state>", "mds", "rw", "cli,rest")
329 COMMAND("mds fail name=who,type=CephString", \
330 "Mark MDS failed: trigger a failover if a standby is available",
331 "mds", "rw", "cli,rest")
332 COMMAND("mds repaired name=rank,type=CephString", \
333 "mark a damaged MDS rank as no longer damaged", "mds", "rw", "cli,rest")
334 COMMAND("mds rm " \
335 "name=gid,type=CephInt,range=0", \
336 "remove nonactive mds", "mds", "rw", "cli,rest")
337 COMMAND("mds rmfailed name=who,type=CephString name=confirm,type=CephString,req=false", \
338 "remove failed mds", "mds", "rw", "cli,rest")
339 COMMAND_WITH_FLAG("mds cluster_down", "take MDS cluster down", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
340 COMMAND_WITH_FLAG("mds cluster_up", "bring MDS cluster up", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
341 COMMAND("mds compat rm_compat " \
342 "name=feature,type=CephInt,range=0", \
343 "remove compatible feature", "mds", "rw", "cli,rest")
344 COMMAND("mds compat rm_incompat " \
345 "name=feature,type=CephInt,range=0", \
346 "remove incompatible feature", "mds", "rw", "cli,rest")
347 COMMAND_WITH_FLAG("mds add_data_pool " \
348 "name=pool,type=CephString", \
349 "add data pool <pool>", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
350 COMMAND_WITH_FLAG("mds remove_data_pool " \
351 "name=pool,type=CephString", \
352 "remove data pool <pool>", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
353 COMMAND_WITH_FLAG("mds rm_data_pool " \
354 "name=pool,type=CephString", \
355 "remove data pool <pool>", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
356 COMMAND_WITH_FLAG("mds newfs " \
357 "name=metadata,type=CephInt,range=0 " \
358 "name=data,type=CephInt,range=0 " \
359 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
360 "make new filesystem using pools <metadata> and <data>", \
361 "mds", "rw", "cli,rest", FLAG(OBSOLETE))
362 COMMAND("fs new " \
363 "name=fs_name,type=CephString " \
364 "name=metadata,type=CephString " \
365 "name=data,type=CephString " \
366 "name=force,type=CephChoices,strings=--force,req=false " \
367 "name=sure,type=CephChoices,strings=--allow-dangerous-metadata-overlay,req=false", \
368 "make new filesystem using named pools <metadata> and <data>", \
369 "fs", "rw", "cli,rest")
370 COMMAND("fs rm " \
371 "name=fs_name,type=CephString " \
372 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
373 "disable the named filesystem", \
374 "fs", "rw", "cli,rest")
375 COMMAND("fs reset " \
376 "name=fs_name,type=CephString " \
377 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
378 "disaster recovery only: reset to a single-MDS map", \
379 "fs", "rw", "cli,rest")
380 COMMAND("fs ls ", \
381 "list filesystems", \
382 "fs", "r", "cli,rest")
383 COMMAND("fs get name=fs_name,type=CephString", \
384 "get info about one filesystem", \
385 "fs", "r", "cli,rest")
386 COMMAND("fs set " \
387 "name=fs_name,type=CephString " \
388 "name=var,type=CephChoices,strings=max_mds|max_file_size"
389 "|allow_new_snaps|inline_data|cluster_down|allow_multimds|allow_dirfrags|balancer" \
390 "|standby_count_wanted " \
391 "name=val,type=CephString " \
392 "name=confirm,type=CephString,req=false", \
393 "set mds parameter <var> to <val>", "mds", "rw", "cli,rest")
394 COMMAND("fs flag set name=flag_name,type=CephChoices,strings=enable_multiple "
395 "name=val,type=CephString " \
396 "name=confirm,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
397 "Set a global CephFS flag", \
398 "fs", "rw", "cli,rest")
399 COMMAND("fs add_data_pool name=fs_name,type=CephString " \
400 "name=pool,type=CephString", \
401 "add data pool <pool>", "mds", "rw", "cli,rest")
402 COMMAND("fs rm_data_pool name=fs_name,type=CephString " \
403 "name=pool,type=CephString", \
404 "remove data pool <pool>", "mds", "rw", "cli,rest")
405 COMMAND_WITH_FLAG("fs set_default name=fs_name,type=CephString", \
406 "set the default to the named filesystem", \
407 "fs", "rw", "cli,rest", \
408 FLAG(DEPRECATED))
409 COMMAND("fs set-default name=fs_name,type=CephString", \
410 "set the default to the named filesystem", \
411 "fs", "rw", "cli,rest")
412
413 /*
414 * Monmap commands
415 */
416 COMMAND("mon dump " \
417 "name=epoch,type=CephInt,range=0,req=false", \
418 "dump formatted monmap (optionally from epoch)", \
419 "mon", "r", "cli,rest")
420 COMMAND("mon stat", "summarize monitor status", "mon", "r", "cli,rest")
421 COMMAND("mon getmap " \
422 "name=epoch,type=CephInt,range=0,req=false", \
423 "get monmap", "mon", "r", "cli,rest")
424 COMMAND("mon add " \
425 "name=name,type=CephString " \
426 "name=addr,type=CephIPAddr", \
427 "add new monitor named <name> at <addr>", "mon", "rw", "cli,rest")
428 COMMAND("mon remove " \
429 "name=name,type=CephString", \
430 "remove monitor named <name>", "mon", "rw", "cli,rest")
431 COMMAND("mon rm " \
432 "name=name,type=CephString", \
433 "remove monitor named <name>", "mon", "rw", "cli,rest")
434 COMMAND("mon feature ls " \
435 "name=with_value,type=CephChoices,strings=--with-value,req=false", \
436 "list available mon map features to be set/unset", \
437 "mon", "r", "cli,rest")
438 COMMAND("mon feature set " \
439 "name=feature_name,type=CephString " \
440 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
441 "set provided feature on mon map", \
442 "mon", "rw", "cli,rest")
443
444 /*
445 * OSD commands
446 */
447 COMMAND("osd stat", "print summary of OSD map", "osd", "r", "cli,rest")
448 COMMAND("osd dump " \
449 "name=epoch,type=CephInt,range=0,req=false",
450 "print summary of OSD map", "osd", "r", "cli,rest")
451 COMMAND("osd tree " \
452 "name=epoch,type=CephInt,range=0,req=false " \
453 "name=states,type=CephChoices,strings=up|down|in|out,n=N,req=false", \
454 "print OSD tree", "osd", "r", "cli,rest")
455 COMMAND("osd ls " \
456 "name=epoch,type=CephInt,range=0,req=false", \
457 "show all OSD ids", "osd", "r", "cli,rest")
458 COMMAND("osd getmap " \
459 "name=epoch,type=CephInt,range=0,req=false", \
460 "get OSD map", "osd", "r", "cli,rest")
461 COMMAND("osd getcrushmap " \
462 "name=epoch,type=CephInt,range=0,req=false", \
463 "get CRUSH map", "osd", "r", "cli,rest")
464 COMMAND("osd getmaxosd", "show largest OSD id", "osd", "r", "cli,rest")
465 COMMAND("osd ls-tree " \
466 "name=epoch,type=CephInt,range=0,req=false "
467 "name=name,type=CephString,req=true", \
468 "show OSD ids under bucket <name> in the CRUSH map", \
469 "osd", "r", "cli,rest")
470 COMMAND("osd find " \
471 "name=id,type=CephOsdName", \
472 "find osd <id> in the CRUSH map and show its location", \
473 "osd", "r", "cli,rest")
474 COMMAND("osd metadata " \
475 "name=id,type=CephOsdName,req=false", \
476 "fetch metadata for osd {id} (default all)", \
477 "osd", "r", "cli,rest")
478 COMMAND("osd count-metadata name=property,type=CephString",
479 "count OSDs by metadata field property",
480 "osd", "r", "cli,rest")
481 COMMAND("osd versions", \
482 "check running versions of OSDs",
483 "osd", "r", "cli,rest")
484 COMMAND("osd map " \
485 "name=pool,type=CephPoolname " \
486 "name=object,type=CephObjectname " \
487 "name=nspace,type=CephString,req=false", \
488 "find pg for <object> in <pool> with [namespace]", "osd", "r", "cli,rest")
489 COMMAND("osd lspools " \
490 "name=auid,type=CephInt,req=false", \
491 "list pools", "osd", "r", "cli,rest")
492 COMMAND("osd blacklist ls", "show blacklisted clients", "osd", "r", "cli,rest")
493 COMMAND("osd blacklist clear", "clear all blacklisted clients", "osd", "rw",
494 "cli,rest")
495 COMMAND("osd crush rule list", "list crush rules", "osd", "r", "cli,rest")
496 COMMAND("osd crush rule ls", "list crush rules", "osd", "r", "cli,rest")
497 COMMAND("osd crush rule dump " \
498 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.],req=false", \
499 "dump crush rule <name> (default all)", \
500 "osd", "r", "cli,rest")
501 COMMAND("osd crush dump", \
502 "dump crush map", \
503 "osd", "r", "cli,rest")
504 COMMAND("osd setcrushmap name=prior_version,type=CephInt,req=false", \
505 "set crush map from input file", \
506 "osd", "rw", "cli,rest")
507 COMMAND("osd crush set name=prior_version,type=CephInt,req=false", \
508 "set crush map from input file", \
509 "osd", "rw", "cli,rest")
510 COMMAND("osd crush add-bucket " \
511 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
512 "name=type,type=CephString", \
513 "add no-parent (probably root) crush bucket <name> of type <type>", \
514 "osd", "rw", "cli,rest")
515 COMMAND("osd crush rename-bucket " \
516 "name=srcname,type=CephString,goodchars=[A-Za-z0-9-_.] " \
517 "name=dstname,type=CephString,goodchars=[A-Za-z0-9-_.]", \
518 "rename bucket <srcname> to <dstname>", \
519 "osd", "rw", "cli,rest")
520 COMMAND("osd crush set " \
521 "name=id,type=CephOsdName " \
522 "name=weight,type=CephFloat,range=0.0 " \
523 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
524 "update crushmap position and weight for <name> to <weight> with location <args>", \
525 "osd", "rw", "cli,rest")
526 COMMAND("osd crush add " \
527 "name=id,type=CephOsdName " \
528 "name=weight,type=CephFloat,range=0.0 " \
529 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
530 "add or update crushmap position and weight for <name> with <weight> and location <args>", \
531 "osd", "rw", "cli,rest")
532 COMMAND("osd crush set-device-class " \
533 "name=class,type=CephString " \
534 "name=ids,type=CephString,n=N", \
535 "set the <class> of the osd(s) <id> [<id>...]," \
536 "or use <all|any|*> to set all.", \
537 "osd", "rw", "cli,rest")
538 COMMAND("osd crush create-or-move " \
539 "name=id,type=CephOsdName " \
540 "name=weight,type=CephFloat,range=0.0 " \
541 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
542 "create entry or move existing entry for <name> <weight> at/to location <args>", \
543 "osd", "rw", "cli,rest")
544 COMMAND("osd crush move " \
545 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
546 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
547 "move existing entry for <name> to location <args>", \
548 "osd", "rw", "cli,rest")
549 COMMAND("osd crush swap-bucket " \
550 "name=source,type=CephString,goodchars=[A-Za-z0-9-_.] " \
551 "name=dest,type=CephString,goodchars=[A-Za-z0-9-_.] " \
552 "name=force,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
553 "swap existing bucket contents from (orphan) bucket <source> and <target>", \
554 "osd", "rw", "cli,rest")
555 COMMAND("osd crush link " \
556 "name=name,type=CephString " \
557 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
558 "link existing entry for <name> under location <args>", \
559 "osd", "rw", "cli,rest")
560 COMMAND("osd crush rm " \
561 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
562 "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \
563 "remove <name> from crush map (everywhere, or just at <ancestor>)",\
564 "osd", "rw", "cli,rest")
565 COMMAND("osd crush remove " \
566 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
567 "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \
568 "remove <name> from crush map (everywhere, or just at <ancestor>)", \
569 "osd", "rw", "cli,rest")
570 COMMAND("osd crush unlink " \
571 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
572 "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \
573 "unlink <name> from crush map (everywhere, or just at <ancestor>)", \
574 "osd", "rw", "cli,rest")
575 COMMAND("osd crush reweight-all",
576 "recalculate the weights for the tree to ensure they sum correctly",
577 "osd", "rw", "cli,rest")
578 COMMAND("osd crush reweight " \
579 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
580 "name=weight,type=CephFloat,range=0.0", \
581 "change <name>'s weight to <weight> in crush map", \
582 "osd", "rw", "cli,rest")
583 COMMAND("osd crush reweight-subtree " \
584 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
585 "name=weight,type=CephFloat,range=0.0", \
586 "change all leaf items beneath <name> to <weight> in crush map", \
587 "osd", "rw", "cli,rest")
588 COMMAND("osd crush tunables " \
589 "name=profile,type=CephChoices,strings=legacy|argonaut|bobtail|firefly|hammer|jewel|optimal|default", \
590 "set crush tunables values to <profile>", "osd", "rw", "cli,rest")
591 COMMAND("osd crush set-tunable " \
592 "name=tunable,type=CephChoices,strings=straw_calc_version " \
593 "name=value,type=CephInt",
594 "set crush tunable <tunable> to <value>",
595 "osd", "rw", "cli,rest")
596 COMMAND("osd crush get-tunable " \
597 "name=tunable,type=CephChoices,strings=straw_calc_version",
598 "get crush tunable <tunable>",
599 "osd", "rw", "cli,rest")
600 COMMAND("osd crush show-tunables", \
601 "show current crush tunables", "osd", "r", "cli,rest")
602 COMMAND("osd crush rule create-simple " \
603 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
604 "name=root,type=CephString,goodchars=[A-Za-z0-9-_.] " \
605 "name=type,type=CephString,goodchars=[A-Za-z0-9-_.] " \
606 "name=mode,type=CephChoices,strings=firstn|indep,req=false",
607 "create crush rule <name> to start from <root>, replicate across buckets of type <type>, using a choose mode of <firstn|indep> (default firstn; indep best for erasure pools)", \
608 "osd", "rw", "cli,rest")
609 COMMAND("osd crush rule create-replicated " \
610 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
611 "name=root,type=CephString,goodchars=[A-Za-z0-9-_.] " \
612 "name=type,type=CephString,goodchars=[A-Za-z0-9-_.] " \
613 "name=class,type=CephString,goodchars=[A-Za-z0-9-_.],req=false",
614 "create crush rule <name> for replicated pool to start from <root>, replicate across buckets of type <type>, using a choose mode of <firstn|indep> (default firstn; indep best for erasure pools)", \
615 "osd", "rw", "cli,rest")
616 COMMAND("osd crush rule create-erasure " \
617 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
618 "name=profile,type=CephString,req=false,goodchars=[A-Za-z0-9-_.=]", \
619 "create crush rule <name> for erasure coded pool created with <profile> (default default)", \
620 "osd", "rw", "cli,rest")
621 COMMAND("osd crush rule rm " \
622 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] ", \
623 "remove crush rule <name>", "osd", "rw", "cli,rest")
624 COMMAND("osd crush tree",
625 "dump crush buckets and items in a tree view",
626 "osd", "r", "cli,rest")
627 COMMAND("osd crush class create " \
628 "name=class,type=CephString,goodchars=[A-Za-z0-9-_]", \
629 "create crush device class <class>", \
630 "osd", "rw", "cli,rest")
631 COMMAND("osd crush class rm " \
632 "name=class,type=CephString,goodchars=[A-Za-z0-9-_]", \
633 "remove crush device class <class>", \
634 "osd", "rw", "cli,rest")
635 COMMAND("osd crush class rename " \
636 "name=srcname,type=CephString,goodchars=[A-Za-z0-9-_] " \
637 "name=dstname,type=CephString,goodchars=[A-Za-z0-9-_]", \
638 "rename crush device class <srcname> to <dstname>", \
639 "osd", "rw", "cli,rest")
640 COMMAND("osd crush class ls", \
641 "list all crush device classes", \
642 "osd", "r", "cli,rest")
643 COMMAND("osd crush class ls-osd " \
644 "name=class,type=CephString,goodchars=[A-Za-z0-9-_]", \
645 "list all osds belonging to the specific <class>", \
646 "osd", "r", "cli,rest")
647 COMMAND("osd setmaxosd " \
648 "name=newmax,type=CephInt,range=0", \
649 "set new maximum osd value", "osd", "rw", "cli,rest")
650 COMMAND("osd set-full-ratio " \
651 "name=ratio,type=CephFloat,range=0.0|1.0", \
652 "set usage ratio at which OSDs are marked full",
653 "osd", "rw", "cli,rest")
654 COMMAND("osd set-backfillfull-ratio " \
655 "name=ratio,type=CephFloat,range=0.0|1.0", \
656 "set usage ratio at which OSDs are marked too full to backfill",
657 "osd", "rw", "cli,rest")
658 COMMAND("osd set-nearfull-ratio " \
659 "name=ratio,type=CephFloat,range=0.0|1.0", \
660 "set usage ratio at which OSDs are marked near-full",
661 "osd", "rw", "cli,rest")
662 COMMAND("osd set-require-min-compat-client " \
663 "name=version,type=CephString " \
664 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
665 "set the minimum client version we will maintain compatibility with",
666 "osd", "rw", "cli,rest")
667 COMMAND("osd pause", "pause osd", "osd", "rw", "cli,rest")
668 COMMAND("osd unpause", "unpause osd", "osd", "rw", "cli,rest")
669 COMMAND("osd erasure-code-profile set " \
670 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
671 "name=profile,type=CephString,n=N,req=false", \
672 "create erasure code profile <name> with [<key[=value]> ...] pairs. Add a --force at the end to override an existing profile (VERY DANGEROUS)", \
673 "osd", "rw", "cli,rest")
674 COMMAND("osd erasure-code-profile get " \
675 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.]", \
676 "get erasure code profile <name>", \
677 "osd", "r", "cli,rest")
678 COMMAND("osd erasure-code-profile rm " \
679 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.]", \
680 "remove erasure code profile <name>", \
681 "osd", "rw", "cli,rest")
682 COMMAND("osd erasure-code-profile ls", \
683 "list all erasure code profiles", \
684 "osd", "r", "cli,rest")
685 COMMAND("osd set " \
686 "name=key,type=CephChoices,strings=full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent|sortbitwise|require_jewel_osds|require_kraken_osds", \
687 "set <key>", "osd", "rw", "cli,rest")
688 COMMAND("osd unset " \
689 "name=key,type=CephChoices,strings=full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent", \
690 "unset <key>", "osd", "rw", "cli,rest")
691 COMMAND("osd require-osd-release "\
692 "name=release,type=CephChoices,strings=luminous",
693 "set the minimum allowed OSD release to participate in the cluster",
694 "osd", "rw", "cli,rest")
695 COMMAND("osd cluster_snap", "take cluster snapshot (disabled)", \
696 "osd", "r", "")
697 COMMAND("osd down " \
698 "type=CephString,name=ids,n=N", \
699 "set osd(s) <id> [<id>...] down, " \
700 "or use <any|all|*> to set all osds down", \
701 "osd", "rw", "cli,rest")
702 COMMAND("osd out " \
703 "name=ids,type=CephString,n=N", \
704 "set osd(s) <id> [<id>...] out, " \
705 "or use <any|all|*> to set all osds out", \
706 "osd", "rw", "cli,rest")
707 COMMAND("osd in " \
708 "name=ids,type=CephString,n=N", \
709 "set osd(s) <id> [<id>...] in, "
710 "can use <any|all|*> to automatically set all previously out osds in", \
711 "osd", "rw", "cli,rest")
712 COMMAND("osd rm " \
713 "name=ids,type=CephString,n=N", \
714 "remove osd(s) <id> [<id>...], "
715 "or use <any|all|*> to remove all osds", \
716 "osd", "rw", "cli,rest")
717 COMMAND("osd add-noup " \
718 "name=ids,type=CephString,n=N", \
719 "mark osd(s) <id> [<id>...] as noup, " \
720 "or use <all|any|*> to mark all osds as noup", \
721 "osd", "rw", "cli,rest")
722 COMMAND("osd add-nodown " \
723 "name=ids,type=CephString,n=N", \
724 "mark osd(s) <id> [<id>...] as nodown, " \
725 "or use <all|any|*> to mark all osds as nodown", \
726 "osd", "rw", "cli,rest")
727 COMMAND("osd add-noin " \
728 "name=ids,type=CephString,n=N", \
729 "mark osd(s) <id> [<id>...] as noin, " \
730 "or use <all|any|*> to mark all osds as noin", \
731 "osd", "rw", "cli,rest")
732 COMMAND("osd add-noout " \
733 "name=ids,type=CephString,n=N", \
734 "mark osd(s) <id> [<id>...] as noout, " \
735 "or use <all|any|*> to mark all osds as noout", \
736 "osd", "rw", "cli,rest")
737 COMMAND("osd rm-noup " \
738 "name=ids,type=CephString,n=N", \
739 "allow osd(s) <id> [<id>...] to be marked up " \
740 "(if they are currently marked as noup), " \
741 "can use <all|any|*> to automatically filter out all noup osds", \
742 "osd", "rw", "cli,rest")
743 COMMAND("osd rm-nodown " \
744 "name=ids,type=CephString,n=N", \
745 "allow osd(s) <id> [<id>...] to be marked down " \
746 "(if they are currently marked as nodown), " \
747 "can use <all|any|*> to automatically filter out all nodown osds", \
748 "osd", "rw", "cli,rest")
749 COMMAND("osd rm-noin " \
750 "name=ids,type=CephString,n=N", \
751 "allow osd(s) <id> [<id>...] to be marked in " \
752 "(if they are currently marked as noin), " \
753 "can use <all|any|*> to automatically filter out all noin osds", \
754 "osd", "rw", "cli,rest")
755 COMMAND("osd rm-noout " \
756 "name=ids,type=CephString,n=N", \
757 "allow osd(s) <id> [<id>...] to be marked out " \
758 "(if they are currently marked as noout), " \
759 "can use <all|any|*> to automatically filter out all noout osds", \
760 "osd", "rw", "cli,rest")
761 COMMAND("osd reweight " \
762 "name=id,type=CephOsdName " \
763 "type=CephFloat,name=weight,range=0.0|1.0", \
764 "reweight osd to 0.0 < <weight> < 1.0", "osd", "rw", "cli,rest")
765 COMMAND("osd reweightn " \
766 "name=weights,type=CephString",
767 "reweight osds with {<id>: <weight>,...})",
768 "osd", "rw", "cli,rest")
769 COMMAND("osd pg-temp " \
770 "name=pgid,type=CephPgid " \
771 "name=id,type=CephOsdName,n=N,req=false", \
772 "set pg_temp mapping pgid:[<id> [<id>...]] (developers only)", \
773 "osd", "rw", "cli,rest")
774 COMMAND("osd pg-upmap " \
775 "name=pgid,type=CephPgid " \
776 "name=id,type=CephOsdName,n=N", \
777 "set pg_upmap mapping <pgid>:[<id> [<id>...]] (developers only)", \
778 "osd", "rw", "cli,rest")
779 COMMAND("osd rm-pg-upmap " \
780 "name=pgid,type=CephPgid", \
781 "clear pg_upmap mapping for <pgid> (developers only)", \
782 "osd", "rw", "cli,rest")
783 COMMAND("osd pg-upmap-items " \
784 "name=pgid,type=CephPgid " \
785 "name=id,type=CephOsdName,n=N", \
786 "set pg_upmap_items mapping <pgid>:{<id> to <id>, [...]} (developers only)", \
787 "osd", "rw", "cli,rest")
788 COMMAND("osd rm-pg-upmap-items " \
789 "name=pgid,type=CephPgid", \
790 "clear pg_upmap_items mapping for <pgid> (developers only)", \
791 "osd", "rw", "cli,rest")
792 COMMAND("osd primary-temp " \
793 "name=pgid,type=CephPgid " \
794 "name=id,type=CephOsdName", \
795 "set primary_temp mapping pgid:<id>|-1 (developers only)", \
796 "osd", "rw", "cli,rest")
797 COMMAND("osd primary-affinity " \
798 "name=id,type=CephOsdName " \
799 "type=CephFloat,name=weight,range=0.0|1.0", \
800 "adjust osd primary-affinity from 0.0 <= <weight> <= 1.0", \
801 "osd", "rw", "cli,rest")
802 COMMAND("osd destroy " \
803 "name=id,type=CephOsdName " \
804 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
805 "mark osd as being destroyed. Keeps the ID intact (allowing reuse), " \
806 "but removes cephx keys, config-key data and lockbox keys, "\
807 "rendering data permanently unreadable.", \
808 "osd", "rw", "cli,rest")
809 COMMAND("osd purge " \
810 "name=id,type=CephOsdName " \
811 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
812 "purge all osd data from the monitors. Combines `osd destroy`, " \
813 "`osd rm`, and `osd crush rm`.", \
814 "osd", "rw", "cli,rest")
815 COMMAND("osd lost " \
816 "name=id,type=CephOsdName " \
817 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
818 "mark osd as permanently lost. THIS DESTROYS DATA IF NO MORE REPLICAS EXIST, BE CAREFUL", \
819 "osd", "rw", "cli,rest")
820 COMMAND_WITH_FLAG("osd create " \
821 "name=uuid,type=CephUUID,req=false " \
822 "name=id,type=CephOsdName,req=false", \
823 "create new osd (with optional UUID and ID)", "osd", "rw", "cli,rest",
824 FLAG(DEPRECATED))
825 COMMAND("osd new " \
826 "name=uuid,type=CephUUID,req=true " \
827 "name=id,type=CephOsdName,req=false", \
828 "Create a new OSD. If supplied, the `id` to be replaced needs to " \
829 "exist and have been previously destroyed. " \
830 "Reads secrets from JSON file via `-i <file>` (see man page).", \
831 "osd", "rw", "cli,rest")
832 COMMAND("osd blacklist " \
833 "name=blacklistop,type=CephChoices,strings=add|rm " \
834 "name=addr,type=CephEntityAddr " \
835 "name=expire,type=CephFloat,range=0.0,req=false", \
836 "add (optionally until <expire> seconds from now) or remove <addr> from blacklist", \
837 "osd", "rw", "cli,rest")
838 COMMAND("osd pool mksnap " \
839 "name=pool,type=CephPoolname " \
840 "name=snap,type=CephString", \
841 "make snapshot <snap> in <pool>", "osd", "rw", "cli,rest")
842 COMMAND("osd pool rmsnap " \
843 "name=pool,type=CephPoolname " \
844 "name=snap,type=CephString", \
845 "remove snapshot <snap> from <pool>", "osd", "rw", "cli,rest")
846 COMMAND("osd pool ls " \
847 "name=detail,type=CephChoices,strings=detail,req=false", \
848 "list pools", "osd", "r", "cli,rest")
849 COMMAND("osd pool create " \
850 "name=pool,type=CephPoolname " \
851 "name=pg_num,type=CephInt,range=0 " \
852 "name=pgp_num,type=CephInt,range=0,req=false " \
853 "name=pool_type,type=CephChoices,strings=replicated|erasure,req=false " \
854 "name=erasure_code_profile,type=CephString,req=false,goodchars=[A-Za-z0-9-_.] " \
855 "name=rule,type=CephString,req=false " \
856 "name=expected_num_objects,type=CephInt,req=false", \
857 "create pool", "osd", "rw", "cli,rest")
858 COMMAND("osd pool delete " \
859 "name=pool,type=CephPoolname " \
860 "name=pool2,type=CephPoolname,req=false " \
861 "name=sure,type=CephString,req=false", \
862 "delete pool", \
863 "osd", "rw", "cli,rest")
864 COMMAND("osd pool rm " \
865 "name=pool,type=CephPoolname " \
866 "name=pool2,type=CephPoolname,req=false " \
867 "name=sure,type=CephString,req=false", \
868 "remove pool", \
869 "osd", "rw", "cli,rest")
870 COMMAND("osd pool rename " \
871 "name=srcpool,type=CephPoolname " \
872 "name=destpool,type=CephPoolname", \
873 "rename <srcpool> to <destpool>", "osd", "rw", "cli,rest")
874 COMMAND("osd pool get " \
875 "name=pool,type=CephPoolname " \
876 "name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|auid|target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|erasure_code_profile|min_read_recency_for_promote|all|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block", \
877 "get pool parameter <var>", "osd", "r", "cli,rest")
878 COMMAND("osd pool set " \
879 "name=pool,type=CephPoolname " \
880 "name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|auid|min_read_recency_for_promote|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|allow_ec_overwrites " \
881 "name=val,type=CephString " \
882 "name=force,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
883 "set pool parameter <var> to <val>", "osd", "rw", "cli,rest")
884 // 'val' is a CephString because it can include a unit. Perhaps
885 // there should be a Python type for validation/conversion of strings
886 // with units.
887 COMMAND("osd pool set-quota " \
888 "name=pool,type=CephPoolname " \
889 "name=field,type=CephChoices,strings=max_objects|max_bytes " \
890 "name=val,type=CephString",
891 "set object or byte limit on pool", "osd", "rw", "cli,rest")
892 COMMAND("osd pool get-quota " \
893 "name=pool,type=CephPoolname ",
894 "obtain object or byte limits for pool",
895 "osd", "r", "cli,rest")
896 COMMAND("osd utilization",
897 "get basic pg distribution stats",
898 "osd", "r", "cli,rest")
899
900 // tiering
901 COMMAND("osd tier add " \
902 "name=pool,type=CephPoolname " \
903 "name=tierpool,type=CephPoolname " \
904 "name=force_nonempty,type=CephChoices,strings=--force-nonempty,req=false",
905 "add the tier <tierpool> (the second one) to base pool <pool> (the first one)", \
906 "osd", "rw", "cli,rest")
907 COMMAND("osd tier remove " \
908 "name=pool,type=CephPoolname " \
909 "name=tierpool,type=CephPoolname",
910 "remove the tier <tierpool> (the second one) from base pool <pool> (the first one)", \
911 "osd", "rw", "cli,rest")
912 COMMAND("osd tier rm " \
913 "name=pool,type=CephPoolname " \
914 "name=tierpool,type=CephPoolname",
915 "remove the tier <tierpool> (the second one) from base pool <pool> (the first one)", \
916 "osd", "rw", "cli,rest")
917 COMMAND("osd tier cache-mode " \
918 "name=pool,type=CephPoolname " \
919 "name=mode,type=CephChoices,strings=none|writeback|forward|readonly|readforward|proxy|readproxy " \
920 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
921 "specify the caching mode for cache tier <pool>", "osd", "rw", "cli,rest")
922 COMMAND("osd tier set-overlay " \
923 "name=pool,type=CephPoolname " \
924 "name=overlaypool,type=CephPoolname", \
925 "set the overlay pool for base pool <pool> to be <overlaypool>", "osd", "rw", "cli,rest")
926 COMMAND("osd tier remove-overlay " \
927 "name=pool,type=CephPoolname ", \
928 "remove the overlay pool for base pool <pool>", "osd", "rw", "cli,rest")
929 COMMAND("osd tier rm-overlay " \
930 "name=pool,type=CephPoolname ", \
931 "remove the overlay pool for base pool <pool>", "osd", "rw", "cli,rest")
932
933 COMMAND("osd tier add-cache " \
934 "name=pool,type=CephPoolname " \
935 "name=tierpool,type=CephPoolname " \
936 "name=size,type=CephInt,range=0", \
937 "add a cache <tierpool> (the second one) of size <size> to existing pool <pool> (the first one)", \
938 "osd", "rw", "cli,rest")
939
940 /*
941 * mon/ConfigKeyService.cc
942 */
943
944 COMMAND("config-key get " \
945 "name=key,type=CephString", \
946 "get <key>", "config-key", "r", "cli,rest")
947 COMMAND("config-key put " \
948 "name=key,type=CephString " \
949 "name=val,type=CephString,req=false", \
950 "put <key>, value <val>", "config-key", "rw", "cli,rest")
951 COMMAND("config-key del " \
952 "name=key,type=CephString", \
953 "delete <key>", "config-key", "rw", "cli,rest")
954 COMMAND("config-key rm " \
955 "name=key,type=CephString", \
956 "rm <key>", "config-key", "rw", "cli,rest")
957 COMMAND("config-key exists " \
958 "name=key,type=CephString", \
959 "check for <key>'s existence", "config-key", "r", "cli,rest")
960 COMMAND("config-key list ", "list keys", "config-key", "r", "cli,rest")
961 COMMAND("config-key dump", "dump keys and values", "config-key", "r", "cli,rest")
962
963
964 /*
965 * mon/MgrMonitor.cc
966 */
967 COMMAND("mgr dump " \
968 "name=epoch,type=CephInt,range=0,req=false", \
969 "dump the latest MgrMap", \
970 "mgr", "r", "cli,rest")
971 COMMAND("mgr fail name=who,type=CephString", \
972 "treat the named manager daemon as failed", "mgr", "rw", "cli,rest")
973 COMMAND("mgr module ls",
974 "list active mgr modules", "mgr", "r", "cli,rest")
975 COMMAND("mgr module enable " \
976 "name=module,type=CephString " \
977 "name=force,type=CephChoices,strings=--force,req=false",
978 "enable mgr module", "mgr", "rw", "cli,rest")
979 COMMAND("mgr module disable " \
980 "name=module,type=CephString",
981 "disable mgr module", "mgr", "rw", "cli,rest")