]> git.proxmox.com Git - ceph.git/blob - ceph/src/mon/MonCommands.h
00a1642e07f566faed176d74665446a57838d507
[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("pg set_full_ratio name=ratio,type=CephFloat,range=0.0|1.0", \
129 "set ratio at which pgs are considered full", "pg", "rw", "cli,rest")
130 COMMAND("pg set_nearfull_ratio name=ratio,type=CephFloat,range=0.0|1.0", \
131 "set ratio at which pgs are considered nearly full", \
132 "pg", "rw", "cli,rest")
133
134 COMMAND("pg map name=pgid,type=CephPgid", "show mapping of pg to osds", \
135 "pg", "r", "cli,rest")
136 COMMAND("osd last-stat-seq name=id,type=CephOsdName", \
137 "get the last pg stats sequence number reported for this osd", \
138 "osd", "r", "cli,rest")
139
140 /*
141 * auth commands AuthMonitor.cc
142 */
143
144 COMMAND("auth export name=entity,type=CephString,req=false", \
145 "write keyring for requested entity, or master keyring if none given", \
146 "auth", "rx", "cli,rest")
147 COMMAND("auth get name=entity,type=CephString", \
148 "write keyring file with requested key", "auth", "rx", "cli,rest")
149 COMMAND("auth get-key name=entity,type=CephString", "display requested key", \
150 "auth", "rx", "cli,rest")
151 COMMAND("auth print-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 list", "list authentication state", "auth", "rx", "cli,rest")
156 COMMAND("auth import", "auth import: read keyring file from -i <file>", \
157 "auth", "rwx", "cli,rest")
158 COMMAND("auth add " \
159 "name=entity,type=CephString " \
160 "name=caps,type=CephString,n=N,req=false", \
161 "add auth info for <entity> from input file, or random key if no " \
162 "input is given, and/or any caps specified in the command",
163 "auth", "rwx", "cli,rest")
164 COMMAND("auth get-or-create-key " \
165 "name=entity,type=CephString " \
166 "name=caps,type=CephString,n=N,req=false", \
167 "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.", \
168 "auth", "rwx", "cli,rest")
169 COMMAND("auth get-or-create " \
170 "name=entity,type=CephString " \
171 "name=caps,type=CephString,n=N,req=false", \
172 "add auth info for <entity> from input file, or random key if no input given, and/or any caps specified in the command", \
173 "auth", "rwx", "cli,rest")
174 COMMAND("auth caps " \
175 "name=entity,type=CephString " \
176 "name=caps,type=CephString,n=N", \
177 "update caps for <name> from caps specified in the command", \
178 "auth", "rwx", "cli,rest")
179 COMMAND("auth del " \
180 "name=entity,type=CephString", \
181 "delete all caps for <name>", \
182 "auth", "rwx", "cli,rest")
183 COMMAND("auth rm " \
184 "name=entity,type=CephString", \
185 "remove all caps for <name>", \
186 "auth", "rwx", "cli,rest")
187
188 /*
189 * Monitor commands (Monitor.cc)
190 */
191 COMMAND_WITH_FLAG("compact", "cause compaction of monitor's leveldb storage", \
192 "mon", "rw", "cli,rest", \
193 FLAG(NOFORWARD)|FLAG(DEPRECATED))
194 COMMAND_WITH_FLAG("scrub", "scrub the monitor stores", \
195 "mon", "rw", "cli,rest", \
196 FLAG(DEPRECATED))
197 COMMAND("fsid", "show cluster FSID/UUID", "mon", "r", "cli,rest")
198 COMMAND("log name=logtext,type=CephString,n=N", \
199 "log supplied text to the monitor log", "mon", "rw", "cli,rest")
200 COMMAND("log last name=num,type=CephInt,range=1,req=false", \
201 "print last few lines of the cluster log", \
202 "mon", "rw", "cli,rest")
203 COMMAND_WITH_FLAG("injectargs " \
204 "name=injected_args,type=CephString,n=N", \
205 "inject config arguments into monitor", "mon", "rw", "cli,rest",
206 FLAG(NOFORWARD))
207 COMMAND("status", "show cluster status", "mon", "r", "cli,rest")
208 COMMAND("health name=detail,type=CephChoices,strings=detail,req=false", \
209 "show cluster health", "mon", "r", "cli,rest")
210 COMMAND("df name=detail,type=CephChoices,strings=detail,req=false", \
211 "show cluster free space stats", "mon", "r", "cli,rest")
212 COMMAND("report name=tags,type=CephString,n=N,req=false", \
213 "report full status of cluster, optional title tag strings", \
214 "mon", "r", "cli,rest")
215 COMMAND("features", "report of connected features", \
216 "mon", "r", "cli,rest")
217 COMMAND("quorum_status", "report status of monitor quorum", \
218 "mon", "r", "cli,rest")
219
220 COMMAND_WITH_FLAG("mon_status", "report status of monitors", "mon", "r", "cli,rest",
221 FLAG(NOFORWARD))
222 COMMAND_WITH_FLAG("sync force " \
223 "name=validate1,type=CephChoices,strings=--yes-i-really-mean-it,req=false " \
224 "name=validate2,type=CephChoices,strings=--i-know-what-i-am-doing,req=false", \
225 "force sync of and clear monitor store", \
226 "mon", "rw", "cli,rest", \
227 FLAG(NOFORWARD)|FLAG(DEPRECATED))
228 COMMAND_WITH_FLAG("heap " \
229 "name=heapcmd,type=CephChoices,strings=dump|start_profiler|stop_profiler|release|stats", \
230 "show heap usage info (available only if compiled with tcmalloc)", \
231 "mon", "rw", "cli,rest", FLAG(NOFORWARD))
232 COMMAND("quorum name=quorumcmd,type=CephChoices,strings=enter|exit,n=1", \
233 "enter or exit quorum", "mon", "rw", "cli,rest")
234 COMMAND("tell " \
235 "name=target,type=CephName " \
236 "name=args,type=CephString,n=N", \
237 "send a command to a specific daemon", "mon", "rw", "cli,rest")
238 COMMAND_WITH_FLAG("version", "show mon daemon version", "mon", "r", "cli,rest",
239 FLAG(NOFORWARD))
240
241 COMMAND("node ls " \
242 "name=type,type=CephChoices,strings=all|osd|mon|mds,req=false",
243 "list all nodes in cluster [type]", "mon", "r", "cli,rest")
244 /*
245 * Monitor-specific commands under module 'mon'
246 */
247 COMMAND_WITH_FLAG("mon compact", \
248 "cause compaction of monitor's leveldb storage", \
249 "mon", "rw", "cli,rest", \
250 FLAG(NOFORWARD))
251 COMMAND_WITH_FLAG("mon scrub",
252 "scrub the monitor stores", \
253 "mon", "rw", "cli,rest", \
254 FLAG(NONE))
255 COMMAND_WITH_FLAG("mon sync force " \
256 "name=validate1,type=CephChoices,strings=--yes-i-really-mean-it,req=false " \
257 "name=validate2,type=CephChoices,strings=--i-know-what-i-am-doing,req=false", \
258 "force sync of and clear monitor store", \
259 "mon", "rw", "cli,rest", \
260 FLAG(NOFORWARD))
261 COMMAND("mon metadata name=id,type=CephString,req=false",
262 "fetch metadata for mon <id>",
263 "mon", "r", "cli,rest")
264 COMMAND("mon count-metadata name=property,type=CephString",
265 "count mons by metadata field property",
266 "mon", "r", "cli,rest")
267 COMMAND("mon versions",
268 "check running versions of monitors",
269 "mon", "r", "cli,rest")
270
271
272 /*
273 * MDS commands (MDSMonitor.cc)
274 */
275
276 COMMAND("mds stat", "show MDS status", "mds", "r", "cli,rest")
277 COMMAND_WITH_FLAG("mds dump "
278 "name=epoch,type=CephInt,req=false,range=0", \
279 "dump legacy MDS cluster info, optionally from epoch",
280 "mds", "r", "cli,rest", FLAG(DEPRECATED))
281 COMMAND("fs dump "
282 "name=epoch,type=CephInt,req=false,range=0", \
283 "dump all CephFS status, optionally from epoch", "mds", "r", "cli,rest")
284 COMMAND_WITH_FLAG("mds getmap " \
285 "name=epoch,type=CephInt,req=false,range=0", \
286 "get MDS map, optionally from epoch", "mds", "r", "cli,rest", FLAG(DEPRECATED))
287 COMMAND("mds metadata name=who,type=CephString,req=false",
288 "fetch metadata for mds <who>",
289 "mds", "r", "cli,rest")
290 COMMAND("mds count-metadata name=property,type=CephString",
291 "count MDSs by metadata field property",
292 "mds", "r", "cli,rest")
293 COMMAND("mds versions",
294 "check running versions of MDSs",
295 "mds", "r", "cli,rest")
296 COMMAND_WITH_FLAG("mds tell " \
297 "name=who,type=CephString " \
298 "name=args,type=CephString,n=N", \
299 "send command to particular mds", "mds", "rw", "cli,rest", FLAG(OBSOLETE))
300 COMMAND("mds compat show", "show mds compatibility settings", \
301 "mds", "r", "cli,rest")
302 COMMAND_WITH_FLAG("mds stop name=who,type=CephString", "stop mds", \
303 "mds", "rw", "cli,rest", FLAG(DEPRECATED))
304 COMMAND("mds deactivate name=who,type=CephString", "stop mds", \
305 "mds", "rw", "cli,rest")
306 COMMAND_WITH_FLAG("mds set_max_mds " \
307 "name=maxmds,type=CephInt,range=0", \
308 "set max MDS index", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
309 COMMAND_WITH_FLAG("mds set " \
310 "name=var,type=CephChoices,strings=max_mds|max_file_size"
311 "|allow_new_snaps|inline_data|allow_multimds|allow_dirfrags " \
312 "name=val,type=CephString " \
313 "name=confirm,type=CephString,req=false", \
314 "set mds parameter <var> to <val>", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
315 // arbitrary limit 0-20 below; worth standing on head to make it
316 // relate to actual state definitions?
317 // #include "include/ceph_fs.h"
318 COMMAND("mds set_state " \
319 "name=gid,type=CephInt,range=0 " \
320 "name=state,type=CephInt,range=0|20", \
321 "set mds state of <gid> to <numeric-state>", "mds", "rw", "cli,rest")
322 COMMAND("mds fail name=who,type=CephString", \
323 "force mds to status failed", "mds", "rw", "cli,rest")
324 COMMAND("mds repaired name=rank,type=CephString", \
325 "mark a damaged MDS rank as no longer damaged", "mds", "rw", "cli,rest")
326 COMMAND("mds rm " \
327 "name=gid,type=CephInt,range=0", \
328 "remove nonactive mds", "mds", "rw", "cli,rest")
329 COMMAND("mds rmfailed name=who,type=CephString name=confirm,type=CephString,req=false", \
330 "remove failed mds", "mds", "rw", "cli,rest")
331 COMMAND_WITH_FLAG("mds cluster_down", "take MDS cluster down", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
332 COMMAND_WITH_FLAG("mds cluster_up", "bring MDS cluster up", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
333 COMMAND("mds compat rm_compat " \
334 "name=feature,type=CephInt,range=0", \
335 "remove compatible feature", "mds", "rw", "cli,rest")
336 COMMAND("mds compat rm_incompat " \
337 "name=feature,type=CephInt,range=0", \
338 "remove incompatible feature", "mds", "rw", "cli,rest")
339 COMMAND_WITH_FLAG("mds add_data_pool " \
340 "name=pool,type=CephString", \
341 "add data pool <pool>", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
342 COMMAND_WITH_FLAG("mds remove_data_pool " \
343 "name=pool,type=CephString", \
344 "remove data pool <pool>", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
345 COMMAND_WITH_FLAG("mds rm_data_pool " \
346 "name=pool,type=CephString", \
347 "remove data pool <pool>", "mds", "rw", "cli,rest", FLAG(DEPRECATED))
348 COMMAND_WITH_FLAG("mds newfs " \
349 "name=metadata,type=CephInt,range=0 " \
350 "name=data,type=CephInt,range=0 " \
351 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
352 "make new filesystem using pools <metadata> and <data>", \
353 "mds", "rw", "cli,rest", FLAG(OBSOLETE))
354 COMMAND("fs new " \
355 "name=fs_name,type=CephString " \
356 "name=metadata,type=CephString " \
357 "name=data,type=CephString " \
358 "name=force,type=CephChoices,strings=--force,req=false " \
359 "name=sure,type=CephChoices,strings=--allow-dangerous-metadata-overlay,req=false", \
360 "make new filesystem using named pools <metadata> and <data>", \
361 "fs", "rw", "cli,rest")
362 COMMAND("fs rm " \
363 "name=fs_name,type=CephString " \
364 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
365 "disable the named filesystem", \
366 "fs", "rw", "cli,rest")
367 COMMAND("fs reset " \
368 "name=fs_name,type=CephString " \
369 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
370 "disaster recovery only: reset to a single-MDS map", \
371 "fs", "rw", "cli,rest")
372 COMMAND("fs ls ", \
373 "list filesystems", \
374 "fs", "r", "cli,rest")
375 COMMAND("fs get name=fs_name,type=CephString", \
376 "get info about one filesystem", \
377 "fs", "r", "cli,rest")
378 COMMAND("fs set " \
379 "name=fs_name,type=CephString " \
380 "name=var,type=CephChoices,strings=max_mds|max_file_size"
381 "|allow_new_snaps|inline_data|cluster_down|allow_multimds|allow_dirfrags|balancer" \
382 "|standby_count_wanted " \
383 "name=val,type=CephString " \
384 "name=confirm,type=CephString,req=false", \
385 "set mds parameter <var> to <val>", "mds", "rw", "cli,rest")
386 COMMAND("fs flag set name=flag_name,type=CephChoices,strings=enable_multiple "
387 "name=val,type=CephString " \
388 "name=confirm,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
389 "Set a global CephFS flag", \
390 "fs", "rw", "cli,rest")
391 COMMAND("fs add_data_pool name=fs_name,type=CephString " \
392 "name=pool,type=CephString", \
393 "add data pool <pool>", "mds", "rw", "cli,rest")
394 COMMAND("fs rm_data_pool name=fs_name,type=CephString " \
395 "name=pool,type=CephString", \
396 "remove data pool <pool>", "mds", "rw", "cli,rest")
397 COMMAND_WITH_FLAG("fs set_default name=fs_name,type=CephString", \
398 "set the default to the named filesystem", \
399 "fs", "rw", "cli,rest", \
400 FLAG(DEPRECATED))
401 COMMAND("fs set-default name=fs_name,type=CephString", \
402 "set the default to the named filesystem", \
403 "fs", "rw", "cli,rest")
404
405 /*
406 * Monmap commands
407 */
408 COMMAND("mon dump " \
409 "name=epoch,type=CephInt,range=0,req=false", \
410 "dump formatted monmap (optionally from epoch)", \
411 "mon", "r", "cli,rest")
412 COMMAND("mon stat", "summarize monitor status", "mon", "r", "cli,rest")
413 COMMAND("mon getmap " \
414 "name=epoch,type=CephInt,range=0,req=false", \
415 "get monmap", "mon", "r", "cli,rest")
416 COMMAND("mon add " \
417 "name=name,type=CephString " \
418 "name=addr,type=CephIPAddr", \
419 "add new monitor named <name> at <addr>", "mon", "rw", "cli,rest")
420 COMMAND("mon remove " \
421 "name=name,type=CephString", \
422 "remove monitor named <name>", "mon", "rw", "cli,rest")
423 COMMAND("mon rm " \
424 "name=name,type=CephString", \
425 "remove monitor named <name>", "mon", "rw", "cli,rest")
426 COMMAND("mon feature list " \
427 "name=with_value,type=CephChoices,strings=--with-value,req=false", \
428 "list available mon map features to be set/unset", \
429 "mon", "r", "cli,rest")
430 COMMAND("mon feature set " \
431 "name=feature_name,type=CephString " \
432 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
433 "set provided feature on mon map", \
434 "mon", "rw", "cli,rest")
435
436 /*
437 * OSD commands
438 */
439 COMMAND("osd stat", "print summary of OSD map", "osd", "r", "cli,rest")
440 COMMAND("osd dump " \
441 "name=epoch,type=CephInt,range=0,req=false",
442 "print summary of OSD map", "osd", "r", "cli,rest")
443 COMMAND("osd tree " \
444 "name=epoch,type=CephInt,range=0,req=false " \
445 "name=states,type=CephChoices,strings=up|down|in|out,n=N,req=false", \
446 "print OSD tree", "osd", "r", "cli,rest")
447 COMMAND("osd ls " \
448 "name=epoch,type=CephInt,range=0,req=false", \
449 "show all OSD ids", "osd", "r", "cli,rest")
450 COMMAND("osd getmap " \
451 "name=epoch,type=CephInt,range=0,req=false", \
452 "get OSD map", "osd", "r", "cli,rest")
453 COMMAND("osd getcrushmap " \
454 "name=epoch,type=CephInt,range=0,req=false", \
455 "get CRUSH map", "osd", "r", "cli,rest")
456 COMMAND("osd getmaxosd", "show largest OSD id", "osd", "r", "cli,rest")
457 COMMAND("osd ls-tree " \
458 "name=epoch,type=CephInt,range=0,req=false "
459 "name=name,type=CephString,req=true", \
460 "show OSD ids under bucket <name> in the CRUSH map", \
461 "osd", "r", "cli,rest")
462 COMMAND("osd find " \
463 "name=id,type=CephOsdName", \
464 "find osd <id> in the CRUSH map and show its location", \
465 "osd", "r", "cli,rest")
466 COMMAND("osd metadata " \
467 "name=id,type=CephOsdName,req=false", \
468 "fetch metadata for osd {id} (default all)", \
469 "osd", "r", "cli,rest")
470 COMMAND("osd count-metadata name=property,type=CephString",
471 "count OSDs by metadata field property",
472 "osd", "r", "cli,rest")
473 COMMAND("osd versions", \
474 "check running versions of OSDs",
475 "osd", "r", "cli,rest")
476 COMMAND("osd map " \
477 "name=pool,type=CephPoolname " \
478 "name=object,type=CephObjectname " \
479 "name=nspace,type=CephString,req=false", \
480 "find pg for <object> in <pool> with [namespace]", "osd", "r", "cli,rest")
481 COMMAND("osd lspools " \
482 "name=auid,type=CephInt,req=false", \
483 "list pools", "osd", "r", "cli,rest")
484 COMMAND("osd blacklist ls", "show blacklisted clients", "osd", "r", "cli,rest")
485 COMMAND("osd blacklist clear", "clear all blacklisted clients", "osd", "rw",
486 "cli,rest")
487 COMMAND("osd crush rule list", "list crush rules", "osd", "r", "cli,rest")
488 COMMAND("osd crush rule ls", "list crush rules", "osd", "r", "cli,rest")
489 COMMAND("osd crush rule dump " \
490 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.],req=false", \
491 "dump crush rule <name> (default all)", \
492 "osd", "r", "cli,rest")
493 COMMAND("osd crush dump", \
494 "dump crush map", \
495 "osd", "r", "cli,rest")
496 COMMAND("osd setcrushmap name=prior_version,type=CephInt,req=false", \
497 "set crush map from input file", \
498 "osd", "rw", "cli,rest")
499 COMMAND("osd crush set name=prior_version,type=CephInt,req=false", \
500 "set crush map from input file", \
501 "osd", "rw", "cli,rest")
502 COMMAND("osd crush add-bucket " \
503 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
504 "name=type,type=CephString", \
505 "add no-parent (probably root) crush bucket <name> of type <type>", \
506 "osd", "rw", "cli,rest")
507 COMMAND("osd crush rename-bucket " \
508 "name=srcname,type=CephString,goodchars=[A-Za-z0-9-_.] " \
509 "name=dstname,type=CephString,goodchars=[A-Za-z0-9-_.]", \
510 "rename bucket <srcname> to <dstname>", \
511 "osd", "rw", "cli,rest")
512 COMMAND("osd crush set " \
513 "name=id,type=CephOsdName " \
514 "name=weight,type=CephFloat,range=0.0 " \
515 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
516 "update crushmap position and weight for <name> to <weight> with location <args>", \
517 "osd", "rw", "cli,rest")
518 COMMAND("osd crush add " \
519 "name=id,type=CephOsdName " \
520 "name=weight,type=CephFloat,range=0.0 " \
521 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
522 "add or update crushmap position and weight for <name> with <weight> and location <args>", \
523 "osd", "rw", "cli,rest")
524 COMMAND("osd crush set-device-class " \
525 "name=id,type=CephOsdName " \
526 "name=class,type=CephString ", \
527 "set the <class> of the device <name>", \
528 "osd", "rw", "cli,rest")
529 COMMAND("osd crush create-or-move " \
530 "name=id,type=CephOsdName " \
531 "name=weight,type=CephFloat,range=0.0 " \
532 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
533 "create entry or move existing entry for <name> <weight> at/to location <args>", \
534 "osd", "rw", "cli,rest")
535 COMMAND("osd crush move " \
536 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
537 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
538 "move existing entry for <name> to location <args>", \
539 "osd", "rw", "cli,rest")
540 COMMAND("osd crush swap-bucket " \
541 "name=source,type=CephString,goodchars=[A-Za-z0-9-_.] " \
542 "name=dest,type=CephString,goodchars=[A-Za-z0-9-_.] " \
543 "name=force,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
544 "swap existing bucket contents from (orphan) bucket <source> and <target>", \
545 "osd", "rw", "cli,rest")
546 COMMAND("osd crush link " \
547 "name=name,type=CephString " \
548 "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \
549 "link existing entry for <name> under location <args>", \
550 "osd", "rw", "cli,rest")
551 COMMAND("osd crush rm " \
552 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
553 "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \
554 "remove <name> from crush map (everywhere, or just at <ancestor>)",\
555 "osd", "rw", "cli,rest")
556 COMMAND("osd crush remove " \
557 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
558 "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \
559 "remove <name> from crush map (everywhere, or just at <ancestor>)", \
560 "osd", "rw", "cli,rest")
561 COMMAND("osd crush unlink " \
562 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
563 "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \
564 "unlink <name> from crush map (everywhere, or just at <ancestor>)", \
565 "osd", "rw", "cli,rest")
566 COMMAND("osd crush reweight-all",
567 "recalculate the weights for the tree to ensure they sum correctly",
568 "osd", "rw", "cli,rest")
569 COMMAND("osd crush reweight " \
570 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
571 "name=weight,type=CephFloat,range=0.0", \
572 "change <name>'s weight to <weight> in crush map", \
573 "osd", "rw", "cli,rest")
574 COMMAND("osd crush reweight-subtree " \
575 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
576 "name=weight,type=CephFloat,range=0.0", \
577 "change all leaf items beneath <name> to <weight> in crush map", \
578 "osd", "rw", "cli,rest")
579 COMMAND("osd crush tunables " \
580 "name=profile,type=CephChoices,strings=legacy|argonaut|bobtail|firefly|hammer|jewel|optimal|default", \
581 "set crush tunables values to <profile>", "osd", "rw", "cli,rest")
582 COMMAND("osd crush set-tunable " \
583 "name=tunable,type=CephChoices,strings=straw_calc_version " \
584 "name=value,type=CephInt",
585 "set crush tunable <tunable> to <value>",
586 "osd", "rw", "cli,rest")
587 COMMAND("osd crush get-tunable " \
588 "name=tunable,type=CephChoices,strings=straw_calc_version",
589 "get crush tunable <tunable>",
590 "osd", "rw", "cli,rest")
591 COMMAND("osd crush show-tunables", \
592 "show current crush tunables", "osd", "r", "cli,rest")
593 COMMAND("osd crush rule create-simple " \
594 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
595 "name=root,type=CephString,goodchars=[A-Za-z0-9-_.] " \
596 "name=type,type=CephString,goodchars=[A-Za-z0-9-_.] " \
597 "name=mode,type=CephChoices,strings=firstn|indep,req=false",
598 "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)", \
599 "osd", "rw", "cli,rest")
600 COMMAND("osd crush rule create-erasure " \
601 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
602 "name=profile,type=CephString,req=false,goodchars=[A-Za-z0-9-_.=]", \
603 "create crush rule <name> for erasure coded pool created with <profile> (default default)", \
604 "osd", "rw", "cli,rest")
605 COMMAND("osd crush rule rm " \
606 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] ", \
607 "remove crush rule <name>", "osd", "rw", "cli,rest")
608 COMMAND("osd crush tree",
609 "dump crush buckets and items in a tree view",
610 "osd", "r", "cli,rest")
611 COMMAND("osd crush class create " \
612 "name=class,type=CephString,goodchars=[A-Za-z0-9-_]", \
613 "create crush device class <class>", \
614 "osd", "rw", "cli,rest")
615 COMMAND("osd crush class rm " \
616 "name=class,type=CephString,goodchars=[A-Za-z0-9-_]", \
617 "remove crush device class <class>", \
618 "osd", "rw", "cli,rest")
619 COMMAND("osd crush class ls", \
620 "list all crush device classes", \
621 "osd", "r", "cli,rest")
622 COMMAND("osd setmaxosd " \
623 "name=newmax,type=CephInt,range=0", \
624 "set new maximum osd value", "osd", "rw", "cli,rest")
625 COMMAND("osd set-full-ratio " \
626 "name=ratio,type=CephFloat,range=0.0|1.0", \
627 "set usage ratio at which OSDs are marked full",
628 "osd", "rw", "cli,rest")
629 COMMAND("osd set-backfillfull-ratio " \
630 "name=ratio,type=CephFloat,range=0.0|1.0", \
631 "set usage ratio at which OSDs are marked too full to backfill",
632 "osd", "rw", "cli,rest")
633 COMMAND("osd set-nearfull-ratio " \
634 "name=ratio,type=CephFloat,range=0.0|1.0", \
635 "set usage ratio at which OSDs are marked near-full",
636 "osd", "rw", "cli,rest")
637 COMMAND("osd set-require-min-compat-client " \
638 "name=version,type=CephString " \
639 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
640 "set the minimum client version we will maintain compatibility with",
641 "osd", "rw", "cli,rest")
642 COMMAND("osd pause", "pause osd", "osd", "rw", "cli,rest")
643 COMMAND("osd unpause", "unpause osd", "osd", "rw", "cli,rest")
644 COMMAND("osd erasure-code-profile set " \
645 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
646 "name=profile,type=CephString,n=N,req=false", \
647 "create erasure code profile <name> with [<key[=value]> ...] pairs. Add a --force at the end to override an existing profile (VERY DANGEROUS)", \
648 "osd", "rw", "cli,rest")
649 COMMAND("osd erasure-code-profile get " \
650 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.]", \
651 "get erasure code profile <name>", \
652 "osd", "r", "cli,rest")
653 COMMAND("osd erasure-code-profile rm " \
654 "name=name,type=CephString,goodchars=[A-Za-z0-9-_.]", \
655 "remove erasure code profile <name>", \
656 "osd", "rw", "cli,rest")
657 COMMAND("osd erasure-code-profile ls", \
658 "list all erasure code profiles", \
659 "osd", "r", "cli,rest")
660 COMMAND("osd set " \
661 "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", \
662 "set <key>", "osd", "rw", "cli,rest")
663 COMMAND("osd unset " \
664 "name=key,type=CephChoices,strings=full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent", \
665 "unset <key>", "osd", "rw", "cli,rest")
666 COMMAND("osd require-osd-release "\
667 "name=release,type=CephChoices,strings=luminous",
668 "set the minimum allowed OSD release to participate in the cluster",
669 "osd", "rw", "cli,rest")
670 COMMAND("osd cluster_snap", "take cluster snapshot (disabled)", \
671 "osd", "r", "")
672 COMMAND("osd down " \
673 "type=CephString,name=ids,n=N", \
674 "set osd(s) <id> [<id>...] down, " \
675 "or use <any|all|*> to set all osds down", \
676 "osd", "rw", "cli,rest")
677 COMMAND("osd out " \
678 "name=ids,type=CephString,n=N", \
679 "set osd(s) <id> [<id>...] out, " \
680 "or use <any|all|*> to set all osds out", \
681 "osd", "rw", "cli,rest")
682 COMMAND("osd in " \
683 "name=ids,type=CephString,n=N", \
684 "set osd(s) <id> [<id>...] in, "
685 "can use <any|all|*> to automatically set all previously out osds in", \
686 "osd", "rw", "cli,rest")
687 COMMAND("osd rm " \
688 "name=ids,type=CephString,n=N", \
689 "remove osd(s) <id> [<id>...], "
690 "or use <any|all|*> to remove all osds", \
691 "osd", "rw", "cli,rest")
692 COMMAND("osd add-noup " \
693 "name=ids,type=CephString,n=N", \
694 "mark osd(s) <id> [<id>...] as noup, " \
695 "or use <all|any|*> to mark all osds as noup", \
696 "osd", "rw", "cli,rest")
697 COMMAND("osd add-nodown " \
698 "name=ids,type=CephString,n=N", \
699 "mark osd(s) <id> [<id>...] as nodown, " \
700 "or use <all|any|*> to mark all osds as nodown", \
701 "osd", "rw", "cli,rest")
702 COMMAND("osd add-noin " \
703 "name=ids,type=CephString,n=N", \
704 "mark osd(s) <id> [<id>...] as noin, " \
705 "or use <all|any|*> to mark all osds as noin", \
706 "osd", "rw", "cli,rest")
707 COMMAND("osd add-noout " \
708 "name=ids,type=CephString,n=N", \
709 "mark osd(s) <id> [<id>...] as noout, " \
710 "or use <all|any|*> to mark all osds as noout", \
711 "osd", "rw", "cli,rest")
712 COMMAND("osd rm-noup " \
713 "name=ids,type=CephString,n=N", \
714 "allow osd(s) <id> [<id>...] to be marked up " \
715 "(if they are currently marked as noup), " \
716 "can use <all|any|*> to automatically filter out all noup osds", \
717 "osd", "rw", "cli,rest")
718 COMMAND("osd rm-nodown " \
719 "name=ids,type=CephString,n=N", \
720 "allow osd(s) <id> [<id>...] to be marked down " \
721 "(if they are currently marked as nodown), " \
722 "can use <all|any|*> to automatically filter out all nodown osds", \
723 "osd", "rw", "cli,rest")
724 COMMAND("osd rm-noin " \
725 "name=ids,type=CephString,n=N", \
726 "allow osd(s) <id> [<id>...] to be marked in " \
727 "(if they are currently marked as noin), " \
728 "can use <all|any|*> to automatically filter out all noin osds", \
729 "osd", "rw", "cli,rest")
730 COMMAND("osd rm-noout " \
731 "name=ids,type=CephString,n=N", \
732 "allow osd(s) <id> [<id>...] to be marked out " \
733 "(if they are currently marked as noout), " \
734 "can use <all|any|*> to automatically filter out all noout osds", \
735 "osd", "rw", "cli,rest")
736 COMMAND("osd reweight " \
737 "name=id,type=CephOsdName " \
738 "type=CephFloat,name=weight,range=0.0|1.0", \
739 "reweight osd to 0.0 < <weight> < 1.0", "osd", "rw", "cli,rest")
740 COMMAND("osd reweightn " \
741 "name=weights,type=CephString",
742 "reweight osds with {<id>: <weight>,...})",
743 "osd", "rw", "cli,rest")
744 COMMAND("osd pg-temp " \
745 "name=pgid,type=CephPgid " \
746 "name=id,type=CephOsdName,n=N,req=false", \
747 "set pg_temp mapping pgid:[<id> [<id>...]] (developers only)", \
748 "osd", "rw", "cli,rest")
749 COMMAND("osd pg-upmap " \
750 "name=pgid,type=CephPgid " \
751 "name=id,type=CephOsdName,n=N", \
752 "set pg_upmap mapping <pgid>:[<id> [<id>...]] primary <primary> (developers only)", \
753 "osd", "rw", "cli,rest")
754 COMMAND("osd rm-pg-upmap " \
755 "name=pgid,type=CephPgid", \
756 "clear pg_upmap mapping for <pgid> (developers only)", \
757 "osd", "rw", "cli,rest")
758
759 COMMAND("osd pg-upmap-items " \
760 "name=pgid,type=CephPgid " \
761 "name=id,type=CephOsdName,n=N", \
762 "set pg_upmap_items mapping <pgid>:{<id> to <id>, [...]} (developers only)", \
763 "osd", "rw", "cli,rest")
764 COMMAND("osd rm-pg-upmap-items " \
765 "name=pgid,type=CephPgid", \
766 "clear pg_upmap_items mapping for <pgid> (developers only)", \
767 "osd", "rw", "cli,rest")
768 COMMAND("osd primary-temp " \
769 "name=pgid,type=CephPgid " \
770 "name=id,type=CephOsdName", \
771 "set primary_temp mapping pgid:<id>|-1 (developers only)", \
772 "osd", "rw", "cli,rest")
773 COMMAND("osd primary-affinity " \
774 "name=id,type=CephOsdName " \
775 "type=CephFloat,name=weight,range=0.0|1.0", \
776 "adjust osd primary-affinity from 0.0 <= <weight> <= 1.0", \
777 "osd", "rw", "cli,rest")
778 COMMAND("osd destroy " \
779 "name=id,type=CephOsdName " \
780 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
781 "mark osd as being destroyed. Keeps the ID intact (allowing reuse), " \
782 "but removes cephx keys, config-key data and lockbox keys, "\
783 "rendering data permanently unreadable.", \
784 "osd", "rw", "cli,rest")
785 COMMAND("osd purge " \
786 "name=id,type=CephOsdName " \
787 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
788 "purge all osd data from the monitors. Combines `osd destroy`, " \
789 "`osd rm`, and `osd crush rm`.", \
790 "osd", "rw", "cli,rest")
791 COMMAND("osd lost " \
792 "name=id,type=CephOsdName " \
793 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
794 "mark osd as permanently lost. THIS DESTROYS DATA IF NO MORE REPLICAS EXIST, BE CAREFUL", \
795 "osd", "rw", "cli,rest")
796 COMMAND_WITH_FLAG("osd create " \
797 "name=uuid,type=CephUUID,req=false " \
798 "name=id,type=CephOsdName,req=false", \
799 "create new osd (with optional UUID and ID)", "osd", "rw", "cli,rest",
800 FLAG(DEPRECATED))
801 COMMAND("osd new " \
802 "name=uuid,type=CephUUID,req=true " \
803 "name=id,type=CephOsdName,req=false", \
804 "Create a new OSD. If supplied, the `id` to be replaced needs to " \
805 "exist and have been previously destroyed. " \
806 "Reads secrets from JSON file via `-i <file>` (see man page).", \
807 "osd", "rw", "cli,rest")
808 COMMAND("osd blacklist " \
809 "name=blacklistop,type=CephChoices,strings=add|rm " \
810 "name=addr,type=CephEntityAddr " \
811 "name=expire,type=CephFloat,range=0.0,req=false", \
812 "add (optionally until <expire> seconds from now) or remove <addr> from blacklist", \
813 "osd", "rw", "cli,rest")
814 COMMAND("osd pool mksnap " \
815 "name=pool,type=CephPoolname " \
816 "name=snap,type=CephString", \
817 "make snapshot <snap> in <pool>", "osd", "rw", "cli,rest")
818 COMMAND("osd pool rmsnap " \
819 "name=pool,type=CephPoolname " \
820 "name=snap,type=CephString", \
821 "remove snapshot <snap> from <pool>", "osd", "rw", "cli,rest")
822 COMMAND("osd pool ls " \
823 "name=detail,type=CephChoices,strings=detail,req=false", \
824 "list pools", "osd", "r", "cli,rest")
825 COMMAND("osd pool create " \
826 "name=pool,type=CephPoolname " \
827 "name=pg_num,type=CephInt,range=0 " \
828 "name=pgp_num,type=CephInt,range=0,req=false " \
829 "name=pool_type,type=CephChoices,strings=replicated|erasure,req=false " \
830 "name=erasure_code_profile,type=CephString,req=false,goodchars=[A-Za-z0-9-_.] " \
831 "name=rule,type=CephString,req=false " \
832 "name=expected_num_objects,type=CephInt,req=false", \
833 "create pool", "osd", "rw", "cli,rest")
834 COMMAND("osd pool delete " \
835 "name=pool,type=CephPoolname " \
836 "name=pool2,type=CephPoolname,req=false " \
837 "name=sure,type=CephChoices,strings=--yes-i-really-really-mean-it,req=false", \
838 "delete pool", \
839 "osd", "rw", "cli,rest")
840 COMMAND("osd pool rm " \
841 "name=pool,type=CephPoolname " \
842 "name=pool2,type=CephPoolname,req=false " \
843 "name=sure,type=CephString,req=false", \
844 "remove pool", \
845 "osd", "rw", "cli,rest")
846 COMMAND("osd pool rename " \
847 "name=srcpool,type=CephPoolname " \
848 "name=destpool,type=CephPoolname", \
849 "rename <srcpool> to <destpool>", "osd", "rw", "cli,rest")
850 COMMAND("osd pool get " \
851 "name=pool,type=CephPoolname " \
852 "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|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", \
853 "get pool parameter <var>", "osd", "r", "cli,rest")
854 COMMAND("osd pool set " \
855 "name=pool,type=CephPoolname " \
856 "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|debug_fake_ec_pool|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 " \
857 "name=val,type=CephString " \
858 "name=force,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
859 "set pool parameter <var> to <val>", "osd", "rw", "cli,rest")
860 // 'val' is a CephString because it can include a unit. Perhaps
861 // there should be a Python type for validation/conversion of strings
862 // with units.
863 COMMAND("osd pool set-quota " \
864 "name=pool,type=CephPoolname " \
865 "name=field,type=CephChoices,strings=max_objects|max_bytes " \
866 "name=val,type=CephString",
867 "set object or byte limit on pool", "osd", "rw", "cli,rest")
868 COMMAND("osd pool get-quota " \
869 "name=pool,type=CephPoolname ",
870 "obtain object or byte limits for pool",
871 "osd", "r", "cli,rest")
872 COMMAND("osd utilization",
873 "get basic pg distribution stats",
874 "osd", "r", "cli,rest")
875
876 // tiering
877 COMMAND("osd tier add " \
878 "name=pool,type=CephPoolname " \
879 "name=tierpool,type=CephPoolname " \
880 "name=force_nonempty,type=CephChoices,strings=--force-nonempty,req=false",
881 "add the tier <tierpool> (the second one) to base pool <pool> (the first one)", \
882 "osd", "rw", "cli,rest")
883 COMMAND("osd tier remove " \
884 "name=pool,type=CephPoolname " \
885 "name=tierpool,type=CephPoolname",
886 "remove the tier <tierpool> (the second one) from base pool <pool> (the first one)", \
887 "osd", "rw", "cli,rest")
888 COMMAND("osd tier rm " \
889 "name=pool,type=CephPoolname " \
890 "name=tierpool,type=CephPoolname",
891 "remove the tier <tierpool> (the second one) from base pool <pool> (the first one)", \
892 "osd", "rw", "cli,rest")
893 COMMAND("osd tier cache-mode " \
894 "name=pool,type=CephPoolname " \
895 "name=mode,type=CephChoices,strings=none|writeback|forward|readonly|readforward|proxy|readproxy " \
896 "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
897 "specify the caching mode for cache tier <pool>", "osd", "rw", "cli,rest")
898 COMMAND("osd tier set-overlay " \
899 "name=pool,type=CephPoolname " \
900 "name=overlaypool,type=CephPoolname", \
901 "set the overlay pool for base pool <pool> to be <overlaypool>", "osd", "rw", "cli,rest")
902 COMMAND("osd tier remove-overlay " \
903 "name=pool,type=CephPoolname ", \
904 "remove the overlay pool for base pool <pool>", "osd", "rw", "cli,rest")
905 COMMAND("osd tier rm-overlay " \
906 "name=pool,type=CephPoolname ", \
907 "remove the overlay pool for base pool <pool>", "osd", "rw", "cli,rest")
908
909 COMMAND("osd tier add-cache " \
910 "name=pool,type=CephPoolname " \
911 "name=tierpool,type=CephPoolname " \
912 "name=size,type=CephInt,range=0", \
913 "add a cache <tierpool> (the second one) of size <size> to existing pool <pool> (the first one)", \
914 "osd", "rw", "cli,rest")
915
916 /*
917 * mon/ConfigKeyService.cc
918 */
919
920 COMMAND("config-key get " \
921 "name=key,type=CephString", \
922 "get <key>", "config-key", "r", "cli,rest")
923 COMMAND("config-key put " \
924 "name=key,type=CephString " \
925 "name=val,type=CephString,req=false", \
926 "put <key>, value <val>", "config-key", "rw", "cli,rest")
927 COMMAND("config-key del " \
928 "name=key,type=CephString", \
929 "delete <key>", "config-key", "rw", "cli,rest")
930 COMMAND("config-key rm " \
931 "name=key,type=CephString", \
932 "rm <key>", "config-key", "rw", "cli,rest")
933 COMMAND("config-key exists " \
934 "name=key,type=CephString", \
935 "check for <key>'s existence", "config-key", "r", "cli,rest")
936 COMMAND("config-key list ", "list keys", "config-key", "r", "cli,rest")
937 COMMAND("config-key dump", "dump keys and values", "config-key", "r", "cli,rest")
938
939
940 /*
941 * mon/MgrMonitor.cc
942 */
943 COMMAND("mgr dump " \
944 "name=epoch,type=CephInt,range=0,req=false", \
945 "dump the latest MgrMap", \
946 "mgr", "rw", "cli,rest")
947 COMMAND("mgr fail name=who,type=CephString", \
948 "treat the named manager daemon as failed", "mgr", "rw", "cli,rest")