]> git.proxmox.com Git - ceph.git/blob - ceph/src/common/options.cc
2af36dd0e4ef3f24c5cf31f50cea74adb595b46c
[ceph.git] / ceph / src / common / options.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #include "acconfig.h"
5 #include "options.h"
6 #include "common/Formatter.h"
7
8 // Helpers for validators
9 #include "include/stringify.h"
10 #include "include/common_fwd.h"
11 #include <boost/algorithm/string.hpp>
12 #include <boost/lexical_cast.hpp>
13 #include <regex>
14
15 // Definitions for enums
16 #include "common/perf_counters.h"
17
18 // rbd feature validation
19 #include "librbd/Features.h"
20
21 namespace {
22 class printer : public boost::static_visitor<> {
23 ostream& out;
24 public:
25 explicit printer(ostream& os)
26 : out(os) {}
27 template<typename T>
28 void operator()(const T& v) const {
29 out << v;
30 }
31 void operator()(boost::blank blank) const {
32 return;
33 }
34 void operator()(bool v) const {
35 out << (v ? "true" : "false");
36 }
37 void operator()(double v) const {
38 out << std::fixed << v << std::defaultfloat;
39 }
40 void operator()(const Option::size_t& v) const {
41 out << v.value;
42 }
43 void operator()(const std::chrono::seconds v) const {
44 out << v.count();
45 }
46 };
47 }
48
49 ostream& operator<<(ostream& os, const Option::value_t& v) {
50 printer p{os};
51 v.apply_visitor(p);
52 return os;
53 }
54
55 void Option::dump_value(const char *field_name,
56 const Option::value_t &v, Formatter *f) const
57 {
58 if (boost::get<boost::blank>(&v)) {
59 // This should be nil but Formatter doesn't allow it.
60 f->dump_string(field_name, "");
61 return;
62 }
63 switch (type) {
64 case TYPE_INT:
65 f->dump_int(field_name, boost::get<int64_t>(v)); break;
66 case TYPE_UINT:
67 f->dump_unsigned(field_name, boost::get<uint64_t>(v)); break;
68 case TYPE_STR:
69 f->dump_string(field_name, boost::get<std::string>(v)); break;
70 case TYPE_FLOAT:
71 f->dump_float(field_name, boost::get<double>(v)); break;
72 case TYPE_BOOL:
73 f->dump_bool(field_name, boost::get<bool>(v)); break;
74 default:
75 f->dump_stream(field_name) << v; break;
76 }
77 }
78
79 int Option::pre_validate(std::string *new_value, std::string *err) const
80 {
81 if (validator) {
82 return validator(new_value, err);
83 } else {
84 return 0;
85 }
86 }
87
88 int Option::validate(const Option::value_t &new_value, std::string *err) const
89 {
90 // Generic validation: min
91 if (!boost::get<boost::blank>(&(min))) {
92 if (new_value < min) {
93 std::ostringstream oss;
94 oss << "Value '" << new_value << "' is below minimum " << min;
95 *err = oss.str();
96 return -EINVAL;
97 }
98 }
99
100 // Generic validation: max
101 if (!boost::get<boost::blank>(&(max))) {
102 if (new_value > max) {
103 std::ostringstream oss;
104 oss << "Value '" << new_value << "' exceeds maximum " << max;
105 *err = oss.str();
106 return -EINVAL;
107 }
108 }
109
110 // Generic validation: enum
111 if (!enum_allowed.empty() && type == Option::TYPE_STR) {
112 auto found = std::find(enum_allowed.begin(), enum_allowed.end(),
113 boost::get<std::string>(new_value));
114 if (found == enum_allowed.end()) {
115 std::ostringstream oss;
116 oss << "'" << new_value << "' is not one of the permitted "
117 "values: " << joinify(enum_allowed.begin(),
118 enum_allowed.end(),
119 std::string(", "));
120 *err = oss.str();
121 return -EINVAL;
122 }
123 }
124
125 return 0;
126 }
127
128 int Option::parse_value(
129 const std::string& raw_val,
130 value_t *out,
131 std::string *error_message,
132 std::string *normalized_value) const
133 {
134 std::string val = raw_val;
135
136 int r = pre_validate(&val, error_message);
137 if (r != 0) {
138 return r;
139 }
140
141 if (type == Option::TYPE_INT) {
142 int64_t f = strict_si_cast<int64_t>(val.c_str(), error_message);
143 if (!error_message->empty()) {
144 return -EINVAL;
145 }
146 *out = f;
147 } else if (type == Option::TYPE_UINT) {
148 uint64_t f = strict_si_cast<uint64_t>(val.c_str(), error_message);
149 if (!error_message->empty()) {
150 return -EINVAL;
151 }
152 *out = f;
153 } else if (type == Option::TYPE_STR) {
154 *out = val;
155 } else if (type == Option::TYPE_FLOAT) {
156 double f = strict_strtod(val.c_str(), error_message);
157 if (!error_message->empty()) {
158 return -EINVAL;
159 } else {
160 *out = f;
161 }
162 } else if (type == Option::TYPE_BOOL) {
163 if (strcasecmp(val.c_str(), "false") == 0) {
164 *out = false;
165 } else if (strcasecmp(val.c_str(), "true") == 0) {
166 *out = true;
167 } else {
168 int b = strict_strtol(val.c_str(), 10, error_message);
169 if (!error_message->empty()) {
170 return -EINVAL;
171 }
172 *out = (bool)!!b;
173 }
174 } else if (type == Option::TYPE_ADDR) {
175 entity_addr_t addr;
176 if (!addr.parse(val.c_str())){
177 return -EINVAL;
178 }
179 *out = addr;
180 } else if (type == Option::TYPE_ADDRVEC) {
181 entity_addrvec_t addr;
182 if (!addr.parse(val.c_str())){
183 return -EINVAL;
184 }
185 *out = addr;
186 } else if (type == Option::TYPE_UUID) {
187 uuid_d uuid;
188 if (!uuid.parse(val.c_str())) {
189 return -EINVAL;
190 }
191 *out = uuid;
192 } else if (type == Option::TYPE_SIZE) {
193 Option::size_t sz{strict_iecstrtoll(val.c_str(), error_message)};
194 if (!error_message->empty()) {
195 return -EINVAL;
196 }
197 *out = sz;
198 } else if (type == Option::TYPE_SECS) {
199 try {
200 *out = parse_timespan(val);
201 } catch (const invalid_argument& e) {
202 *error_message = e.what();
203 return -EINVAL;
204 }
205 } else {
206 ceph_abort();
207 }
208
209 r = validate(*out, error_message);
210 if (r != 0) {
211 return r;
212 }
213
214 if (normalized_value) {
215 *normalized_value = to_str(*out);
216 }
217 return 0;
218 }
219
220 void Option::dump(Formatter *f) const
221 {
222 f->dump_string("name", name);
223
224 f->dump_string("type", type_to_str(type));
225
226 f->dump_string("level", level_to_str(level));
227
228 f->dump_string("desc", desc);
229 f->dump_string("long_desc", long_desc);
230
231 dump_value("default", value, f);
232 dump_value("daemon_default", daemon_value, f);
233
234 f->open_array_section("tags");
235 for (const auto t : tags) {
236 f->dump_string("tag", t);
237 }
238 f->close_section();
239
240 f->open_array_section("services");
241 for (const auto s : services) {
242 f->dump_string("service", s);
243 }
244 f->close_section();
245
246 f->open_array_section("see_also");
247 for (const auto sa : see_also) {
248 f->dump_string("see_also", sa);
249 }
250 f->close_section();
251
252 if (type == TYPE_STR) {
253 f->open_array_section("enum_values");
254 for (const auto &ea : enum_allowed) {
255 f->dump_string("enum_value", ea);
256 }
257 f->close_section();
258 }
259
260 dump_value("min", min, f);
261 dump_value("max", max, f);
262
263 f->dump_bool("can_update_at_runtime", can_update_at_runtime());
264
265 f->open_array_section("flags");
266 if (has_flag(FLAG_RUNTIME)) {
267 f->dump_string("option", "runtime");
268 }
269 if (has_flag(FLAG_NO_MON_UPDATE)) {
270 f->dump_string("option", "no_mon_update");
271 }
272 if (has_flag(FLAG_STARTUP)) {
273 f->dump_string("option", "startup");
274 }
275 if (has_flag(FLAG_CLUSTER_CREATE)) {
276 f->dump_string("option", "cluster_create");
277 }
278 if (has_flag(FLAG_CREATE)) {
279 f->dump_string("option", "create");
280 }
281 f->close_section();
282 }
283
284 std::string Option::to_str(const Option::value_t& v)
285 {
286 return stringify(v);
287 }
288
289 void Option::print(ostream *out) const
290 {
291 *out << name << " - " << desc << "\n";
292 *out << " (" << type_to_str(type) << ", " << level_to_str(level) << ")\n";
293 if (!boost::get<boost::blank>(&daemon_value)) {
294 *out << " Default (non-daemon): " << stringify(value) << "\n";
295 *out << " Default (daemon): " << stringify(daemon_value) << "\n";
296 } else {
297 *out << " Default: " << stringify(value) << "\n";
298 }
299 if (!enum_allowed.empty()) {
300 *out << " Possible values: ";
301 for (auto& i : enum_allowed) {
302 *out << " " << stringify(i);
303 }
304 *out << "\n";
305 }
306 if (!boost::get<boost::blank>(&min)) {
307 *out << " Minimum: " << stringify(min) << "\n"
308 << " Maximum: " << stringify(max) << "\n";
309 }
310 *out << " Can update at runtime: "
311 << (can_update_at_runtime() ? "true" : "false") << "\n";
312 if (!services.empty()) {
313 *out << " Services: " << services << "\n";
314 }
315 if (!tags.empty()) {
316 *out << " Tags: " << tags << "\n";
317 }
318 if (!see_also.empty()) {
319 *out << " See also: " << see_also << "\n";
320 }
321
322 if (long_desc.size()) {
323 *out << "\n" << long_desc << "\n";
324 }
325 }
326
327 constexpr unsigned long long operator"" _min (unsigned long long min) {
328 return min * 60;
329 }
330 constexpr unsigned long long operator"" _hr (unsigned long long hr) {
331 return hr * 60 * 60;
332 }
333 constexpr unsigned long long operator"" _day (unsigned long long day) {
334 return day * 60 * 60 * 24;
335 }
336 constexpr unsigned long long operator"" _K (unsigned long long n) {
337 return n << 10;
338 }
339 constexpr unsigned long long operator"" _M (unsigned long long n) {
340 return n << 20;
341 }
342 constexpr unsigned long long operator"" _G (unsigned long long n) {
343 return n << 30;
344 }
345 constexpr unsigned long long operator"" _T (unsigned long long n) {
346 return n << 40;
347 }
348
349 std::vector<Option> get_global_options() {
350 return std::vector<Option>({
351 Option("host", Option::TYPE_STR, Option::LEVEL_BASIC)
352 .set_description("local hostname")
353 .set_long_description("if blank, ceph assumes the short hostname (hostname -s)")
354 .set_flag(Option::FLAG_NO_MON_UPDATE)
355 .add_service("common")
356 .add_tag("network"),
357
358 Option("fsid", Option::TYPE_UUID, Option::LEVEL_BASIC)
359 .set_description("cluster fsid (uuid)")
360 .set_flag(Option::FLAG_NO_MON_UPDATE)
361 .set_flag(Option::FLAG_STARTUP)
362 .add_service("common")
363 .add_tag("service"),
364
365 Option("public_addr", Option::TYPE_ADDR, Option::LEVEL_BASIC)
366 .set_description("public-facing address to bind to")
367 .set_flag(Option::FLAG_STARTUP)
368 .add_service({"mon", "mds", "osd", "mgr"}),
369
370 Option("public_addrv", Option::TYPE_ADDRVEC, Option::LEVEL_BASIC)
371 .set_description("public-facing address to bind to")
372 .set_flag(Option::FLAG_STARTUP)
373 .add_service({"mon", "mds", "osd", "mgr"}),
374
375 Option("public_bind_addr", Option::TYPE_ADDR, Option::LEVEL_ADVANCED)
376 .set_default(entity_addr_t())
377 .set_flag(Option::FLAG_STARTUP)
378 .add_service("mon")
379 .set_description(""),
380
381 Option("cluster_addr", Option::TYPE_ADDR, Option::LEVEL_BASIC)
382 .set_description("cluster-facing address to bind to")
383 .add_service("osd")
384 .set_flag(Option::FLAG_STARTUP)
385 .add_tag("network"),
386
387 Option("public_network", Option::TYPE_STR, Option::LEVEL_ADVANCED)
388 .add_service({"mon", "mds", "osd", "mgr"})
389 .set_flag(Option::FLAG_STARTUP)
390 .add_tag("network")
391 .set_description("Network(s) from which to choose a public address to bind to"),
392
393 Option("public_network_interface", Option::TYPE_STR, Option::LEVEL_ADVANCED)
394 .add_service({"mon", "mds", "osd", "mgr"})
395 .add_tag("network")
396 .set_flag(Option::FLAG_STARTUP)
397 .set_description("Interface name(s) from which to choose an address from a public_network to bind to; public_network must also be specified.")
398 .add_see_also("public_network"),
399
400 Option("cluster_network", Option::TYPE_STR, Option::LEVEL_ADVANCED)
401 .add_service("osd")
402 .set_flag(Option::FLAG_STARTUP)
403 .add_tag("network")
404 .set_description("Network(s) from which to choose a cluster address to bind to"),
405
406 Option("cluster_network_interface", Option::TYPE_STR, Option::LEVEL_ADVANCED)
407 .add_service({"mon", "mds", "osd", "mgr"})
408 .set_flag(Option::FLAG_STARTUP)
409 .add_tag("network")
410 .set_description("Interface name(s) from which to choose an address from a cluster_network to bind to; cluster_network must also be specified.")
411 .add_see_also("cluster_network"),
412
413 Option("monmap", Option::TYPE_STR, Option::LEVEL_ADVANCED)
414 .set_description("path to MonMap file")
415 .set_long_description("This option is normally used during mkfs, but can also "
416 "be used to identify which monitors to connect to.")
417 .set_flag(Option::FLAG_NO_MON_UPDATE)
418 .add_service("mon")
419 .set_flag(Option::FLAG_CREATE),
420
421 Option("mon_host", Option::TYPE_STR, Option::LEVEL_BASIC)
422 .set_description("list of hosts or addresses to search for a monitor")
423 .set_long_description("This is a comma, whitespace, or semicolon separated "
424 "list of IP addresses or hostnames. Hostnames are "
425 "resolved via DNS and all A or AAAA records are "
426 "included in the search list.")
427 .set_flag(Option::FLAG_NO_MON_UPDATE)
428 .set_flag(Option::FLAG_STARTUP)
429 .add_service("common"),
430
431 Option("mon_dns_srv_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
432 .set_default("ceph-mon")
433 .set_description("name of DNS SRV record to check for monitor addresses")
434 .set_flag(Option::FLAG_STARTUP)
435 .add_service("common")
436 .add_tag("network")
437 .add_see_also("mon_host"),
438
439 Option("container_image", Option::TYPE_STR, Option::LEVEL_BASIC)
440 .set_description("container image (used by cephadm orchestrator)")
441 .set_flag(Option::FLAG_STARTUP)
442 .set_default("docker.io/ceph/ceph:v15"),
443
444 Option("no_config_file", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
445 .set_default(false)
446 .set_flag(Option::FLAG_NO_MON_UPDATE)
447 .set_flag(Option::FLAG_STARTUP)
448 .add_service("common")
449 .add_tag("config")
450 .set_description("signal that we don't require a config file to be present")
451 .set_long_description("When specified, we won't be looking for a "
452 "configuration file, and will instead expect that "
453 "whatever options or values are required for us to "
454 "work will be passed as arguments."),
455
456 // lockdep
457 Option("lockdep", Option::TYPE_BOOL, Option::LEVEL_DEV)
458 .set_description("enable lockdep lock dependency analyzer")
459 .set_flag(Option::FLAG_NO_MON_UPDATE)
460 .set_flag(Option::FLAG_STARTUP)
461 .add_service("common"),
462
463 Option("lockdep_force_backtrace", Option::TYPE_BOOL, Option::LEVEL_DEV)
464 .set_description("always gather current backtrace at every lock")
465 .set_flag(Option::FLAG_STARTUP)
466 .add_service("common")
467 .add_see_also("lockdep"),
468
469 Option("run_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
470 .set_default("/var/run/ceph")
471 .set_flag(Option::FLAG_STARTUP)
472 .set_description("path for the 'run' directory for storing pid and socket files")
473 .add_service("common")
474 .add_see_also("admin_socket"),
475
476 Option("admin_socket", Option::TYPE_STR, Option::LEVEL_ADVANCED)
477 .set_default("")
478 .set_daemon_default("$run_dir/$cluster-$name.asok")
479 .set_flag(Option::FLAG_STARTUP)
480 .set_description("path for the runtime control socket file, used by the 'ceph daemon' command")
481 .add_service("common"),
482
483 Option("admin_socket_mode", Option::TYPE_STR, Option::LEVEL_ADVANCED)
484 .set_description("file mode to set for the admin socket file, e.g, '0755'")
485 .set_flag(Option::FLAG_STARTUP)
486 .add_service("common")
487 .add_see_also("admin_socket"),
488
489 // daemon
490 Option("daemonize", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
491 .set_default(false)
492 .set_daemon_default(true)
493 .set_description("whether to daemonize (background) after startup")
494 .set_flag(Option::FLAG_STARTUP)
495 .set_flag(Option::FLAG_NO_MON_UPDATE)
496 .add_service({"mon", "mgr", "osd", "mds"})
497 .add_tag("service")
498 .add_see_also({"pid_file", "chdir"}),
499
500 Option("setuser", Option::TYPE_STR, Option::LEVEL_ADVANCED)
501 .set_flag(Option::FLAG_STARTUP)
502 .set_description("uid or user name to switch to on startup")
503 .set_long_description("This is normally specified by the systemd unit file.")
504 .add_service({"mon", "mgr", "osd", "mds"})
505 .add_tag("service")
506 .add_see_also("setgroup"),
507
508 Option("setgroup", Option::TYPE_STR, Option::LEVEL_ADVANCED)
509 .set_flag(Option::FLAG_STARTUP)
510 .set_description("gid or group name to switch to on startup")
511 .set_long_description("This is normally specified by the systemd unit file.")
512 .add_service({"mon", "mgr", "osd", "mds"})
513 .add_tag("service")
514 .add_see_also("setuser"),
515
516 Option("setuser_match_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
517 .set_flag(Option::FLAG_STARTUP)
518 .set_description("if set, setuser/setgroup is condition on this path matching ownership")
519 .set_long_description("If setuser or setgroup are specified, and this option is non-empty, then the uid/gid of the daemon will only be changed if the file or directory specified by this option has a matching uid and/or gid. This exists primarily to allow switching to user ceph for OSDs to be conditional on whether the osd data contents have also been chowned after an upgrade. This is normally specified by the systemd unit file.")
520 .add_service({"mon", "mgr", "osd", "mds"})
521 .add_tag("service")
522 .add_see_also({"setuser", "setgroup"}),
523
524 Option("pid_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
525 .set_flag(Option::FLAG_STARTUP)
526 .set_description("path to write a pid file (if any)")
527 .add_service({"mon", "mgr", "osd", "mds"})
528 .add_tag("service"),
529
530 Option("chdir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
531 .set_description("path to chdir(2) to after daemonizing")
532 .set_flag(Option::FLAG_STARTUP)
533 .set_flag(Option::FLAG_NO_MON_UPDATE)
534 .add_service({"mon", "mgr", "osd", "mds"})
535 .add_tag("service")
536 .add_see_also("daemonize"),
537
538 Option("fatal_signal_handlers", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
539 .set_default(true)
540 .set_flag(Option::FLAG_STARTUP)
541 .set_description("whether to register signal handlers for SIGABRT etc that dump a stack trace")
542 .set_long_description("This is normally true for daemons and values for libraries.")
543 .add_service({"mon", "mgr", "osd", "mds"})
544 .add_tag("service"),
545
546 Option("crash_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
547 .set_flag(Option::FLAG_STARTUP)
548 .set_default("/var/lib/ceph/crash")
549 .set_description("Directory where crash reports are archived"),
550
551 // restapi
552 Option("restapi_log_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
553 .set_description("default set by python code"),
554
555 Option("restapi_base_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
556 .set_description("default set by python code"),
557
558 Option("erasure_code_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
559 .set_default(CEPH_PKGLIBDIR"/erasure-code")
560 .set_flag(Option::FLAG_STARTUP)
561 .set_description("directory where erasure-code plugins can be found")
562 .add_service({"mon", "osd"}),
563
564 // logging
565 Option("log_file", Option::TYPE_STR, Option::LEVEL_BASIC)
566 .set_default("")
567 .set_daemon_default("/var/log/ceph/$cluster-$name.log")
568 .set_description("path to log file")
569 .add_see_also({"log_to_file",
570 "log_to_stderr",
571 "err_to_stderr",
572 "log_to_syslog",
573 "err_to_syslog"}),
574
575 Option("log_max_new", Option::TYPE_INT, Option::LEVEL_ADVANCED)
576 .set_default(1000)
577 .set_description("max unwritten log entries to allow before waiting to flush to the log")
578 .add_see_also("log_max_recent"),
579
580 Option("log_max_recent", Option::TYPE_INT, Option::LEVEL_ADVANCED)
581 .set_default(500)
582 .set_daemon_default(10000)
583 .set_description("recent log entries to keep in memory to dump in the event of a crash")
584 .set_long_description("The purpose of this option is to log at a higher debug level only to the in-memory buffer, and write out the detailed log messages only if there is a crash. Only log entries below the lower log level will be written unconditionally to the log. For example, debug_osd=1/5 will write everything <= 1 to the log unconditionally but keep entries at levels 2-5 in memory. If there is a seg fault or assertion failure, all entries will be dumped to the log."),
585
586 Option("log_to_file", Option::TYPE_BOOL, Option::LEVEL_BASIC)
587 .set_default(true)
588 .set_description("send log lines to a file")
589 .add_see_also("log_file"),
590
591 Option("log_to_stderr", Option::TYPE_BOOL, Option::LEVEL_BASIC)
592 .set_default(true)
593 .set_daemon_default(false)
594 .set_description("send log lines to stderr"),
595
596 Option("err_to_stderr", Option::TYPE_BOOL, Option::LEVEL_BASIC)
597 .set_default(false)
598 .set_daemon_default(true)
599 .set_description("send critical error log lines to stderr"),
600
601 Option("log_stderr_prefix", Option::TYPE_STR, Option::LEVEL_ADVANCED)
602 .set_description("String to prefix log messages with when sent to stderr")
603 .set_long_description("This is useful in container environments when combined with mon_cluster_log_to_stderr. The mon log prefixes each line with the channel name (e.g., 'default', 'audit'), while log_stderr_prefix can be set to 'debug '.")
604 .add_see_also("mon_cluster_log_to_stderr"),
605
606 Option("log_to_syslog", Option::TYPE_BOOL, Option::LEVEL_BASIC)
607 .set_default(false)
608 .set_description("send log lines to syslog facility"),
609
610 Option("err_to_syslog", Option::TYPE_BOOL, Option::LEVEL_BASIC)
611 .set_default(false)
612 .set_description("send critical error log lines to syslog facility"),
613
614 Option("log_flush_on_exit", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
615 .set_default(false)
616 .set_description("set a process exit handler to ensure the log is flushed on exit"),
617
618 Option("log_stop_at_utilization", Option::TYPE_FLOAT, Option::LEVEL_BASIC)
619 .set_default(.97)
620 .set_min_max(0.0, 1.0)
621 .set_description("stop writing to the log file when device utilization reaches this ratio")
622 .add_see_also("log_file"),
623
624 Option("log_to_graylog", Option::TYPE_BOOL, Option::LEVEL_BASIC)
625 .set_default(false)
626 .set_description("send log lines to remote graylog server")
627 .add_see_also({"err_to_graylog",
628 "log_graylog_host",
629 "log_graylog_port"}),
630
631 Option("err_to_graylog", Option::TYPE_BOOL, Option::LEVEL_BASIC)
632 .set_default(false)
633 .set_description("send critical error log lines to remote graylog server")
634 .add_see_also({"log_to_graylog",
635 "log_graylog_host",
636 "log_graylog_port"}),
637
638 Option("log_graylog_host", Option::TYPE_STR, Option::LEVEL_BASIC)
639 .set_default("127.0.0.1")
640 .set_description("address or hostname of graylog server to log to")
641 .add_see_also({"log_to_graylog",
642 "err_to_graylog",
643 "log_graylog_port"}),
644
645 Option("log_graylog_port", Option::TYPE_INT, Option::LEVEL_BASIC)
646 .set_default(12201)
647 .set_description("port number for the remote graylog server")
648 .add_see_also("log_graylog_host"),
649
650 Option("log_coarse_timestamps", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
651 .set_default(true)
652 .set_description("timestamp log entries from coarse system clock "
653 "to improve performance")
654 .add_service("common")
655 .add_tag("performance")
656 .add_tag("service"),
657
658
659 // unmodified
660 Option("clog_to_monitors", Option::TYPE_STR, Option::LEVEL_ADVANCED)
661 .set_default("default=true")
662 .set_flag(Option::FLAG_RUNTIME)
663 .set_description("Make daemons send cluster log messages to monitors"),
664
665 Option("clog_to_syslog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
666 .set_default("false")
667 .set_flag(Option::FLAG_RUNTIME)
668 .set_description("Make daemons send cluster log messages to syslog"),
669
670 Option("clog_to_syslog_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
671 .set_default("info")
672 .set_flag(Option::FLAG_RUNTIME)
673 .set_description("Syslog level for cluster log messages")
674 .add_see_also("clog_to_syslog"),
675
676 Option("clog_to_syslog_facility", Option::TYPE_STR, Option::LEVEL_ADVANCED)
677 .set_default("default=daemon audit=local0")
678 .set_flag(Option::FLAG_RUNTIME)
679 .set_description("Syslog facility for cluster log messages")
680 .add_see_also("clog_to_syslog"),
681
682 Option("clog_to_graylog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
683 .set_default("false")
684 .set_flag(Option::FLAG_RUNTIME)
685 .set_description("Make daemons send cluster log to graylog"),
686
687 Option("clog_to_graylog_host", Option::TYPE_STR, Option::LEVEL_ADVANCED)
688 .set_default("127.0.0.1")
689 .set_flag(Option::FLAG_RUNTIME)
690 .set_description("Graylog host to cluster log messages")
691 .add_see_also("clog_to_graylog"),
692
693 Option("clog_to_graylog_port", Option::TYPE_STR, Option::LEVEL_ADVANCED)
694 .set_default("12201")
695 .set_flag(Option::FLAG_RUNTIME)
696 .set_description("Graylog port number for cluster log messages")
697 .add_see_also("clog_to_graylog"),
698
699 Option("mon_cluster_log_to_stderr", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
700 .set_default(false)
701 .add_service("mon")
702 .set_flag(Option::FLAG_RUNTIME)
703 .set_description("Make monitor send cluster log messages to stderr (prefixed by channel)")
704 .add_see_also("log_stderr_prefix"),
705
706 Option("mon_cluster_log_to_syslog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
707 .set_default("default=false")
708 .set_flag(Option::FLAG_RUNTIME)
709 .add_service("mon")
710 .set_description("Make monitor send cluster log messages to syslog"),
711
712 Option("mon_cluster_log_to_syslog_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
713 .set_default("info")
714 .add_service("mon")
715 .set_flag(Option::FLAG_RUNTIME)
716 .set_description("Syslog level for cluster log messages")
717 .add_see_also("mon_cluster_log_to_syslog"),
718
719 Option("mon_cluster_log_to_syslog_facility", Option::TYPE_STR, Option::LEVEL_ADVANCED)
720 .set_default("daemon")
721 .add_service("mon")
722 .set_flag(Option::FLAG_RUNTIME)
723 .set_description("Syslog facility for cluster log messages")
724 .add_see_also("mon_cluster_log_to_syslog"),
725
726 Option("mon_cluster_log_to_file", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
727 .set_default(true)
728 .set_flag(Option::FLAG_RUNTIME)
729 .add_service("mon")
730 .set_description("Make monitor send cluster log messages to file")
731 .add_see_also("mon_cluster_log_file"),
732
733 Option("mon_cluster_log_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
734 .set_default("default=/var/log/ceph/$cluster.$channel.log cluster=/var/log/ceph/$cluster.log")
735 .set_flag(Option::FLAG_RUNTIME)
736 .add_service("mon")
737 .set_description("File(s) to write cluster log to")
738 .set_long_description("This can either be a simple file name to receive all messages, or a list of key/value pairs where the key is the log channel and the value is the filename, which may include $cluster and $channel metavariables")
739 .add_see_also("mon_cluster_log_to_file"),
740
741 Option("mon_cluster_log_file_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
742 .set_default("debug")
743 .set_flag(Option::FLAG_RUNTIME)
744 .add_service("mon")
745 .set_description("Lowest level to include is cluster log file")
746 .add_see_also("mon_cluster_log_file"),
747
748 Option("mon_cluster_log_to_graylog", Option::TYPE_STR, Option::LEVEL_ADVANCED)
749 .set_default("false")
750 .set_flag(Option::FLAG_RUNTIME)
751 .add_service("mon")
752 .set_description("Make monitor send cluster log to graylog"),
753
754 Option("mon_cluster_log_to_graylog_host", Option::TYPE_STR, Option::LEVEL_ADVANCED)
755 .set_default("127.0.0.1")
756 .set_flag(Option::FLAG_RUNTIME)
757 .add_service("mon")
758 .set_description("Graylog host for cluster log messages")
759 .add_see_also("mon_cluster_log_to_graylog"),
760
761 Option("mon_cluster_log_to_graylog_port", Option::TYPE_STR, Option::LEVEL_ADVANCED)
762 .set_default("12201")
763 .set_flag(Option::FLAG_RUNTIME)
764 .add_service("mon")
765 .set_description("Graylog port for cluster log messages")
766 .add_see_also("mon_cluster_log_to_graylog"),
767
768 Option("enable_experimental_unrecoverable_data_corrupting_features", Option::TYPE_STR, Option::LEVEL_ADVANCED)
769 .set_flag(Option::FLAG_RUNTIME)
770 .set_default("")
771 .set_description("Enable named (or all with '*') experimental features that may be untested, dangerous, and/or cause permanent data loss"),
772
773 Option("plugin_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
774 .set_default(CEPH_PKGLIBDIR)
775 .set_flag(Option::FLAG_STARTUP)
776 .add_service({"mon", "osd"})
777 .set_description("Base directory for dynamically loaded plugins"),
778
779 // Compressor
780 Option("compressor_zlib_isal", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
781 .set_default(false)
782 .set_description("Use Intel ISA-L accelerated zlib implementation if available"),
783
784 Option("compressor_zlib_level", Option::TYPE_INT, Option::LEVEL_ADVANCED)
785 .set_default(5)
786 .set_description("Zlib compression level to use"),
787
788 Option("qat_compressor_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
789 .set_default(false)
790 .set_description("Enable Intel QAT acceleration support for compression if available"),
791
792 Option("plugin_crypto_accelerator", Option::TYPE_STR, Option::LEVEL_ADVANCED)
793 .set_default("crypto_isal")
794 .set_description("Crypto accelerator library to use"),
795
796 Option("mempool_debug", Option::TYPE_BOOL, Option::LEVEL_DEV)
797 .set_default(false)
798 .set_flag(Option::FLAG_NO_MON_UPDATE)
799 .set_description(""),
800
801 Option("thp", Option::TYPE_BOOL, Option::LEVEL_DEV)
802 .set_default(false)
803 .set_flag(Option::FLAG_STARTUP)
804 .set_description("enable transparent huge page (THP) support")
805 .set_long_description("Ceph is known to suffer from memory fragmentation due to THP use. This is indicated by RSS usage above configured memory targets. Enabling THP is currently discouraged until selective use of THP by Ceph is implemented."),
806
807 Option("key", Option::TYPE_STR, Option::LEVEL_ADVANCED)
808 .set_default("")
809 .set_description("Authentication key")
810 .set_long_description("A CephX authentication key, base64 encoded. It normally looks something like 'AQAtut9ZdMbNJBAAHz6yBAWyJyz2yYRyeMWDag=='.")
811 .set_flag(Option::FLAG_STARTUP)
812 .set_flag(Option::FLAG_NO_MON_UPDATE)
813 .add_see_also("keyfile")
814 .add_see_also("keyring"),
815
816 Option("keyfile", Option::TYPE_STR, Option::LEVEL_ADVANCED)
817 .set_default("")
818 .set_description("Path to a file containing a key")
819 .set_long_description("The file should contain a CephX authentication key and optionally a trailing newline, but nothing else.")
820 .set_flag(Option::FLAG_STARTUP)
821 .set_flag(Option::FLAG_NO_MON_UPDATE)
822 .add_see_also("key"),
823
824 Option("keyring", Option::TYPE_STR, Option::LEVEL_ADVANCED)
825 .set_default(
826 "/etc/ceph/$cluster.$name.keyring,/etc/ceph/$cluster.keyring,"
827 "/etc/ceph/keyring,/etc/ceph/keyring.bin,"
828 #if defined(__FreeBSD)
829 "/usr/local/etc/ceph/$cluster.$name.keyring,"
830 "/usr/local/etc/ceph/$cluster.keyring,"
831 "/usr/local/etc/ceph/keyring,/usr/local/etc/ceph/keyring.bin,"
832 #endif
833 )
834 .set_description("Path to a keyring file.")
835 .set_long_description("A keyring file is an INI-style formatted file where the section names are client or daemon names (e.g., 'osd.0') and each section contains a 'key' property with CephX authentication key as the value.")
836 .set_flag(Option::FLAG_STARTUP)
837 .set_flag(Option::FLAG_NO_MON_UPDATE)
838 .add_see_also("key")
839 .add_see_also("keyfile"),
840
841 Option("heartbeat_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
842 .set_default(5)
843 .set_flag(Option::FLAG_STARTUP)
844 .set_description("Frequency of internal heartbeat checks (seconds)"),
845
846 Option("heartbeat_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
847 .set_default("")
848 .set_flag(Option::FLAG_STARTUP)
849 .set_description("File to touch on successful internal heartbeat")
850 .set_long_description("If set, this file will be touched every time an internal heartbeat check succeeds.")
851 .add_see_also("heartbeat_interval"),
852
853 Option("heartbeat_inject_failure", Option::TYPE_INT, Option::LEVEL_DEV)
854 .set_default(0)
855 .set_description(""),
856
857 Option("perf", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
858 .set_default(true)
859 .set_description("Enable internal performance metrics")
860 .set_long_description("If enabled, collect and expose internal health metrics"),
861
862 Option("ms_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
863 .set_flag(Option::FLAG_STARTUP)
864 .set_default("async+posix")
865 .set_description("Messenger implementation to use for network communication"),
866
867 Option("ms_public_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
868 .set_default("")
869 .set_flag(Option::FLAG_STARTUP)
870 .set_description("Messenger implementation to use for the public network")
871 .set_long_description("If not specified, use ms_type")
872 .add_see_also("ms_type"),
873
874 Option("ms_cluster_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
875 .set_default("")
876 .set_flag(Option::FLAG_STARTUP)
877 .set_description("Messenger implementation to use for the internal cluster network")
878 .set_long_description("If not specified, use ms_type")
879 .add_see_also("ms_type"),
880
881 Option("ms_mon_cluster_mode", Option::TYPE_STR, Option::LEVEL_BASIC)
882 .set_default("secure crc")
883 .set_flag(Option::FLAG_STARTUP)
884 .set_description("Connection modes (crc, secure) for intra-mon connections in order of preference")
885 .add_see_also("ms_mon_service_mode")
886 .add_see_also("ms_mon_client_mode")
887 .add_see_also("ms_service_mode")
888 .add_see_also("ms_cluster_mode")
889 .add_see_also("ms_client_mode"),
890
891 Option("ms_mon_service_mode", Option::TYPE_STR, Option::LEVEL_BASIC)
892 .set_default("secure crc")
893 .set_flag(Option::FLAG_STARTUP)
894 .set_description("Allowed connection modes (crc, secure) for connections to mons")
895 .add_see_also("ms_service_mode")
896 .add_see_also("ms_mon_cluster_mode")
897 .add_see_also("ms_mon_client_mode")
898 .add_see_also("ms_cluster_mode")
899 .add_see_also("ms_client_mode"),
900
901 Option("ms_mon_client_mode", Option::TYPE_STR, Option::LEVEL_BASIC)
902 .set_default("secure crc")
903 .set_flag(Option::FLAG_STARTUP)
904 .set_description("Connection modes (crc, secure) for connections from clients to monitors in order of preference")
905 .add_see_also("ms_mon_service_mode")
906 .add_see_also("ms_mon_cluster_mode")
907 .add_see_also("ms_service_mode")
908 .add_see_also("ms_cluster_mode")
909 .add_see_also("ms_client_mode"),
910
911 Option("ms_cluster_mode", Option::TYPE_STR, Option::LEVEL_BASIC)
912 .set_default("crc secure")
913 .set_flag(Option::FLAG_STARTUP)
914 .set_description("Connection modes (crc, secure) for intra-cluster connections in order of preference")
915 .add_see_also("ms_service_mode")
916 .add_see_also("ms_client_mode"),
917
918 Option("ms_service_mode", Option::TYPE_STR, Option::LEVEL_BASIC)
919 .set_default("crc secure")
920 .set_flag(Option::FLAG_STARTUP)
921 .set_description("Allowed connection modes (crc, secure) for connections to daemons")
922 .add_see_also("ms_cluster_mode")
923 .add_see_also("ms_client_mode"),
924
925 Option("ms_client_mode", Option::TYPE_STR, Option::LEVEL_BASIC)
926 .set_default("crc secure")
927 .set_flag(Option::FLAG_STARTUP)
928 .set_description("Connection modes (crc, secure) for connections from clients in order of preference")
929 .add_see_also("ms_cluster_mode")
930 .add_see_also("ms_service_mode"),
931
932 Option("ms_learn_addr_from_peer", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
933 .set_default(true)
934 .set_description("Learn address from what IP our first peer thinks we connect from")
935 .set_long_description("Use the IP address our first peer (usually a monitor) sees that we are connecting from. This is useful if a client is behind some sort of NAT and we want to see it identified by its local (not NATed) address."),
936
937 Option("ms_tcp_nodelay", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
938 .set_default(true)
939 .set_description("Disable Nagle's algorithm and send queued network traffic immediately"),
940
941 Option("ms_tcp_rcvbuf", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
942 .set_default(0)
943 .set_description("Size of TCP socket receive buffer"),
944
945 Option("ms_tcp_prefetch_max_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
946 .set_default(4_K)
947 .set_description("Maximum amount of data to prefetch out of the socket receive buffer"),
948
949 Option("ms_initial_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
950 .set_default(.2)
951 .set_description("Initial backoff after a network error is detected (seconds)"),
952
953 Option("ms_max_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
954 .set_default(15.0)
955 .set_description("Maximum backoff after a network error before retrying (seconds)")
956 .add_see_also("ms_initial_backoff"),
957
958 Option("ms_crc_data", Option::TYPE_BOOL, Option::LEVEL_DEV)
959 .set_default(true)
960 .set_description("Set and/or verify crc32c checksum on data payload sent over network"),
961
962 Option("ms_crc_header", Option::TYPE_BOOL, Option::LEVEL_DEV)
963 .set_default(true)
964 .set_description("Set and/or verify crc32c checksum on header payload sent over network"),
965
966 Option("ms_die_on_bad_msg", Option::TYPE_BOOL, Option::LEVEL_DEV)
967 .set_default(false)
968 .set_description("Induce a daemon crash/exit when a bad network message is received"),
969
970 Option("ms_die_on_unhandled_msg", Option::TYPE_BOOL, Option::LEVEL_DEV)
971 .set_default(false)
972 .set_description("Induce a daemon crash/exit when an unrecognized message is received"),
973
974 Option("ms_die_on_old_message", Option::TYPE_BOOL, Option::LEVEL_DEV)
975 .set_default(false)
976 .set_description("Induce a daemon crash/exit when a old, undecodable message is received"),
977
978 Option("ms_die_on_skipped_message", Option::TYPE_BOOL, Option::LEVEL_DEV)
979 .set_default(false)
980 .set_description("Induce a daemon crash/exit if sender skips a message sequence number"),
981
982 Option("ms_die_on_bug", Option::TYPE_BOOL, Option::LEVEL_DEV)
983 .set_default(false)
984 .set_description("Induce a crash/exit on various bugs (for testing purposes)"),
985
986 Option("ms_dispatch_throttle_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
987 .set_default(100_M)
988 .set_description("Limit messages that are read off the network but still being processed"),
989
990 Option("ms_bind_ipv4", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
991 .set_default(true)
992 .set_description("Bind servers to IPv4 address(es)")
993 .add_see_also("ms_bind_ipv6"),
994
995 Option("ms_bind_ipv6", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
996 .set_default(false)
997 .set_description("Bind servers to IPv6 address(es)")
998 .add_see_also("ms_bind_ipv4"),
999
1000 Option("ms_bind_prefer_ipv4", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1001 .set_default(false)
1002 .set_description("Prefer IPV4 over IPV6 address(es)"),
1003
1004 Option("ms_bind_msgr1", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1005 .set_default(true)
1006 .set_description("Bind servers to msgr1 (legacy) protocol address(es)")
1007 .add_see_also("ms_bind_msgr2"),
1008
1009 Option("ms_bind_msgr2", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1010 .set_default(true)
1011 .set_description("Bind servers to msgr2 (nautilus+) protocol address(es)")
1012 .add_see_also("ms_bind_msgr1"),
1013
1014 Option("ms_bind_port_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1015 .set_default(6800)
1016 .set_description("Lowest port number to bind daemon(s) to"),
1017
1018 Option("ms_bind_port_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1019 .set_default(7300)
1020 .set_description("Highest port number to bind daemon(s) to"),
1021
1022 Option("ms_bind_retry_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1023 #if !defined(__FreeBSD__)
1024 .set_default(3)
1025 #else
1026 // FreeBSD does not use SO_REAUSEADDR so allow for a bit more time per default
1027 .set_default(6)
1028 #endif
1029 .set_description("Number of attempts to make while bind(2)ing to a port"),
1030
1031 Option("ms_bind_retry_delay", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1032 #if !defined(__FreeBSD__)
1033 .set_default(5)
1034 #else
1035 // FreeBSD does not use SO_REAUSEADDR so allow for a bit more time per default
1036 .set_default(6)
1037 #endif
1038 .set_description("Delay between bind(2) attempts (seconds)"),
1039
1040 Option("ms_bind_before_connect", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1041 .set_default(false)
1042 .set_description("Call bind(2) on client sockets"),
1043
1044 Option("ms_tcp_listen_backlog", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1045 .set_default(512)
1046 .set_description("Size of queue of incoming connections for accept(2)"),
1047
1048
1049 Option("ms_connection_ready_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1050 .set_default(10)
1051 .set_description("Time before we declare a not yet ready connection as dead (seconds)"),
1052
1053 Option("ms_connection_idle_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1054 .set_default(900)
1055 .set_description("Time before an idle connection is closed (seconds)"),
1056
1057 Option("ms_pq_max_tokens_per_priority", Option::TYPE_UINT, Option::LEVEL_DEV)
1058 .set_default(16777216)
1059 .set_description(""),
1060
1061 Option("ms_pq_min_cost", Option::TYPE_SIZE, Option::LEVEL_DEV)
1062 .set_default(65536)
1063 .set_description(""),
1064
1065 Option("ms_inject_socket_failures", Option::TYPE_UINT, Option::LEVEL_DEV)
1066 .set_default(0)
1067 .set_description("Inject a socket failure every Nth socket operation"),
1068
1069 Option("ms_inject_delay_type", Option::TYPE_STR, Option::LEVEL_DEV)
1070 .set_default("")
1071 .set_description("Entity type to inject delays for")
1072 .set_flag(Option::FLAG_RUNTIME),
1073
1074 Option("ms_inject_delay_msg_type", Option::TYPE_STR, Option::LEVEL_DEV)
1075 .set_default("")
1076 .set_description("Message type to inject delays for"),
1077
1078 Option("ms_inject_delay_max", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1079 .set_default(1)
1080 .set_description("Max delay to inject"),
1081
1082 Option("ms_inject_delay_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1083 .set_default(0)
1084 .set_description(""),
1085
1086 Option("ms_inject_internal_delays", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1087 .set_default(0)
1088 .set_description("Inject various internal delays to induce races (seconds)"),
1089
1090 Option("ms_blackhole_osd", Option::TYPE_BOOL, Option::LEVEL_DEV)
1091 .set_default(false)
1092 .set_description(""),
1093
1094 Option("ms_blackhole_mon", Option::TYPE_BOOL, Option::LEVEL_DEV)
1095 .set_default(false)
1096 .set_description(""),
1097
1098 Option("ms_blackhole_mds", Option::TYPE_BOOL, Option::LEVEL_DEV)
1099 .set_default(false)
1100 .set_description(""),
1101
1102 Option("ms_blackhole_mgr", Option::TYPE_BOOL, Option::LEVEL_DEV)
1103 .set_default(false)
1104 .set_description(""),
1105
1106 Option("ms_blackhole_client", Option::TYPE_BOOL, Option::LEVEL_DEV)
1107 .set_default(false)
1108 .set_description(""),
1109
1110 Option("ms_dump_on_send", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1111 .set_default(false)
1112 .set_description("Hexdump message to debug log on message send"),
1113
1114 Option("ms_dump_corrupt_message_level", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1115 .set_default(1)
1116 .set_description("Log level at which to hexdump corrupt messages we receive"),
1117
1118 Option("ms_async_op_threads", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1119 .set_default(3)
1120 .set_min_max(1, 24)
1121 .set_description("Threadpool size for AsyncMessenger (ms_type=async)"),
1122
1123 Option("ms_async_max_op_threads", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1124 .set_default(5)
1125 .set_description("Maximum threadpool size of AsyncMessenger")
1126 .add_see_also("ms_async_op_threads"),
1127
1128 Option("ms_async_rdma_device_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1129 .set_default("")
1130 .set_description(""),
1131
1132 Option("ms_async_rdma_enable_hugepage", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1133 .set_default(false)
1134 .set_description(""),
1135
1136 Option("ms_async_rdma_buffer_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
1137 .set_default(128_K)
1138 .set_description(""),
1139
1140 Option("ms_async_rdma_send_buffers", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1141 .set_default(1_K)
1142 .set_description(""),
1143
1144 Option("ms_async_rdma_receive_buffers", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1145 .set_default(32768)
1146 .set_description(""),
1147
1148 Option("ms_async_rdma_receive_queue_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1149 .set_default(4096)
1150 .set_description(""),
1151
1152 Option("ms_async_rdma_support_srq", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1153 .set_default(true)
1154 .set_description(""),
1155
1156 Option("ms_async_rdma_port_num", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1157 .set_default(1)
1158 .set_description(""),
1159
1160 Option("ms_async_rdma_polling_us", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1161 .set_default(1000)
1162 .set_description(""),
1163
1164 Option("ms_async_rdma_gid_idx", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1165 .set_default(0)
1166 .set_description("use gid_idx to select GID for choosing RoCEv1 or RoCEv2"),
1167
1168 Option("ms_async_rdma_local_gid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1169 .set_default("")
1170 .set_description(""),
1171
1172 Option("ms_async_rdma_roce_ver", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1173 .set_default(1)
1174 .set_description(""),
1175
1176 Option("ms_async_rdma_sl", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1177 .set_default(3)
1178 .set_description(""),
1179
1180 Option("ms_async_rdma_dscp", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1181 .set_default(96)
1182 .set_description(""),
1183
1184 Option("ms_max_accept_failures", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1185 .set_default(4)
1186 .set_description("The maximum number of consecutive failed accept() calls before "
1187 "considering the daemon is misconfigured and abort it."),
1188
1189 Option("ms_async_rdma_cm", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1190 .set_default(false)
1191 .set_description(""),
1192
1193 Option("ms_async_rdma_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1194 .set_default("ib")
1195 .set_description(""),
1196
1197 Option("ms_dpdk_port_id", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1198 .set_default(0)
1199 .set_description(""),
1200
1201 Option("ms_dpdk_coremask", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1202 .set_default("0xF") //begin with 0x for the string
1203 .set_description("")
1204 .add_see_also("ms_async_op_threads"),
1205
1206 Option("ms_dpdk_memory_channel", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1207 .set_default("4")
1208 .set_description(""),
1209
1210 Option("ms_dpdk_hugepages", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1211 .set_default("")
1212 .set_description(""),
1213
1214 Option("ms_dpdk_pmd", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1215 .set_default("")
1216 .set_description(""),
1217
1218 Option("ms_dpdk_host_ipv4_addr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1219 .set_default("")
1220 .set_description(""),
1221
1222 Option("ms_dpdk_gateway_ipv4_addr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1223 .set_default("")
1224 .set_description(""),
1225
1226 Option("ms_dpdk_netmask_ipv4_addr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1227 .set_default("")
1228 .set_description(""),
1229
1230 Option("ms_dpdk_lro", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1231 .set_default(true)
1232 .set_description(""),
1233
1234 Option("ms_dpdk_hw_flow_control", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1235 .set_default(true)
1236 .set_description(""),
1237
1238 Option("ms_dpdk_hw_queue_weight", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1239 .set_default(1)
1240 .set_description(""),
1241
1242 Option("ms_dpdk_debug_allow_loopback", Option::TYPE_BOOL, Option::LEVEL_DEV)
1243 .set_default(false)
1244 .set_description(""),
1245
1246 Option("ms_dpdk_rx_buffer_count_per_core", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1247 .set_default(8192)
1248 .set_description(""),
1249
1250 Option("inject_early_sigterm", Option::TYPE_BOOL, Option::LEVEL_DEV)
1251 .set_default(false)
1252 .set_description("send ourselves a SIGTERM early during startup"),
1253
1254 // MON
1255 Option("mon_enable_op_tracker", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1256 .set_default(true)
1257 .add_service("mon")
1258 .set_description("enable/disable MON op tracking"),
1259
1260 Option("mon_op_complaint_time", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
1261 .set_default(30)
1262 .add_service("mon")
1263 .set_description("time after which to consider a monitor operation blocked "
1264 "after no updates"),
1265
1266 Option("mon_op_log_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1267 .set_default(5)
1268 .add_service("mon")
1269 .set_description("max number of slow ops to display"),
1270
1271 Option("mon_op_history_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1272 .set_default(20)
1273 .add_service("mon")
1274 .set_description("max number of completed ops to track"),
1275
1276 Option("mon_op_history_duration", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
1277 .set_default(600)
1278 .add_service("mon")
1279 .set_description("expiration time in seconds of historical MON OPS"),
1280
1281 Option("mon_op_history_slow_op_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1282 .set_default(20)
1283 .add_service("mon")
1284 .set_description("max number of slow historical MON OPS to keep"),
1285
1286 Option("mon_op_history_slow_op_threshold", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
1287 .set_default(10)
1288 .add_service("mon")
1289 .set_description("duration of an op to be considered as a historical slow op"),
1290
1291 Option("mon_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1292 .set_flag(Option::FLAG_NO_MON_UPDATE)
1293 .set_default("/var/lib/ceph/mon/$cluster-$id")
1294 .add_service("mon")
1295 .set_description("path to mon database"),
1296
1297 Option("mon_initial_members", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1298 .set_default("")
1299 .add_service("mon")
1300 .set_flag(Option::FLAG_NO_MON_UPDATE)
1301 .set_flag(Option::FLAG_CLUSTER_CREATE)
1302 .set_description(""),
1303
1304 Option("mon_compact_on_start", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1305 .set_default(false)
1306 .add_service("mon")
1307 .set_description(""),
1308
1309 Option("mon_compact_on_bootstrap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1310 .set_default(false)
1311 .add_service("mon")
1312 .set_description(""),
1313
1314 Option("mon_compact_on_trim", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1315 .set_default(true)
1316 .add_service("mon")
1317 .set_description(""),
1318
1319 /* -- mon: osdmap prune (begin) -- */
1320 Option("mon_osdmap_full_prune_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1321 .set_default(true)
1322 .add_service("mon")
1323 .set_description("enables pruning full osdmap versions when we go over a given number of maps")
1324 .add_see_also("mon_osdmap_full_prune_min")
1325 .add_see_also("mon_osdmap_full_prune_interval")
1326 .add_see_also("mon_osdmap_full_prune_txsize"),
1327
1328 Option("mon_osdmap_full_prune_min", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1329 .set_default(10000)
1330 .add_service("mon")
1331 .set_description("minimum number of versions in the store to trigger full map pruning")
1332 .add_see_also("mon_osdmap_full_prune_enabled")
1333 .add_see_also("mon_osdmap_full_prune_interval")
1334 .add_see_also("mon_osdmap_full_prune_txsize"),
1335
1336 Option("mon_osdmap_full_prune_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1337 .set_default(10)
1338 .add_service("mon")
1339 .set_description("interval between maps that will not be pruned; maps in the middle will be pruned.")
1340 .add_see_also("mon_osdmap_full_prune_enabled")
1341 .add_see_also("mon_osdmap_full_prune_interval")
1342 .add_see_also("mon_osdmap_full_prune_txsize"),
1343
1344 Option("mon_osdmap_full_prune_txsize", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1345 .set_default(100)
1346 .add_service("mon")
1347 .set_description("number of maps we will prune per iteration")
1348 .add_see_also("mon_osdmap_full_prune_enabled")
1349 .add_see_also("mon_osdmap_full_prune_interval")
1350 .add_see_also("mon_osdmap_full_prune_txsize"),
1351 /* -- mon: osdmap prune (end) -- */
1352
1353 Option("mon_osd_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1354 .set_default(500)
1355 .add_service("mon")
1356 .set_description("maximum number of OSDMaps to cache in memory"),
1357
1358 Option("mon_osd_cache_size_min", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
1359 .set_default(128_M)
1360 .add_service("mon")
1361 .set_description("The minimum amount of bytes to be kept mapped in memory for osd monitor caches."),
1362
1363 Option("mon_memory_target", Option::TYPE_SIZE, Option::LEVEL_BASIC)
1364 .set_default(2_G)
1365 .set_flag(Option::FLAG_RUNTIME)
1366 .add_service("mon")
1367 .set_description("The amount of bytes pertaining to osd monitor caches and kv cache to be kept mapped in memory with cache auto-tuning enabled"),
1368
1369 Option("mon_memory_autotune", Option::TYPE_BOOL, Option::LEVEL_BASIC)
1370 .set_default(true)
1371 .set_flag(Option::FLAG_RUNTIME)
1372 .add_service("mon")
1373 .set_description("Autotune the cache memory being used for osd monitors and kv database"),
1374
1375 Option("mon_cpu_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1376 .set_default(4)
1377 .add_service("mon")
1378 .set_description("worker threads for CPU intensive background work"),
1379
1380 Option("mon_osd_mapping_pgs_per_chunk", Option::TYPE_INT, Option::LEVEL_DEV)
1381 .set_default(4096)
1382 .add_service("mon")
1383 .set_description("granularity of PG placement calculation background work"),
1384
1385 Option("mon_clean_pg_upmaps_per_chunk", Option::TYPE_UINT, Option::LEVEL_DEV)
1386 .set_default(256)
1387 .add_service("mon")
1388 .set_description("granularity of PG upmap validation background work"),
1389
1390 Option("mon_osd_max_creating_pgs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1391 .set_default(1024)
1392 .add_service("mon")
1393 .set_description("maximum number of PGs the mon will create at once"),
1394
1395 Option("mon_osd_max_initial_pgs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1396 .set_default(1024)
1397 .add_service("mon")
1398 .set_description("maximum number of PGs a pool will created with")
1399 .set_long_description("If the user specifies more PGs than this, the cluster will subsequently split PGs after the pool is created in order to reach the target."),
1400
1401 Option("mon_tick_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1402 .set_default(5)
1403 .add_service("mon")
1404 .set_description("interval for internal mon background checks"),
1405
1406 Option("mon_session_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1407 .set_default(300)
1408 .add_service("mon")
1409 .set_description("close inactive mon client connections after this many seconds"),
1410
1411 Option("mon_subscribe_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1412 .set_default(1_day)
1413 .add_service("mon")
1414 .set_description("subscribe interval for pre-jewel clients"),
1415
1416 Option("mon_delta_reset_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1417 .set_default(10)
1418 .add_service("mon")
1419 .add_service("mon")
1420 .set_description("window duration for rate calculations in 'ceph status'"),
1421
1422 Option("mon_osd_laggy_halflife", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1423 .set_default(1_hr)
1424 .add_service("mon")
1425 .set_description("halflife of OSD 'lagginess' factor"),
1426
1427 Option("mon_osd_laggy_weight", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1428 .set_default(.3)
1429 .set_min_max(0.0, 1.0)
1430 .add_service("mon")
1431 .set_description("how heavily to weight OSD marking itself back up in overall laggy_probability")
1432 .set_long_description("1.0 means that an OSD marking itself back up (because it was marked down but not actually dead) means a 100% laggy_probability; 0.0 effectively disables tracking of laggy_probability."),
1433
1434 Option("mon_osd_laggy_max_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1435 .set_default(300)
1436 .add_service("mon")
1437 .set_description("cap value for period for OSD to be marked for laggy_interval calculation"),
1438
1439 Option("mon_osd_adjust_heartbeat_grace", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1440 .set_default(true)
1441 .add_service("mon")
1442 .set_description("increase OSD heartbeat grace if peers appear to be laggy")
1443 .set_long_description("If an OSD is marked down but then marks itself back up, it implies it wasn't actually down but was unable to respond to heartbeats. If this option is true, we can use the laggy_probability and laggy_interval values calculated to model this situation to increase the heartbeat grace period for this OSD so that it isn't marked down again. laggy_probability is an estimated probability that the given OSD is down because it is laggy (not actually down), and laggy_interval is an estiate on how long it stays down when it is laggy.")
1444 .add_see_also("mon_osd_laggy_halflife")
1445 .add_see_also("mon_osd_laggy_weight")
1446 .add_see_also("mon_osd_laggy_max_interval"),
1447
1448 Option("mon_osd_adjust_down_out_interval", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1449 .set_default(true)
1450 .add_service("mon")
1451 .set_description("increase the mon_osd_down_out_interval if an OSD appears to be laggy")
1452 .add_see_also("mon_osd_adjust_heartbeat_grace"),
1453
1454 Option("mon_osd_auto_mark_in", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1455 .set_default(false)
1456 .add_service("mon")
1457 .set_description("mark any OSD that comes up 'in'"),
1458
1459 Option("mon_osd_auto_mark_auto_out_in", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1460 .set_default(true)
1461 .add_service("mon")
1462 .set_description("mark any OSD that comes up that was automatically marked 'out' back 'in'")
1463 .add_see_also("mon_osd_down_out_interval"),
1464
1465 Option("mon_osd_auto_mark_new_in", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1466 .set_default(true)
1467 .add_service("mon")
1468 .set_description("mark any new OSD that comes up 'in'"),
1469
1470 Option("mon_osd_destroyed_out_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1471 .set_default(600)
1472 .add_service("mon")
1473 .set_description("mark any OSD 'out' that has been 'destroy'ed for this long (seconds)"),
1474
1475 Option("mon_osd_down_out_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1476 .set_default(600)
1477 .add_service("mon")
1478 .set_description("mark any OSD 'out' that has been 'down' for this long (seconds)"),
1479
1480 Option("mon_osd_down_out_subtree_limit", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1481 .set_default("rack")
1482 .set_flag(Option::FLAG_RUNTIME)
1483 .add_service("mon")
1484 .set_description("do not automatically mark OSDs 'out' if an entire subtree of this size is down")
1485 .add_see_also("mon_osd_down_out_interval"),
1486
1487 Option("mon_osd_min_up_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1488 .set_default(.3)
1489 .add_service("mon")
1490 .set_description("do not automatically mark OSDs 'out' if fewer than this many OSDs are 'up'")
1491 .add_see_also("mon_osd_down_out_interval"),
1492
1493 Option("mon_osd_min_in_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1494 .set_default(.75)
1495 .add_service("mon")
1496 .set_description("do not automatically mark OSDs 'out' if fewer than this many OSDs are 'in'")
1497 .add_see_also("mon_osd_down_out_interval"),
1498
1499 Option("mon_osd_warn_op_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1500 .set_default(32)
1501 .add_service("mgr")
1502 .set_description("issue REQUEST_SLOW health warning if OSD ops are slower than this age (seconds)"),
1503
1504 Option("mon_osd_warn_num_repaired", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1505 .set_default(10)
1506 .add_service("mon")
1507 .set_description("issue OSD_TOO_MANY_REPAIRS health warning if an OSD has more than this many read repairs"),
1508
1509 Option("mon_osd_err_op_age_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1510 .set_default(128)
1511 .add_service("mgr")
1512 .set_description("issue REQUEST_STUCK health error if OSD ops are slower than is age (seconds)"),
1513
1514 Option("mon_osd_prime_pg_temp", Option::TYPE_BOOL, Option::LEVEL_DEV)
1515 .set_default(true)
1516 .add_service("mon")
1517 .set_description("minimize peering work by priming pg_temp values after a map change"),
1518
1519 Option("mon_osd_prime_pg_temp_max_time", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1520 .set_default(.5)
1521 .add_service("mon")
1522 .set_description("maximum time to spend precalculating PG mappings on map change (seconds)"),
1523
1524 Option("mon_osd_prime_pg_temp_max_estimate", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1525 .set_default(.25)
1526 .add_service("mon")
1527 .set_description("calculate all PG mappings if estimated fraction of PGs that change is above this amount"),
1528
1529 Option("mon_stat_smooth_intervals", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1530 .set_default(6)
1531 .set_min(1)
1532 .add_service("mgr")
1533 .set_description("number of PGMaps stats over which we calc the average read/write throughput of the whole cluster"),
1534
1535 Option("mon_election_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1536 .set_default(5)
1537 .add_service("mon")
1538 .set_description("maximum time for a mon election (seconds)"),
1539
1540 Option("mon_lease", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1541 .set_default(5)
1542 .add_service("mon")
1543 .set_description("lease interval between quorum monitors (seconds)")
1544 .set_long_description("This setting controls how sensitive your mon quorum is to intermittent network issues or other failures."),
1545
1546 Option("mon_lease_renew_interval_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1547 .set_default(.6)
1548 .set_min_max((double)0.0, (double).9999999)
1549 .add_service("mon")
1550 .set_description("multiple of mon_lease for the lease renewal interval")
1551 .set_long_description("Leases must be renewed before they time out. A smaller value means frequent renewals, while a value close to 1 makes a lease expiration more likely.")
1552 .add_see_also("mon_lease"),
1553
1554 Option("mon_lease_ack_timeout_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1555 .set_default(2.0)
1556 .set_min_max(1.0001, 100.0)
1557 .add_service("mon")
1558 .set_description("multiple of mon_lease for the lease ack interval before calling new election")
1559 .add_see_also("mon_lease"),
1560
1561 Option("mon_accept_timeout_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1562 .set_default(2.0)
1563 .add_service("mon")
1564 .set_description("multiple of mon_lease for follower mons to accept proposed state changes before calling a new election")
1565 .add_see_also("mon_lease"),
1566
1567 Option("mon_clock_drift_allowed", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1568 .set_default(.050)
1569 .add_service("mon")
1570 .set_description("allowed clock drift (in seconds) between mons before issuing a health warning"),
1571
1572 Option("mon_clock_drift_warn_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1573 .set_default(5)
1574 .add_service("mon")
1575 .set_description("exponential backoff factor for logging clock drift warnings in the cluster log"),
1576
1577 Option("mon_timecheck_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1578 .set_default(300.0)
1579 .add_service("mon")
1580 .set_description("frequency of clock synchronization checks between monitors (seconds)"),
1581
1582 Option("mon_timecheck_skew_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1583 .set_default(30.0)
1584 .add_service("mon")
1585 .set_description("frequency of clock synchronization (re)checks between monitors while clocks are believed to be skewed (seconds)")
1586 .add_see_also("mon_timecheck_interval"),
1587
1588 Option("mon_pg_stuck_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1589 .set_default(60)
1590 .set_description("number of seconds after which pgs can be considered stuck inactive, unclean, etc")
1591 .set_long_description("see doc/control.rst under dump_stuck for more info")
1592 .add_service("mgr"),
1593
1594 Option("mon_pg_warn_min_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1595 .set_default(0)
1596 .add_service("mgr")
1597 .set_description("minimal number PGs per (in) osd before we warn the admin"),
1598
1599 Option("mon_max_pg_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1600 .set_min(1)
1601 .set_default(250)
1602 .add_service("mgr")
1603 .set_description("Max number of PGs per OSD the cluster will allow")
1604 .set_long_description("If the number of PGs per OSD exceeds this, a "
1605 "health warning will be visible in `ceph status`. This is also used "
1606 "in automated PG management, as the threshold at which some pools' "
1607 "pg_num may be shrunk in order to enable increasing the pg_num of "
1608 "others."),
1609
1610 Option("mon_target_pg_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1611 .set_min(1)
1612 .set_default(100)
1613 .set_description("Automated PG management creates this many PGs per OSD")
1614 .set_long_description("When creating pools, the automated PG management "
1615 "logic will attempt to reach this target. In some circumstances, it "
1616 "may exceed this target, up to the ``mon_max_pg_per_osd`` limit. "
1617 "Conversely, a lower number of PGs per OSD may be created if the "
1618 "cluster is not yet fully utilised"),
1619
1620 Option("mon_pg_warn_max_object_skew", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1621 .set_default(10.0)
1622 .set_description("max skew few average in objects per pg")
1623 .add_service("mgr"),
1624
1625 Option("mon_pg_warn_min_objects", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1626 .set_default(10000)
1627 .set_description("do not warn below this object #")
1628 .add_service("mgr"),
1629
1630 Option("mon_pg_warn_min_pool_objects", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1631 .set_default(1000)
1632 .set_description("do not warn on pools below this object #")
1633 .add_service("mgr"),
1634
1635 Option("mon_pg_check_down_all_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1636 .set_default(.5)
1637 .set_description("threshold of down osds after which we check all pgs")
1638 .add_service("mgr"),
1639
1640 Option("mon_cache_target_full_warn_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1641 .set_default(.66)
1642 .add_service("mgr")
1643 .set_flag(Option::FLAG_NO_MON_UPDATE)
1644 .set_flag(Option::FLAG_CLUSTER_CREATE)
1645 .set_description("issue CACHE_POOL_NEAR_FULL health warning when cache pool utilization exceeds this ratio of usable space"),
1646
1647 Option("mon_osd_full_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1648 .set_default(.95)
1649 .set_flag(Option::FLAG_NO_MON_UPDATE)
1650 .set_flag(Option::FLAG_CLUSTER_CREATE)
1651 .set_description("full ratio of OSDs to be set during initial creation of the cluster"),
1652
1653 Option("mon_osd_backfillfull_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1654 .set_default(.90)
1655 .set_flag(Option::FLAG_NO_MON_UPDATE)
1656 .set_flag(Option::FLAG_CLUSTER_CREATE)
1657 .set_description(""),
1658
1659 Option("mon_osd_nearfull_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1660 .set_default(.85)
1661 .set_flag(Option::FLAG_NO_MON_UPDATE)
1662 .set_flag(Option::FLAG_CLUSTER_CREATE)
1663 .set_description("nearfull ratio for OSDs to be set during initial creation of cluster"),
1664
1665 Option("mon_osd_initial_require_min_compat_client", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1666 .set_default("jewel")
1667 .set_flag(Option::FLAG_NO_MON_UPDATE)
1668 .set_flag(Option::FLAG_CLUSTER_CREATE)
1669 .set_description(""),
1670
1671 Option("mon_allow_pool_delete", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1672 .set_default(false)
1673 .add_service("mon")
1674 .set_description("allow pool deletions"),
1675
1676 Option("mon_fake_pool_delete", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1677 .set_default(false)
1678 .add_service("mon")
1679 .set_description("fake pool deletions by renaming the rados pool"),
1680
1681 Option("mon_globalid_prealloc", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1682 .set_default(10000)
1683 .add_service("mon")
1684 .set_description("number of globalid values to preallocate")
1685 .set_long_description("This setting caps how many new clients can authenticate with the cluster before the monitors have to perform a write to preallocate more. Large values burn through the 64-bit ID space more quickly."),
1686
1687 Option("mon_osd_report_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1688 .set_default(900)
1689 .add_service("mon")
1690 .set_description("time before OSDs who do not report to the mons are marked down (seconds)"),
1691
1692 Option("mon_warn_on_msgr2_not_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1693 .set_default(true)
1694 .add_service("mon")
1695 .set_description("issue MON_MSGR2_NOT_ENABLED health warning if monitors are all running Nautilus but not all binding to a msgr2 port")
1696 .add_see_also("ms_bind_msgr2"),
1697
1698 Option("mon_warn_on_legacy_crush_tunables", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1699 .set_default(true)
1700 .add_service("mgr")
1701 .set_description("issue OLD_CRUSH_TUNABLES health warning if CRUSH tunables are older than mon_crush_min_required_version")
1702 .add_see_also("mon_crush_min_required_version"),
1703
1704 Option("mon_crush_min_required_version", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1705 .set_default("hammer")
1706 .add_service("mgr")
1707 .set_description("minimum ceph release to use for mon_warn_on_legacy_crush_tunables")
1708 .add_see_also("mon_warn_on_legacy_crush_tunables"),
1709
1710 Option("mon_warn_on_crush_straw_calc_version_zero", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1711 .set_default(true)
1712 .add_service("mgr")
1713 .set_description("issue OLD_CRUSH_STRAW_CALC_VERSION health warning if the CRUSH map's straw_calc_version is zero"),
1714
1715 Option("mon_warn_on_osd_down_out_interval_zero", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1716 .set_default(true)
1717 .add_service("mgr")
1718 .set_description("issue OSD_NO_DOWN_OUT_INTERVAL health warning if mon_osd_down_out_interval is zero")
1719 .set_long_description("Having mon_osd_down_out_interval set to 0 means that down OSDs are not marked out automatically and the cluster does not heal itself without administrator intervention.")
1720 .add_see_also("mon_osd_down_out_interval"),
1721
1722 Option("mon_warn_on_cache_pools_without_hit_sets", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1723 .set_default(true)
1724 .add_service("mgr")
1725 .set_description("issue CACHE_POOL_NO_HIT_SET health warning for cache pools that do not have hit sets configured"),
1726
1727 Option("mon_warn_on_pool_no_app", Option::TYPE_BOOL, Option::LEVEL_DEV)
1728 .set_default(true)
1729 .add_service("mgr")
1730 .set_description("issue POOL_APP_NOT_ENABLED health warning if pool has not application enabled"),
1731
1732 Option("mon_warn_on_pool_pg_num_not_power_of_two", Option::TYPE_BOOL, Option::LEVEL_DEV)
1733 .set_default(true)
1734 .add_service("mon")
1735 .set_description("issue POOL_PG_NUM_NOT_POWER_OF_TWO warning if pool has a non-power-of-two pg_num value"),
1736
1737 Option("mon_warn_on_pool_no_redundancy", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1738 .set_default(true)
1739 .add_service("mon")
1740 .set_description("Issue a health warning if any pool is configured with no replicas")
1741 .add_see_also("osd_pool_default_size")
1742 .add_see_also("osd_pool_default_min_size"),
1743
1744 Option("mon_warn_on_misplaced", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1745 .set_default(false)
1746 .add_service("mgr")
1747 .set_description("Issue a health warning if there are misplaced objects"),
1748
1749 Option("mon_warn_on_too_few_osds", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1750 .set_default(true)
1751 .add_service("mgr")
1752 .set_description("Issue a health warning if there are fewer OSDs than osd_pool_default_size"),
1753
1754 Option("mon_warn_on_slow_ping_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1755 .set_default(0)
1756 .add_service("mgr")
1757 .set_description("Override mon_warn_on_slow_ping_ratio with specified threshold in milliseconds")
1758 .add_see_also("mon_warn_on_slow_ping_ratio"),
1759
1760 Option("mon_warn_on_slow_ping_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1761 .set_default(.05)
1762 .add_service("mgr")
1763 .set_description("Issue a health warning if heartbeat ping longer than percentage of osd_heartbeat_grace")
1764 .add_see_also("osd_heartbeat_grace")
1765 .add_see_also("mon_warn_on_slow_ping_time"),
1766
1767 Option("mon_max_snap_prune_per_epoch", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1768 .set_default(100)
1769 .add_service("mon")
1770 .set_description("max number of pruned snaps we will process in a single OSDMap epoch"),
1771
1772 Option("mon_min_osdmap_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1773 .set_default(500)
1774 .add_service("mon")
1775 .set_description("min number of OSDMaps to store"),
1776
1777 Option("mon_max_log_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1778 .set_default(500)
1779 .add_service("mon")
1780 .set_description("max number of past cluster log epochs to store"),
1781
1782 Option("mon_max_mdsmap_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1783 .set_default(500)
1784 .add_service("mon")
1785 .set_description("max number of FSMaps/MDSMaps to store"),
1786
1787 Option("mon_max_mgrmap_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1788 .set_default(500)
1789 .add_service("mon")
1790 .set_description("max number of MgrMaps to store"),
1791
1792 Option("mon_max_osd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1793 .set_default(10000)
1794 .add_service("mon")
1795 .set_description("max number of OSDs in a cluster"),
1796
1797 Option("mon_probe_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1798 .set_default(2.0)
1799 .add_service("mon")
1800 .set_description("timeout for querying other mons during bootstrap pre-election phase (seconds)"),
1801
1802 Option("mon_client_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
1803 .set_default(100ul << 20)
1804 .add_service("mon")
1805 .set_description("max bytes of outstanding client messages mon will read off the network"),
1806
1807 Option("mon_daemon_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
1808 .set_default(400ul << 20)
1809 .add_service("mon")
1810 .set_description("max bytes of outstanding mon messages mon will read off the network"),
1811
1812 Option("mon_mgr_proxy_client_bytes_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1813 .set_default(.3)
1814 .add_service("mon")
1815 .set_description("ratio of mon_client_bytes that can be consumed by "
1816 "proxied mgr commands before we error out to client"),
1817
1818 Option("mon_log_max_summary", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1819 .set_default(50)
1820 .add_service("mon")
1821 .set_description("number of recent cluster log messages to retain"),
1822
1823 Option("mon_max_log_entries_per_event", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1824 .set_default(4096)
1825 .add_service("mon")
1826 .set_description("max cluster log entries per paxos event"),
1827
1828 Option("mon_reweight_min_pgs_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1829 .set_default(10)
1830 .add_service("mgr")
1831 .set_description(""),
1832
1833 Option("mon_reweight_min_bytes_per_osd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
1834 .set_default(100_M)
1835 .add_service("mgr")
1836 .set_description(""),
1837
1838 Option("mon_reweight_max_osds", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1839 .set_default(4)
1840 .add_service("mgr")
1841 .set_description(""),
1842
1843 Option("mon_reweight_max_change", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1844 .set_default(0.05)
1845 .add_service("mgr")
1846 .set_description(""),
1847
1848 Option("mon_health_to_clog", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1849 .set_default(true)
1850 .add_service("mon")
1851 .set_description("log monitor health to cluster log"),
1852
1853 Option("mon_health_to_clog_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1854 .set_default(1_hr)
1855 .add_service("mon")
1856 .set_description("frequency to log monitor health to cluster log")
1857 .add_see_also("mon_health_to_clog"),
1858
1859 Option("mon_health_to_clog_tick_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1860 .set_default(60.0)
1861 .add_service("mon")
1862 .set_description(""),
1863
1864 Option("mon_health_max_detail", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1865 .set_default(50)
1866 .add_service("mon")
1867 .set_description("max detailed pgs to report in health detail"),
1868
1869 Option("mon_health_log_update_period", Option::TYPE_INT, Option::LEVEL_DEV)
1870 .set_default(5)
1871 .add_service("mon")
1872 .set_description("minimum time in seconds between log messages about "
1873 "each health check")
1874 .set_min(0),
1875
1876 Option("mon_data_avail_crit", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1877 .set_default(5)
1878 .add_service("mon")
1879 .set_description("issue MON_DISK_CRIT health error when mon available space below this percentage"),
1880
1881 Option("mon_data_avail_warn", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1882 .set_default(30)
1883 .add_service("mon")
1884 .set_description("issue MON_DISK_LOW health warning when mon available space below this percentage"),
1885
1886 Option("mon_data_size_warn", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
1887 .set_default(15_G)
1888 .add_service("mon")
1889 .set_description("issue MON_DISK_BIG health warning when mon database is above this size"),
1890
1891 Option("mon_warn_pg_not_scrubbed_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1892 .set_default(0.5)
1893 .set_min(0)
1894 .set_description("Percentage of the scrub max interval past the scrub max interval to warn")
1895 .set_long_description("")
1896 .add_see_also("osd_scrub_max_interval"),
1897
1898 Option("mon_warn_pg_not_deep_scrubbed_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1899 .set_default(0.75)
1900 .set_min(0)
1901 .set_description("Percentage of the deep scrub interval past the deep scrub interval to warn")
1902 .set_long_description("")
1903 .add_see_also("osd_deep_scrub_interval"),
1904
1905 Option("mon_scrub_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1906 .set_default(1_day)
1907 .add_service("mon")
1908 .set_description("frequency for scrubbing mon database"),
1909
1910 Option("mon_scrub_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1911 .set_default(5_min)
1912 .add_service("mon")
1913 .set_description("timeout to restart scrub of mon quorum participant does not respond for the latest chunk"),
1914
1915 Option("mon_scrub_max_keys", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1916 .set_default(100)
1917 .add_service("mon")
1918 .set_description("max keys per on scrub chunk/step"),
1919
1920 Option("mon_scrub_inject_crc_mismatch", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1921 .set_default(0.0)
1922 .add_service("mon")
1923 .set_description("probability for injecting crc mismatches into mon scrub"),
1924
1925 Option("mon_scrub_inject_missing_keys", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1926 .set_default(0.0)
1927 .add_service("mon")
1928 .set_description("probability for injecting missing keys into mon scrub"),
1929
1930 Option("mon_config_key_max_entry_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
1931 .set_default(64_K)
1932 .add_service("mon")
1933 .set_description("Defines the number of bytes allowed to be held in a "
1934 "single config-key entry"),
1935
1936 Option("mon_sync_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
1937 .set_default(60.0)
1938 .add_service("mon")
1939 .set_description("timeout before canceling sync if syncing mon does not respond"),
1940
1941 Option("mon_sync_max_payload_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
1942 .set_default(1_M)
1943 .add_service("mon")
1944 .set_description("target max message payload for mon sync"),
1945
1946 Option("mon_sync_max_payload_keys", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1947 .set_default(2000)
1948 .add_service("mon")
1949 .set_description("target max keys in message payload for mon sync"),
1950
1951 Option("mon_sync_debug", Option::TYPE_BOOL, Option::LEVEL_DEV)
1952 .set_default(false)
1953 .add_service("mon")
1954 .set_description("enable extra debugging during mon sync"),
1955
1956 Option("mon_inject_sync_get_chunk_delay", Option::TYPE_FLOAT, Option::LEVEL_DEV)
1957 .set_default(0)
1958 .add_service("mon")
1959 .set_description("inject delay during sync (seconds)"),
1960
1961 Option("mon_osd_min_down_reporters", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
1962 .set_default(2)
1963 .add_service("mon")
1964 .set_description("number of OSDs from different subtrees who need to report a down OSD for it to count")
1965 .add_see_also("mon_osd_reporter_subtree_level"),
1966
1967 Option("mon_osd_reporter_subtree_level", Option::TYPE_STR, Option::LEVEL_ADVANCED)
1968 .set_default("host")
1969 .add_service("mon")
1970 .set_flag(Option::FLAG_RUNTIME)
1971 .set_description("in which level of parent bucket the reporters are counted"),
1972
1973 Option("mon_osd_snap_trim_queue_warn_on", Option::TYPE_INT, Option::LEVEL_ADVANCED)
1974 .set_default(32768)
1975 .add_service("mon")
1976 .set_description("Warn when snap trim queue is that large (or larger).")
1977 .set_long_description("Warn when snap trim queue length for at least one PG crosses this value, as this is indicator of snap trimmer not keeping up, wasting disk space"),
1978
1979 Option("mon_osd_force_trim_to", Option::TYPE_INT, Option::LEVEL_DEV)
1980 .set_default(0)
1981 .add_service("mon")
1982 .set_description("force mons to trim osdmaps through this epoch"),
1983
1984 Option("mon_mds_force_trim_to", Option::TYPE_INT, Option::LEVEL_DEV)
1985 .set_default(0)
1986 .add_service("mon")
1987 .set_description("force mons to trim mdsmaps/fsmaps through this epoch"),
1988
1989 Option("mon_mds_skip_sanity", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
1990 .set_default(false)
1991 .add_service("mon")
1992 .set_description("skip sanity checks on fsmap/mdsmap"),
1993
1994 Option("mon_debug_extra_checks", Option::TYPE_BOOL, Option::LEVEL_DEV)
1995 .set_default(false)
1996 .add_service("mon")
1997 .set_description("Enable some additional monitor checks")
1998 .set_long_description(
1999 "Enable some additional monitor checks that would be too expensive "
2000 "to run on production systems, or would only be relevant while "
2001 "testing or debugging."),
2002
2003 Option("mon_debug_block_osdmap_trim", Option::TYPE_BOOL, Option::LEVEL_DEV)
2004 .set_default(false)
2005 .add_service("mon")
2006 .set_description("Block OSDMap trimming while the option is enabled.")
2007 .set_long_description(
2008 "Blocking OSDMap trimming may be quite helpful to easily reproduce "
2009 "states in which the monitor keeps (hundreds of) thousands of "
2010 "osdmaps."),
2011
2012 Option("mon_debug_deprecated_as_obsolete", Option::TYPE_BOOL, Option::LEVEL_DEV)
2013 .set_default(false)
2014 .add_service("mon")
2015 .set_description("treat deprecated mon commands as obsolete"),
2016
2017 Option("mon_debug_dump_transactions", Option::TYPE_BOOL, Option::LEVEL_DEV)
2018 .set_default(false)
2019 .add_service("mon")
2020 .set_description("dump paxos transactions to log")
2021 .add_see_also("mon_debug_dump_location"),
2022
2023 Option("mon_debug_dump_json", Option::TYPE_BOOL, Option::LEVEL_DEV)
2024 .set_default(false)
2025 .add_service("mon")
2026 .set_description("dump paxos transasctions to log as json")
2027 .add_see_also("mon_debug_dump_transactions"),
2028
2029 Option("mon_debug_dump_location", Option::TYPE_STR, Option::LEVEL_DEV)
2030 .set_default("/var/log/ceph/$cluster-$name.tdump")
2031 .add_service("mon")
2032 .set_description("file to dump paxos transactions to")
2033 .add_see_also("mon_debug_dump_transactions"),
2034
2035 Option("mon_debug_no_require_nautilus", Option::TYPE_BOOL, Option::LEVEL_DEV)
2036 .set_default(false)
2037 .add_service("mon")
2038 .set_flag(Option::FLAG_CLUSTER_CREATE)
2039 .set_description("do not set nautilus feature for new mon clusters"),
2040
2041 Option("mon_debug_no_require_octopus", Option::TYPE_BOOL, Option::LEVEL_DEV)
2042 .set_default(false)
2043 .add_service("mon")
2044 .set_flag(Option::FLAG_CLUSTER_CREATE)
2045 .set_description("do not set octopus feature for new mon clusters"),
2046
2047 Option("mon_debug_no_require_bluestore_for_ec_overwrites", Option::TYPE_BOOL, Option::LEVEL_DEV)
2048 .set_default(false)
2049 .add_service("mon")
2050 .set_description("do not require bluestore OSDs to enable EC overwrites on a rados pool"),
2051
2052 Option("mon_debug_no_initial_persistent_features", Option::TYPE_BOOL, Option::LEVEL_DEV)
2053 .set_default(false)
2054 .add_service("mon")
2055 .set_flag(Option::FLAG_CLUSTER_CREATE)
2056 .set_description("do not set any monmap features for new mon clusters"),
2057
2058 Option("mon_inject_transaction_delay_max", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2059 .set_default(10.0)
2060 .add_service("mon")
2061 .set_description("max duration of injected delay in paxos"),
2062
2063 Option("mon_inject_transaction_delay_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2064 .set_default(0)
2065 .add_service("mon")
2066 .set_description("probability of injecting a delay in paxos"),
2067
2068 Option("mon_inject_pg_merge_bounce_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2069 .set_default(0)
2070 .add_service("mon")
2071 .set_description("probability of failing and reverting a pg_num decrement"),
2072
2073 Option("mon_sync_provider_kill_at", Option::TYPE_INT, Option::LEVEL_DEV)
2074 .set_default(0)
2075 .add_service("mon")
2076 .set_description("kill mon sync requester at specific point"),
2077
2078 Option("mon_sync_requester_kill_at", Option::TYPE_INT, Option::LEVEL_DEV)
2079 .set_default(0)
2080 .add_service("mon")
2081 .set_description("kill mon sync requestor at specific point"),
2082
2083 Option("mon_force_quorum_join", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2084 .set_default(false)
2085 .add_service("mon")
2086 .set_description("force mon to rejoin quorum even though it was just removed"),
2087
2088 Option("mon_keyvaluedb", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2089 .set_default("rocksdb")
2090 .set_enum_allowed({"leveldb", "rocksdb"})
2091 .set_flag(Option::FLAG_CREATE)
2092 .add_service("mon")
2093 .set_description("database backend to use for the mon database"),
2094
2095 Option("mon_debug_unsafe_allow_tier_with_nonempty_snaps", Option::TYPE_BOOL, Option::LEVEL_DEV)
2096 .set_default(false)
2097 .add_service("mon")
2098 .set_description(""),
2099
2100 Option("mon_osd_blacklist_default_expire", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2101 .set_default(1_hr)
2102 .add_service("mon")
2103 .set_description("Duration in seconds that blacklist entries for clients "
2104 "remain in the OSD map"),
2105
2106 Option("mon_mds_blacklist_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2107 .set_default(1_day)
2108 .set_min(1_hr)
2109 .add_service("mon")
2110 .set_description("Duration in seconds that blacklist entries for MDS "
2111 "daemons remain in the OSD map")
2112 .set_flag(Option::FLAG_RUNTIME),
2113
2114 Option("mon_mgr_blacklist_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2115 .set_default(1_day)
2116 .set_min(1_hr)
2117 .add_service("mon")
2118 .set_description("Duration in seconds that blacklist entries for mgr "
2119 "daemons remain in the OSD map")
2120 .set_flag(Option::FLAG_RUNTIME),
2121
2122 Option("mon_osd_crush_smoke_test", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2123 .set_default(true)
2124 .add_service("mon")
2125 .set_description("perform a smoke test on any new CRUSH map before accepting changes"),
2126
2127 Option("mon_smart_report_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2128 .set_default(5)
2129 .add_service("mon")
2130 .set_description("Timeout (in seconds) for smarctl to run, default is set to 5"),
2131
2132
2133 // PAXOS
2134
2135 Option("paxos_stash_full_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2136 .set_default(25)
2137 .add_service("mon")
2138 .set_description(""),
2139
2140 Option("paxos_max_join_drift", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2141 .set_default(10)
2142 .add_service("mon")
2143 .set_description(""),
2144
2145 Option("paxos_propose_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2146 .set_default(1.0)
2147 .add_service("mon")
2148 .set_description(""),
2149
2150 Option("paxos_min_wait", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2151 .set_default(0.05)
2152 .add_service("mon")
2153 .set_description(""),
2154
2155 Option("paxos_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2156 .set_default(500)
2157 .add_service("mon")
2158 .set_description(""),
2159
2160 Option("paxos_trim_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2161 .set_default(250)
2162 .add_service("mon")
2163 .set_description(""),
2164
2165 Option("paxos_trim_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2166 .set_default(500)
2167 .add_service("mon")
2168 .set_description(""),
2169
2170 Option("paxos_service_trim_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2171 .set_default(250)
2172 .add_service("mon")
2173 .set_description(""),
2174
2175 Option("paxos_service_trim_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2176 .set_default(500)
2177 .add_service("mon")
2178 .set_description(""),
2179
2180 Option("paxos_kill_at", Option::TYPE_INT, Option::LEVEL_DEV)
2181 .set_default(0)
2182 .add_service("mon")
2183 .set_description(""),
2184
2185
2186 // AUTH
2187
2188 Option("auth_cluster_required", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2189 .set_default("cephx")
2190 .set_description("authentication methods required by the cluster"),
2191
2192 Option("auth_service_required", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2193 .set_default("cephx")
2194 .set_description("authentication methods required by service daemons"),
2195
2196 Option("auth_client_required", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2197 .set_default("cephx, none")
2198 .set_flag(Option::FLAG_MINIMAL_CONF)
2199 .set_description("authentication methods allowed by clients"),
2200
2201 Option("auth_supported", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2202 .set_default("")
2203 .set_description("authentication methods required (deprecated)"),
2204
2205 Option("max_rotating_auth_attempts", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2206 .set_default(10)
2207 .set_description("number of attempts to initialize rotating keys before giving up"),
2208
2209 Option("rotating_keys_bootstrap_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2210 .set_default(30)
2211 .set_description("timeout for obtaining rotating keys during bootstrap phase (seconds)"),
2212
2213 Option("rotating_keys_renewal_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2214 .set_default(10)
2215 .set_description("timeout for updating rotating keys (seconds)"),
2216
2217 Option("cephx_require_signatures", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2218 .set_default(false)
2219 .set_description(""),
2220
2221 Option("cephx_require_version", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2222 .set_default(1)
2223 .set_description("Cephx version required (1 = pre-mimic, 2 = mimic+)"),
2224
2225 Option("cephx_cluster_require_signatures", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2226 .set_default(false)
2227 .set_description(""),
2228
2229 Option("cephx_cluster_require_version", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2230 .set_default(1)
2231 .set_description("Cephx version required by the cluster from clients (1 = pre-mimic, 2 = mimic+)"),
2232
2233 Option("cephx_service_require_signatures", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2234 .set_default(false)
2235 .set_description(""),
2236
2237 Option("cephx_service_require_version", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2238 .set_default(1)
2239 .set_description("Cephx version required from ceph services (1 = pre-mimic, 2 = mimic+)"),
2240
2241 Option("cephx_sign_messages", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2242 .set_default(true)
2243 .set_description(""),
2244
2245 Option("auth_mon_ticket_ttl", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2246 .set_default(12_hr)
2247 .set_description(""),
2248
2249 Option("auth_service_ticket_ttl", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2250 .set_default(1_hr)
2251 .set_description(""),
2252
2253 Option("auth_debug", Option::TYPE_BOOL, Option::LEVEL_DEV)
2254 .set_default(false)
2255 .set_description(""),
2256
2257 Option("mon_client_hunt_parallel", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2258 .set_default(3)
2259 .set_description(""),
2260
2261 Option("mon_client_hunt_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2262 .set_default(3.0)
2263 .set_description(""),
2264
2265 Option("mon_client_log_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2266 .set_default(1.0)
2267 .set_description("How frequently we send queued cluster log messages to mon"),
2268
2269 Option("mon_client_ping_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2270 .set_default(10.0)
2271 .set_description(""),
2272
2273 Option("mon_client_ping_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2274 .set_default(30.0)
2275 .set_description(""),
2276
2277 Option("mon_client_hunt_interval_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2278 .set_default(1.5)
2279 .set_description(""),
2280
2281 Option("mon_client_hunt_interval_min_multiple", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2282 .set_default(1.0)
2283 .set_description(""),
2284
2285 Option("mon_client_hunt_interval_max_multiple", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2286 .set_default(10.0)
2287 .set_description(""),
2288
2289 Option("mon_client_max_log_entries_per_message", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2290 .set_default(1000)
2291 .set_description(""),
2292
2293 Option("mon_client_directed_command_retry", Option::TYPE_INT, Option::LEVEL_DEV)
2294 .set_default(2)
2295 .set_description("Number of times to try sending a comamnd directed at a specific monitor"),
2296
2297 Option("mon_max_pool_pg_num", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2298 .set_default(65536)
2299 .set_description(""),
2300
2301 Option("mon_pool_quota_warn_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2302 .set_default(0)
2303 .set_description("percent of quota at which to issue warnings")
2304 .add_service("mgr"),
2305
2306 Option("mon_pool_quota_crit_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2307 .set_default(0)
2308 .set_description("percent of quota at which to issue errors")
2309 .add_service("mgr"),
2310
2311 Option("crush_location", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2312 .set_default("")
2313 .set_description(""),
2314
2315 Option("crush_location_hook", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2316 .set_default("")
2317 .set_description(""),
2318
2319 Option("crush_location_hook_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2320 .set_default(10)
2321 .set_description(""),
2322
2323 Option("objecter_tick_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2324 .set_default(5.0)
2325 .set_description(""),
2326
2327 Option("objecter_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2328 .set_default(10.0)
2329 .set_description("Seconds before in-flight op is considered 'laggy' and we query mon for the latest OSDMap"),
2330
2331 Option("objecter_inflight_op_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2332 .set_default(100_M)
2333 .set_description("Max in-flight data in bytes (both directions)"),
2334
2335 Option("objecter_inflight_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2336 .set_default(1024)
2337 .set_description("Max in-flight operations"),
2338
2339 Option("objecter_completion_locks_per_session", Option::TYPE_UINT, Option::LEVEL_DEV)
2340 .set_default(32)
2341 .set_description(""),
2342
2343 Option("objecter_inject_no_watch_ping", Option::TYPE_BOOL, Option::LEVEL_DEV)
2344 .set_default(false)
2345 .set_description(""),
2346
2347 Option("objecter_retry_writes_after_first_reply", Option::TYPE_BOOL, Option::LEVEL_DEV)
2348 .set_default(false)
2349 .set_description(""),
2350
2351 Option("objecter_debug_inject_relock_delay", Option::TYPE_BOOL, Option::LEVEL_DEV)
2352 .set_default(false)
2353 .set_description(""),
2354
2355 Option("filer_max_purge_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2356 .set_default(10)
2357 .set_description("Max in-flight operations for purging a striped range (e.g., MDS journal)"),
2358
2359 Option("filer_max_truncate_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2360 .set_default(128)
2361 .set_description("Max in-flight operations for truncating/deleting a striped sequence (e.g., MDS journal)"),
2362
2363 Option("journaler_write_head_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2364 .set_default(15)
2365 .set_description("Interval in seconds between journal header updates (to help bound replay time)"),
2366
2367 // * journal object size
2368 Option("journaler_prefetch_periods", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2369 .set_default(10)
2370 .set_min(2) // we need at least 2 periods to make progress.
2371 .set_description("Number of striping periods to prefetch while reading MDS journal"),
2372
2373 // * journal object size
2374 Option("journaler_prezero_periods", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2375 .set_default(5)
2376 // we need to zero at least two periods, minimum, to ensure that we
2377 // have a full empty object/period in front of us.
2378 .set_min(2)
2379 .set_description("Number of striping periods to zero head of MDS journal write position"),
2380
2381 // -- OSD --
2382 Option("osd_calc_pg_upmaps_aggressively", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2383 .set_default(true)
2384 .set_flag(Option::FLAG_RUNTIME)
2385 .set_description("try to calculate PG upmaps more aggressively, e.g., "
2386 "by doing a fairly exhaustive search of existing PGs "
2387 "that can be unmapped or upmapped"),
2388
2389 Option("osd_calc_pg_upmaps_local_fallback_retries", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2390 .set_default(100)
2391 .set_flag(Option::FLAG_RUNTIME)
2392 .set_description("Maximum number of PGs we can attempt to unmap or upmap "
2393 "for a specific overfull or underfull osd per iteration "),
2394
2395 Option("osd_numa_prefer_iface", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2396 .set_default(true)
2397 .set_flag(Option::FLAG_STARTUP)
2398 .set_description("prefer IP on network interface on same numa node as storage")
2399 .add_see_also("osd_numa_auto_affinity"),
2400
2401 Option("osd_numa_auto_affinity", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2402 .set_default(true)
2403 .set_flag(Option::FLAG_STARTUP)
2404 .set_description("automatically set affinity to numa node when storage and network match"),
2405
2406 Option("osd_numa_node", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2407 .set_default(-1)
2408 .set_flag(Option::FLAG_STARTUP)
2409 .set_description("set affinity to a numa node (-1 for none)")
2410 .add_see_also("osd_numa_auto_affinity"),
2411
2412 Option("osd_smart_report_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2413 .set_default(5)
2414 .set_description("Timeout (in seconds) for smarctl to run, default is set to 5"),
2415
2416 Option("osd_check_max_object_name_len_on_startup", Option::TYPE_BOOL, Option::LEVEL_DEV)
2417 .set_default(true)
2418 .set_description(""),
2419
2420 Option("osd_max_backfills", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2421 .set_default(1)
2422 .set_description("Maximum number of concurrent local and remote backfills or recoveries per OSD ")
2423 .set_long_description("There can be osd_max_backfills local reservations AND the same remote reservations per OSD. So a value of 1 lets this OSD participate as 1 PG primary in recovery and 1 shard of another recovering PG."),
2424
2425 Option("osd_min_recovery_priority", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2426 .set_default(0)
2427 .set_description("Minimum priority below which recovery is not performed")
2428 .set_long_description("The purpose here is to prevent the cluster from doing *any* lower priority work (e.g., rebalancing) below this threshold and focus solely on higher priority work (e.g., replicating degraded objects)."),
2429
2430 Option("osd_backfill_retry_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2431 .set_default(30.0)
2432 .set_description("how frequently to retry backfill reservations after being denied (e.g., due to a full OSD)"),
2433
2434 Option("osd_recovery_retry_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2435 .set_default(30.0)
2436 .set_description("how frequently to retry recovery reservations after being denied (e.g., due to a full OSD)"),
2437
2438 Option("osd_agent_max_ops", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2439 .set_default(4)
2440 .set_description("maximum concurrent tiering operations for tiering agent"),
2441
2442 Option("osd_agent_max_low_ops", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2443 .set_default(2)
2444 .set_description("maximum concurrent low-priority tiering operations for tiering agent"),
2445
2446 Option("osd_agent_min_evict_effort", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2447 .set_default(.1)
2448 .set_min_max(0.0, .99)
2449 .set_description("minimum effort to expend evicting clean objects"),
2450
2451 Option("osd_agent_quantize_effort", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2452 .set_default(.1)
2453 .set_description("size of quantize unit for eviction effort"),
2454
2455 Option("osd_agent_delay_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2456 .set_default(5.0)
2457 .set_description("how long agent should sleep if it has no work to do"),
2458
2459 Option("osd_find_best_info_ignore_history_les", Option::TYPE_BOOL, Option::LEVEL_DEV)
2460 .set_default(false)
2461 .set_description("ignore last_epoch_started value when peering AND PROBABLY LOSE DATA")
2462 .set_long_description("THIS IS AN EXTREMELY DANGEROUS OPTION THAT SHOULD ONLY BE USED AT THE DIRECTION OF A DEVELOPER. It makes peering ignore the last_epoch_started value when peering, which can allow the OSD to believe an OSD has an authoritative view of a PG's contents even when it is in fact old and stale, typically leading to data loss (by believing a stale PG is up to date)."),
2463
2464 Option("osd_agent_hist_halflife", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2465 .set_default(1000)
2466 .set_description("halflife of agent atime and temp histograms"),
2467
2468 Option("osd_agent_slop", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2469 .set_default(.02)
2470 .set_description("slop factor to avoid switching tiering flush and eviction mode"),
2471
2472 Option("osd_uuid", Option::TYPE_UUID, Option::LEVEL_ADVANCED)
2473 .set_default(uuid_d())
2474 .set_flag(Option::FLAG_CREATE)
2475 .set_description("uuid label for a new OSD"),
2476
2477 Option("osd_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2478 .set_default("/var/lib/ceph/osd/$cluster-$id")
2479 .set_flag(Option::FLAG_NO_MON_UPDATE)
2480 .set_description("path to OSD data"),
2481
2482 Option("osd_journal", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2483 .set_default("/var/lib/ceph/osd/$cluster-$id/journal")
2484 .set_flag(Option::FLAG_NO_MON_UPDATE)
2485 .set_description("path to OSD journal (when FileStore backend is in use)"),
2486
2487 Option("osd_journal_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2488 .set_default(5120)
2489 .set_flag(Option::FLAG_CREATE)
2490 .set_description("size of FileStore journal (in MiB)"),
2491
2492 Option("osd_journal_flush_on_shutdown", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2493 .set_default(true)
2494 .set_description("flush FileStore journal contents during clean OSD shutdown"),
2495
2496 Option("osd_os_flags", Option::TYPE_UINT, Option::LEVEL_DEV)
2497 .set_default(0)
2498 .set_description("flags to skip filestore omap or journal initialization"),
2499
2500 Option("osd_max_write_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2501 .set_min(4)
2502 .set_default(90)
2503 .set_description("Maximum size of a RADOS write operation in megabytes")
2504 .set_long_description("This setting prevents clients from doing "
2505 "very large writes to RADOS. If you set this to a value "
2506 "below what clients expect, they will receive an error "
2507 "when attempting to write to the cluster."),
2508
2509 Option("osd_max_pgls", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2510 .set_default(1024)
2511 .set_description("maximum number of results when listing objects in a pool"),
2512
2513 Option("osd_client_message_size_cap", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2514 .set_default(500_M)
2515 .set_description("maximum memory to devote to in-flight client requests")
2516 .set_long_description("If this value is exceeded, the OSD will not read any new client data off of the network until memory is freed."),
2517
2518 Option("osd_client_message_cap", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2519 .set_default(0)
2520 .set_description("maximum number of in-flight client requests"),
2521
2522 Option("osd_crush_update_weight_set", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2523 .set_default(true)
2524 .set_description("update CRUSH weight-set weights when updating weights")
2525 .set_long_description("If this setting is true, we will update the weight-set weights when adjusting an item's weight, effectively making changes take effect immediately, and discarding any previous optimization in the weight-set value. Setting this value to false will leave it to the balancer to (slowly, presumably) adjust weights to approach the new target value."),
2526
2527 Option("osd_crush_chooseleaf_type", Option::TYPE_INT, Option::LEVEL_DEV)
2528 .set_default(1)
2529 .set_flag(Option::FLAG_CLUSTER_CREATE)
2530 .set_description("default chooseleaf type for osdmaptool --create"),
2531
2532 Option("osd_pool_use_gmt_hitset", Option::TYPE_BOOL, Option::LEVEL_DEV)
2533 .set_default(true)
2534 .set_description("use UTC for hitset timestamps")
2535 .set_long_description("This setting only exists for compatibility with hammer (and older) clusters."),
2536
2537 Option("osd_crush_update_on_start", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2538 .set_default(true)
2539 .set_description("update OSD CRUSH location on startup"),
2540
2541 Option("osd_class_update_on_start", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2542 .set_default(true)
2543 .set_description("set OSD device class on startup"),
2544
2545 Option("osd_crush_initial_weight", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2546 .set_default(-1)
2547 .set_description("if >= 0, initial CRUSH weight for newly created OSDs")
2548 .set_long_description("If this value is negative, the size of the OSD in TiB is used."),
2549
2550 Option("osd_pool_default_ec_fast_read", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2551 .set_default(false)
2552 .set_description("set ec_fast_read for new erasure-coded pools")
2553 .add_service("mon"),
2554
2555 Option("osd_pool_default_crush_rule", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2556 .set_default(-1)
2557 .set_description("CRUSH rule for newly created pools")
2558 .add_service("mon"),
2559
2560 Option("osd_pool_erasure_code_stripe_unit", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2561 .set_default(4_K)
2562 .set_description("the amount of data (in bytes) in a data chunk, per stripe")
2563 .add_service("mon"),
2564
2565 Option("osd_pool_default_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2566 .set_default(3)
2567 .set_min_max(0, 10)
2568 .set_flag(Option::FLAG_RUNTIME)
2569 .set_description("the number of copies of an object for new replicated pools")
2570 .add_service("mon"),
2571
2572 Option("osd_pool_default_min_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2573 .set_default(0)
2574 .set_min_max(0, 255)
2575 .set_flag(Option::FLAG_RUNTIME)
2576 .set_description("the minimal number of copies allowed to write to a degraded pool for new replicated pools")
2577 .set_long_description("0 means no specific default; ceph will use size-size/2")
2578 .add_see_also("osd_pool_default_size")
2579 .add_service("mon"),
2580
2581 Option("osd_pool_default_pg_num", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2582 .set_default(32)
2583 .set_description("number of PGs for new pools")
2584 .set_flag(Option::FLAG_RUNTIME)
2585 .add_service("mon"),
2586
2587 Option("osd_pool_default_pgp_num", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2588 .set_default(0)
2589 .set_description("number of PGs for placement purposes (0 to match pg_num)")
2590 .add_see_also("osd_pool_default_pg_num")
2591 .set_flag(Option::FLAG_RUNTIME)
2592 .add_service("mon"),
2593
2594 Option("osd_pool_default_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2595 .set_default("replicated")
2596 .set_enum_allowed({"replicated", "erasure"})
2597 .set_flag(Option::FLAG_RUNTIME)
2598 .set_description("default type of pool to create")
2599 .add_service("mon"),
2600
2601 Option("osd_pool_default_erasure_code_profile", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2602 .set_default("plugin=jerasure technique=reed_sol_van k=2 m=2")
2603 .set_flag(Option::FLAG_RUNTIME)
2604 .set_description("default erasure code profile for new erasure-coded pools")
2605 .add_service("mon"),
2606
2607 Option("osd_erasure_code_plugins", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2608 .set_default("jerasure lrc"
2609 #ifdef HAVE_BETTER_YASM_ELF64
2610 " isa"
2611 #endif
2612 )
2613 .set_flag(Option::FLAG_STARTUP)
2614 .set_description("erasure code plugins to load")
2615 .add_service("mon")
2616 .add_service("osd"),
2617
2618 Option("osd_allow_recovery_below_min_size", Option::TYPE_BOOL, Option::LEVEL_DEV)
2619 .set_default(true)
2620 .set_description("allow replicated pools to recover with < min_size active members")
2621 .add_service("osd"),
2622
2623 Option("osd_pool_default_flags", Option::TYPE_INT, Option::LEVEL_DEV)
2624 .set_default(0)
2625 .set_description("(integer) flags to set on new pools")
2626 .add_service("mon"),
2627
2628 Option("osd_pool_default_flag_hashpspool", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2629 .set_default(true)
2630 .set_description("set hashpspool (better hashing scheme) flag on new pools")
2631 .add_service("mon"),
2632
2633 Option("osd_pool_default_flag_nodelete", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2634 .set_default(false)
2635 .set_description("set nodelete flag on new pools")
2636 .add_service("mon"),
2637
2638 Option("osd_pool_default_flag_nopgchange", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2639 .set_default(false)
2640 .set_description("set nopgchange flag on new pools")
2641 .add_service("mon"),
2642
2643 Option("osd_pool_default_flag_nosizechange", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2644 .set_default(false)
2645 .set_description("set nosizechange flag on new pools")
2646 .add_service("mon"),
2647
2648 Option("osd_pool_default_hit_set_bloom_fpp", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2649 .set_default(.05)
2650 .set_description("")
2651 .add_see_also("osd_tier_default_cache_hit_set_type")
2652 .add_service("mon"),
2653
2654 Option("osd_pool_default_cache_target_dirty_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2655 .set_default(.4)
2656 .set_description(""),
2657
2658 Option("osd_pool_default_cache_target_dirty_high_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2659 .set_default(.6)
2660 .set_description(""),
2661
2662 Option("osd_pool_default_cache_target_full_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2663 .set_default(.8)
2664 .set_description(""),
2665
2666 Option("osd_pool_default_cache_min_flush_age", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2667 .set_default(0)
2668 .set_description(""),
2669
2670 Option("osd_pool_default_cache_min_evict_age", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2671 .set_default(0)
2672 .set_description(""),
2673
2674 Option("osd_pool_default_cache_max_evict_check_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2675 .set_default(10)
2676 .set_description(""),
2677
2678 Option("osd_pool_default_pg_autoscale_mode", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2679 .set_default("on")
2680 .set_flag(Option::FLAG_RUNTIME)
2681 .set_enum_allowed({"off", "warn", "on"})
2682 .set_description("Default PG autoscaling behavior for new pools"),
2683
2684 Option("osd_pool_default_read_lease_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2685 .set_default(.8)
2686 .set_flag(Option::FLAG_RUNTIME)
2687 .set_description("Default read_lease_ratio for a pool, as a multiple of osd_heartbeat_grace")
2688 .set_long_description("This should be <= 1.0 so that the read lease will have expired by the time we decide to mark a peer OSD down.")
2689 .add_see_also("osd_heartbeat_grace"),
2690
2691 Option("osd_hit_set_min_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2692 .set_default(1000)
2693 .set_description(""),
2694
2695 Option("osd_hit_set_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2696 .set_default(100000)
2697 .set_description(""),
2698
2699 Option("osd_hit_set_namespace", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2700 .set_default(".ceph-internal")
2701 .set_description(""),
2702
2703 Option("osd_tier_promote_max_objects_sec", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2704 .set_default(25)
2705 .set_description(""),
2706
2707 Option("osd_tier_promote_max_bytes_sec", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2708 .set_default(5_M)
2709 .set_description(""),
2710
2711 Option("osd_tier_default_cache_mode", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2712 .set_default("writeback")
2713 .set_enum_allowed({"none", "writeback", "forward",
2714 "readonly", "readforward", "readproxy", "proxy"})
2715 .set_flag(Option::FLAG_RUNTIME)
2716 .set_description(""),
2717
2718 Option("osd_tier_default_cache_hit_set_count", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2719 .set_default(4)
2720 .set_description(""),
2721
2722 Option("osd_tier_default_cache_hit_set_period", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2723 .set_default(1200)
2724 .set_description(""),
2725
2726 Option("osd_tier_default_cache_hit_set_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2727 .set_default("bloom")
2728 .set_enum_allowed({"bloom", "explicit_hash", "explicit_object"})
2729 .set_flag(Option::FLAG_RUNTIME)
2730 .set_description(""),
2731
2732 Option("osd_tier_default_cache_min_read_recency_for_promote", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2733 .set_default(1)
2734 .set_description("number of recent HitSets the object must appear in to be promoted (on read)"),
2735
2736 Option("osd_tier_default_cache_min_write_recency_for_promote", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2737 .set_default(1)
2738 .set_description("number of recent HitSets the object must appear in to be promoted (on write)"),
2739
2740 Option("osd_tier_default_cache_hit_set_grade_decay_rate", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2741 .set_default(20)
2742 .set_description(""),
2743
2744 Option("osd_tier_default_cache_hit_set_search_last_n", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2745 .set_default(1)
2746 .set_description(""),
2747
2748 Option("osd_objecter_finishers", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2749 .set_default(1)
2750 .set_flag(Option::FLAG_STARTUP)
2751 .set_description(""),
2752
2753 Option("osd_map_dedup", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2754 .set_default(true)
2755 .set_description(""),
2756
2757 Option("osd_map_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2758 .set_default(50)
2759 .set_description(""),
2760
2761 Option("osd_map_message_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2762 .set_default(40)
2763 .set_description("maximum number of OSDMaps to include in a single message"),
2764
2765 Option("osd_map_message_max_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2766 .set_default(10_M)
2767 .set_description("maximum number of bytes worth of OSDMaps to include in a single message"),
2768
2769 Option("osd_map_share_max_epochs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2770 .set_default(40)
2771 .set_description(""),
2772
2773 Option("osd_pg_epoch_max_lag_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2774 .set_default(2.0)
2775 .set_description("Max multiple of the map cache that PGs can lag before we throttle map injest")
2776 .add_see_also("osd_map_cache_size"),
2777
2778 Option("osd_inject_bad_map_crc_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
2779 .set_default(0)
2780 .set_description(""),
2781
2782 Option("osd_inject_failure_on_pg_removal", Option::TYPE_BOOL, Option::LEVEL_DEV)
2783 .set_default(false)
2784 .set_description(""),
2785
2786 Option("osd_max_markdown_period", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2787 .set_default(600)
2788 .set_description(""),
2789
2790 Option("osd_max_markdown_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2791 .set_default(5)
2792 .set_description(""),
2793
2794 Option("osd_op_pq_max_tokens_per_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2795 .set_default(4194304)
2796 .set_description(""),
2797
2798 Option("osd_op_pq_min_cost", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2799 .set_default(65536)
2800 .set_description(""),
2801
2802 Option("osd_recover_clone_overlap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2803 .set_default(true)
2804 .set_description(""),
2805
2806 Option("osd_num_cache_shards", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
2807 .set_default(32)
2808 .set_flag(Option::FLAG_STARTUP)
2809 .set_description("The number of cache shards to use in the object store."),
2810
2811 Option("osd_op_num_threads_per_shard", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2812 .set_default(0)
2813 .set_flag(Option::FLAG_STARTUP)
2814 .set_description(""),
2815
2816 Option("osd_op_num_threads_per_shard_hdd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2817 .set_default(1)
2818 .set_flag(Option::FLAG_STARTUP)
2819 .set_description("")
2820 .add_see_also("osd_op_num_threads_per_shard"),
2821
2822 Option("osd_op_num_threads_per_shard_ssd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2823 .set_default(2)
2824 .set_flag(Option::FLAG_STARTUP)
2825 .set_description("")
2826 .add_see_also("osd_op_num_threads_per_shard"),
2827
2828 Option("osd_op_num_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2829 .set_default(0)
2830 .set_flag(Option::FLAG_STARTUP)
2831 .set_description(""),
2832
2833 Option("osd_op_num_shards_hdd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2834 .set_default(5)
2835 .set_flag(Option::FLAG_STARTUP)
2836 .set_description("")
2837 .add_see_also("osd_op_num_shards"),
2838
2839 Option("osd_op_num_shards_ssd", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2840 .set_default(8)
2841 .set_flag(Option::FLAG_STARTUP)
2842 .set_description("")
2843 .add_see_also("osd_op_num_shards"),
2844
2845 Option("osd_skip_data_digest", Option::TYPE_BOOL, Option::LEVEL_DEV)
2846 .set_default(false)
2847 .set_description("Do not store full-object checksums if the backend (bluestore) does its own checksums. Only usable with all BlueStore OSDs."),
2848
2849 Option("osd_op_queue", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2850 .set_default("wpq")
2851 .set_enum_allowed( { "wpq", "prioritized",
2852 "mclock_opclass", "mclock_client", "mclock_scheduler",
2853 "debug_random" } )
2854 .set_description("which operation priority queue algorithm to use")
2855 .set_long_description("which operation priority queue algorithm to use; "
2856 "mclock_opclass mclock_client, and "
2857 "mclock_client_profile are currently experimental")
2858 .add_see_also("osd_op_queue_cut_off"),
2859
2860 Option("osd_op_queue_cut_off", Option::TYPE_STR, Option::LEVEL_ADVANCED)
2861 .set_default("high")
2862 .set_enum_allowed( { "low", "high", "debug_random" } )
2863 .set_description("the threshold between high priority ops and low priority ops")
2864 .set_long_description("the threshold between high priority ops that use strict priority ordering and low priority ops that use a fairness algorithm that may or may not incorporate priority")
2865 .add_see_also("osd_op_queue"),
2866
2867 Option("osd_mclock_scheduler_client_res", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2868 .set_default(1)
2869 .set_description("IO proportion reserved for each client (default)")
2870 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2871 .add_see_also("osd_op_queue"),
2872
2873 Option("osd_mclock_scheduler_client_wgt", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2874 .set_default(1)
2875 .set_description("IO share for each client (default) over reservation")
2876 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2877 .add_see_also("osd_op_queue"),
2878
2879 Option("osd_mclock_scheduler_client_lim", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2880 .set_default(999999)
2881 .set_description("IO limit for each client (default) over reservation")
2882 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2883 .add_see_also("osd_op_queue"),
2884
2885 Option("osd_mclock_scheduler_background_recovery_res", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2886 .set_default(1)
2887 .set_description("IO proportion reserved for background recovery (default)")
2888 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2889 .add_see_also("osd_op_queue"),
2890
2891 Option("osd_mclock_scheduler_background_recovery_wgt", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2892 .set_default(1)
2893 .set_description("IO share for each background recovery over reservation")
2894 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2895 .add_see_also("osd_op_queue"),
2896
2897 Option("osd_mclock_scheduler_background_recovery_lim", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2898 .set_default(999999)
2899 .set_description("IO limit for background recovery over reservation")
2900 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2901 .add_see_also("osd_op_queue"),
2902
2903 Option("osd_mclock_scheduler_background_best_effort_res", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2904 .set_default(1)
2905 .set_description("IO proportion reserved for background best_effort (default)")
2906 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2907 .add_see_also("osd_op_queue"),
2908
2909 Option("osd_mclock_scheduler_background_best_effort_wgt", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2910 .set_default(1)
2911 .set_description("IO share for each background best_effort over reservation")
2912 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2913 .add_see_also("osd_op_queue"),
2914
2915 Option("osd_mclock_scheduler_background_best_effort_lim", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2916 .set_default(999999)
2917 .set_description("IO limit for background best_effort over reservation")
2918 .set_long_description("Only considered for osd_op_queue = mClockScheduler")
2919 .add_see_also("osd_op_queue"),
2920
2921 Option("osd_mclock_scheduler_anticipation_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2922 .set_default(0.0)
2923 .set_description("mclock anticipation timeout in seconds")
2924 .set_long_description("the amount of time that mclock waits until the unused resource is forfeited"),
2925
2926 Option("osd_ignore_stale_divergent_priors", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2927 .set_default(false)
2928 .set_description(""),
2929
2930 Option("osd_read_ec_check_for_errors", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2931 .set_default(false)
2932 .set_description(""),
2933
2934 // Only use clone_overlap for recovery if there are fewer than
2935 // osd_recover_clone_overlap_limit entries in the overlap set
2936 Option("osd_recover_clone_overlap_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
2937 .set_default(10)
2938 .set_description("")
2939 .set_flag(Option::FLAG_RUNTIME),
2940
2941 Option("osd_debug_feed_pullee", Option::TYPE_INT, Option::LEVEL_DEV)
2942 .set_default(-1)
2943 .set_description("Feed a pullee, and force primary to pull "
2944 "a currently missing object from it"),
2945
2946 Option("osd_backfill_scan_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2947 .set_default(64)
2948 .set_description(""),
2949
2950 Option("osd_backfill_scan_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2951 .set_default(512)
2952 .set_description(""),
2953
2954 Option("osd_op_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2955 .set_default(15)
2956 .set_description(""),
2957
2958 Option("osd_op_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
2959 .set_default(150)
2960 .set_description(""),
2961
2962 Option("osd_recovery_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2963 .set_default(0)
2964 .set_description("Time in seconds to sleep before next recovery or backfill op"),
2965
2966 Option("osd_recovery_sleep_hdd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2967 .set_default(0.1)
2968 .set_description("Time in seconds to sleep before next recovery or backfill op for HDDs"),
2969
2970 Option("osd_recovery_sleep_ssd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2971 .set_default(0)
2972 .set_description("Time in seconds to sleep before next recovery or backfill op for SSDs")
2973 .add_see_also("osd_recovery_sleep"),
2974
2975 Option("osd_recovery_sleep_hybrid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2976 .set_default(0.025)
2977 .set_description("Time in seconds to sleep before next recovery or backfill op when data is on HDD and journal is on SSD")
2978 .add_see_also("osd_recovery_sleep"),
2979
2980 Option("osd_snap_trim_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2981 .set_default(0)
2982 .set_description("Time in seconds to sleep before next snap trim (overrides values below)"),
2983
2984 Option("osd_snap_trim_sleep_hdd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2985 .set_default(5)
2986 .set_description("Time in seconds to sleep before next snap trim for HDDs"),
2987
2988 Option("osd_snap_trim_sleep_ssd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2989 .set_default(0)
2990 .set_description("Time in seconds to sleep before next snap trim for SSDs"),
2991
2992 Option("osd_snap_trim_sleep_hybrid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
2993 .set_default(2)
2994 .set_description("Time in seconds to sleep before next snap trim when data is on HDD and journal is on SSD"),
2995
2996 Option("osd_scrub_invalid_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
2997 .set_default(true)
2998 .set_description(""),
2999
3000 Option("osd_command_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3001 .set_default(10_min)
3002 .set_description(""),
3003
3004 Option("osd_command_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3005 .set_default(15_min)
3006 .set_description(""),
3007
3008 Option("osd_heartbeat_interval", Option::TYPE_INT, Option::LEVEL_DEV)
3009 .set_default(6)
3010 .set_min_max(1, 60)
3011 .set_description("Interval (in seconds) between peer pings"),
3012
3013 Option("osd_heartbeat_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3014 .set_default(20)
3015 .set_description(""),
3016
3017 Option("osd_heartbeat_stale", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3018 .set_default(600)
3019 .set_description("Interval (in seconds) we mark an unresponsive heartbeat peer as stale.")
3020 .set_long_description("Automatically mark unresponsive heartbeat sessions as stale and tear them down. "
3021 "The primary benefit is that OSD doesn't need to keep a flood of "
3022 "blocked heartbeat messages around in memory."),
3023
3024 Option("osd_heartbeat_min_peers", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3025 .set_default(10)
3026 .set_description(""),
3027
3028 Option("osd_heartbeat_use_min_delay_socket", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3029 .set_default(false)
3030 .set_description(""),
3031
3032 Option("osd_heartbeat_min_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3033 .set_default(2000)
3034 .set_description("Minimum heartbeat packet size in bytes. Will add dummy payload if heartbeat packet is smaller than this."),
3035
3036 Option("osd_pg_max_concurrent_snap_trims", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3037 .set_default(2)
3038 .set_description(""),
3039
3040 Option("osd_max_trimming_pgs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3041 .set_default(2)
3042 .set_description(""),
3043
3044 Option("osd_heartbeat_min_healthy_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3045 .set_default(.33)
3046 .set_description(""),
3047
3048 Option("osd_mon_heartbeat_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3049 .set_default(30)
3050 .set_description(""),
3051
3052 Option("osd_mon_heartbeat_stat_stale", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3053 .set_default(1_hr)
3054 .set_description("Stop reporting on heartbeat ping times not updated for this many seconds.")
3055 .set_long_description("Stop reporting on old heartbeat information unless this is set to zero"),
3056
3057 Option("osd_mon_report_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3058 .set_default(5)
3059 .set_description("Frequency of OSD reports to mon for peer failures, fullness status changes"),
3060
3061 Option("osd_mon_report_max_in_flight", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3062 .set_default(2)
3063 .set_description(""),
3064
3065 Option("osd_beacon_report_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3066 .set_default(300)
3067 .set_description(""),
3068
3069 Option("osd_pg_stat_report_interval_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3070 .set_default(500)
3071 .set_description(""),
3072
3073 Option("osd_mon_ack_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3074 .set_default(30.0)
3075 .set_description(""),
3076
3077 Option("osd_stats_ack_timeout_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3078 .set_default(2.0)
3079 .set_description(""),
3080
3081 Option("osd_stats_ack_timeout_decay", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3082 .set_default(.9)
3083 .set_description(""),
3084
3085 Option("osd_max_snap_prune_intervals_per_epoch", Option::TYPE_UINT, Option::LEVEL_DEV)
3086 .set_default(512)
3087 .set_description("Max number of snap intervals to report to mgr in pg_stat_t"),
3088
3089 Option("osd_default_data_pool_replay_window", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3090 .set_default(45)
3091 .set_description(""),
3092
3093 Option("osd_auto_mark_unfound_lost", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3094 .set_default(false)
3095 .set_description(""),
3096
3097 Option("osd_recovery_delay_start", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3098 .set_default(0)
3099 .set_description(""),
3100
3101 Option("osd_recovery_max_active", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3102 .set_default(0)
3103 .set_description("Number of simultaneous active recovery operations per OSD (overrides _ssd and _hdd if non-zero)")
3104 .add_see_also("osd_recovery_max_active_hdd")
3105 .add_see_also("osd_recovery_max_active_ssd"),
3106
3107 Option("osd_recovery_max_active_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3108 .set_default(3)
3109 .set_description("Number of simultaneous active recovery oeprations per OSD (for rotational devices)")
3110 .add_see_also("osd_recovery_max_active")
3111 .add_see_also("osd_recovery_max_active_ssd"),
3112
3113 Option("osd_recovery_max_active_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3114 .set_default(10)
3115 .set_description("Number of simultaneous active recovery oeprations per OSD (for non-rotational solid state devices)")
3116 .add_see_also("osd_recovery_max_active")
3117 .add_see_also("osd_recovery_max_active_hdd"),
3118
3119 Option("osd_recovery_max_single_start", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3120 .set_default(1)
3121 .set_description(""),
3122
3123 Option("osd_recovery_max_chunk", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3124 .set_default(8_M)
3125 .set_description(""),
3126
3127 Option("osd_recovery_max_omap_entries_per_chunk", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3128 .set_default(8096)
3129 .set_description(""),
3130
3131 Option("osd_copyfrom_max_chunk", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3132 .set_default(8_M)
3133 .set_description(""),
3134
3135 Option("osd_push_per_object_cost", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3136 .set_default(1000)
3137 .set_description(""),
3138
3139 Option("osd_max_push_cost", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3140 .set_default(8<<20)
3141 .set_description(""),
3142
3143 Option("osd_max_push_objects", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3144 .set_default(10)
3145 .set_description(""),
3146
3147 Option("osd_max_scrubs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3148 .set_default(1)
3149 .set_description("Maximum concurrent scrubs on a single OSD"),
3150
3151 Option("osd_scrub_during_recovery", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3152 .set_default(false)
3153 .set_description("Allow scrubbing when PGs on the OSD are undergoing recovery"),
3154
3155 Option("osd_repair_during_recovery", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3156 .set_default(false)
3157 .set_description("Allow requested repairing when PGs on the OSD are undergoing recovery"),
3158
3159 Option("osd_scrub_begin_hour", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3160 .set_default(0)
3161 .set_description("Restrict scrubbing to this hour of the day or later")
3162 .add_see_also("osd_scrub_end_hour"),
3163
3164 Option("osd_scrub_end_hour", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3165 .set_default(24)
3166 .set_description("Restrict scrubbing to hours of the day earlier than this")
3167 .add_see_also("osd_scrub_begin_hour"),
3168
3169 Option("osd_scrub_begin_week_day", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3170 .set_default(0)
3171 .set_description("Restrict scrubbing to this day of the week or later")
3172 .set_long_description("0 or 7 = Sunday, 1 = Monday, etc.")
3173 .add_see_also("osd_scrub_end_week_day"),
3174
3175 Option("osd_scrub_end_week_day", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3176 .set_default(7)
3177 .set_description("Restrict scrubbing to days of the week earlier than this")
3178 .set_long_description("0 or 7 = Sunday, 1 = Monday, etc.")
3179 .add_see_also("osd_scrub_begin_week_day"),
3180
3181 Option("osd_scrub_load_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3182 .set_default(0.5)
3183 .set_description("Allow scrubbing when system load divided by number of CPUs is below this value"),
3184
3185 Option("osd_scrub_min_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3186 .set_default(1_day)
3187 .set_description("Scrub each PG no more often than this interval")
3188 .add_see_also("osd_scrub_max_interval"),
3189
3190 Option("osd_scrub_max_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3191 .set_default(7_day)
3192 .set_description("Scrub each PG no less often than this interval")
3193 .add_see_also("osd_scrub_min_interval"),
3194
3195 Option("osd_scrub_interval_randomize_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3196 .set_default(0.5)
3197 .set_description("Ratio of scrub interval to randomly vary")
3198 .set_long_description("This prevents a scrub 'stampede' by randomly varying the scrub intervals so that they are soon uniformly distributed over the week")
3199 .add_see_also("osd_scrub_min_interval"),
3200
3201 Option("osd_scrub_backoff_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3202 .set_default(.66)
3203 .set_long_description("This is the precentage of ticks that do NOT schedule scrubs, 66% means that 1 out of 3 ticks will schedule scrubs")
3204 .set_description("Backoff ratio for scheduling scrubs"),
3205
3206 Option("osd_scrub_chunk_min", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3207 .set_default(5)
3208 .set_description("Minimum number of objects to scrub in a single chunk")
3209 .add_see_also("osd_scrub_chunk_max"),
3210
3211 Option("osd_scrub_chunk_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3212 .set_default(25)
3213 .set_description("Maximum number of objects to scrub in a single chunk")
3214 .add_see_also("osd_scrub_chunk_min"),
3215
3216 Option("osd_scrub_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3217 .set_default(0)
3218 .set_description("Duration to inject a delay during scrubbing"),
3219
3220 Option("osd_scrub_extended_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3221 .set_default(0)
3222 .set_description("Duration to inject a delay during scrubbing out of scrubbing hours")
3223 .add_see_also("osd_scrub_begin_hour")
3224 .add_see_also("osd_scrub_end_hour")
3225 .add_see_also("osd_scrub_begin_week_day")
3226 .add_see_also("osd_scrub_end_week_day"),
3227
3228 Option("osd_scrub_auto_repair", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3229 .set_default(false)
3230 .set_description("Automatically repair damaged objects detected during scrub"),
3231
3232 Option("osd_scrub_auto_repair_num_errors", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3233 .set_default(5)
3234 .set_description("Maximum number of detected errors to automatically repair")
3235 .add_see_also("osd_scrub_auto_repair"),
3236
3237 Option("osd_scrub_max_preemptions", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3238 .set_default(5)
3239 .set_min_max(0, 30)
3240 .set_description("Set the maximum number of times we will preempt a deep scrub due to a client operation before blocking client IO to complete the scrub"),
3241
3242 Option("osd_deep_scrub_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3243 .set_default(7_day)
3244 .set_description("Deep scrub each PG (i.e., verify data checksums) at least this often"),
3245
3246 Option("osd_deep_scrub_randomize_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3247 .set_default(0.15)
3248 .set_description("Scrubs will randomly become deep scrubs at this rate (0.15 -> 15% of scrubs are deep)")
3249 .set_long_description("This prevents a deep scrub 'stampede' by spreading deep scrubs so they are uniformly distributed over the week"),
3250
3251 Option("osd_deep_scrub_stride", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3252 .set_default(512_K)
3253 .set_description("Number of bytes to read from an object at a time during deep scrub"),
3254
3255 Option("osd_deep_scrub_keys", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3256 .set_default(1024)
3257 .set_description("Number of keys to read from an object at a time during deep scrub"),
3258
3259 Option("osd_deep_scrub_update_digest_min_age", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3260 .set_default(2_hr)
3261 .set_description("Update overall object digest only if object was last modified longer ago than this"),
3262
3263 Option("osd_deep_scrub_large_omap_object_key_threshold", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3264 .set_default(200000)
3265 .set_description("Warn when we encounter an object with more omap keys than this")
3266 .add_service("osd")
3267 .add_see_also("osd_deep_scrub_large_omap_object_value_sum_threshold"),
3268
3269 Option("osd_deep_scrub_large_omap_object_value_sum_threshold", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3270 .set_default(1_G)
3271 .set_description("Warn when we encounter an object with more omap key bytes than this")
3272 .add_service("osd")
3273 .add_see_also("osd_deep_scrub_large_omap_object_key_threshold"),
3274
3275 Option("osd_class_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3276 .set_default(CEPH_LIBDIR "/rados-classes")
3277 .set_description(""),
3278
3279 Option("osd_open_classes_on_start", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3280 .set_default(true)
3281 .set_description(""),
3282
3283 Option("osd_class_load_list", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3284 .set_default("cephfs hello journal lock log numops " "otp rbd refcount rgw rgw_gc timeindex user version cas")
3285 .set_description(""),
3286
3287 Option("osd_class_default_list", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3288 .set_default("cephfs hello journal lock log numops " "otp rbd refcount rgw rgw_gc timeindex user version cas")
3289 .set_description(""),
3290
3291 Option("osd_check_for_log_corruption", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3292 .set_default(false)
3293 .set_description(""),
3294
3295 Option("osd_use_stale_snap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3296 .set_default(false)
3297 .set_description(""),
3298
3299 Option("osd_rollback_to_cluster_snap", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3300 .set_default("")
3301 .set_description(""),
3302
3303 Option("osd_default_notify_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3304 .set_default(30)
3305 .set_description(""),
3306
3307 Option("osd_kill_backfill_at", Option::TYPE_INT, Option::LEVEL_DEV)
3308 .set_default(0)
3309 .set_description(""),
3310
3311 Option("osd_pg_epoch_persisted_max_stale", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3312 .set_default(40)
3313 .set_description(""),
3314
3315 Option("osd_target_pg_log_entries_per_osd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3316 .set_default(3000 * 100)
3317 .set_description("target number of PG entries total on an OSD")
3318 .add_see_also("osd_max_pg_log_entries")
3319 .add_see_also("osd_min_pg_log_entries"),
3320
3321 Option("osd_min_pg_log_entries", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3322 .set_default(250)
3323 .set_description("minimum number of entries to maintain in the PG log")
3324 .add_service("osd")
3325 .add_see_also("osd_max_pg_log_entries")
3326 .add_see_also("osd_pg_log_dups_tracked"),
3327
3328 Option("osd_max_pg_log_entries", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3329 .set_default(10000)
3330 .set_description("maximum number of entries to maintain in the PG log when degraded before we trim")
3331 .add_service("osd")
3332 .add_see_also("osd_min_pg_log_entries")
3333 .add_see_also("osd_pg_log_dups_tracked"),
3334
3335 Option("osd_pg_log_dups_tracked", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3336 .set_default(3000)
3337 .set_description("how many versions back to track in order to detect duplicate ops; this is combined with both the regular pg log entries and additional minimal dup detection entries")
3338 .add_service("osd")
3339 .add_see_also("osd_min_pg_log_entries")
3340 .add_see_also("osd_max_pg_log_entries"),
3341
3342 Option("osd_object_clean_region_max_num_intervals", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3343 .set_default(10)
3344 .set_description("number of intervals in clean_offsets")
3345 .set_long_description("partial recovery uses multiple intervals to record the clean part of the object"
3346 "when the number of intervals is greater than osd_object_clean_region_max_num_intervals, minimum interval will be trimmed"
3347 "(0 will recovery the entire object data interval)")
3348 .add_service("osd"),
3349
3350 Option("osd_force_recovery_pg_log_entries_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3351 .set_default(1.3)
3352 .set_description(""),
3353
3354 Option("osd_pg_log_trim_min", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3355 .set_default(100)
3356 .set_description(""),
3357
3358 Option("osd_force_auth_primary_missing_objects", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3359 .set_default(100)
3360 .set_description("Approximate missing objects above which to force auth_log_shard to be primary temporarily"),
3361
3362 Option("osd_async_recovery_min_cost", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3363 .set_default(100)
3364 .set_description("A mixture measure of number of current log entries difference "
3365 "and historical missing objects, above which we switch to use "
3366 "asynchronous recovery when appropriate"),
3367
3368 Option("osd_max_pg_per_osd_hard_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3369 .set_default(3)
3370 .set_min(1)
3371 .set_description("Maximum number of PG per OSD, a factor of 'mon_max_pg_per_osd'")
3372 .set_long_description("OSD will refuse to instantiate PG if the number of PG it serves exceeds this number.")
3373 .add_see_also("mon_max_pg_per_osd"),
3374
3375 Option("osd_pg_log_trim_max", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3376 .set_default(10000)
3377 .set_description("maximum number of entries to remove at once from the PG log")
3378 .add_service("osd")
3379 .add_see_also("osd_min_pg_log_entries")
3380 .add_see_also("osd_max_pg_log_entries"),
3381
3382 Option("osd_op_complaint_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3383 .set_default(30)
3384 .set_description(""),
3385
3386 Option("osd_command_max_records", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3387 .set_default(256)
3388 .set_description(""),
3389
3390 Option("osd_max_pg_blocked_by", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3391 .set_default(16)
3392 .set_description(""),
3393
3394 Option("osd_op_log_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3395 .set_default(5)
3396 .set_description(""),
3397
3398 Option("osd_backoff_on_unfound", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3399 .set_default(true)
3400 .set_description(""),
3401
3402 Option("osd_backoff_on_degraded", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3403 .set_default(false)
3404 .set_description(""),
3405
3406 Option("osd_backoff_on_peering", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3407 .set_default(false)
3408 .set_description(""),
3409
3410 Option("osd_debug_shutdown", Option::TYPE_BOOL, Option::LEVEL_DEV)
3411 .set_default(false)
3412 .set_description("Turn up debug levels during shutdown"),
3413
3414 Option("osd_debug_crash_on_ignored_backoff", Option::TYPE_BOOL, Option::LEVEL_DEV)
3415 .set_default(false)
3416 .set_description(""),
3417
3418 Option("osd_debug_inject_dispatch_delay_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3419 .set_default(0)
3420 .set_description(""),
3421
3422 Option("osd_debug_inject_dispatch_delay_duration", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3423 .set_default(.1)
3424 .set_description(""),
3425
3426 Option("osd_debug_drop_ping_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3427 .set_default(0)
3428 .set_description(""),
3429
3430 Option("osd_debug_drop_ping_duration", Option::TYPE_INT, Option::LEVEL_DEV)
3431 .set_default(0)
3432 .set_description(""),
3433
3434 Option("osd_debug_op_order", Option::TYPE_BOOL, Option::LEVEL_DEV)
3435 .set_default(false)
3436 .set_description(""),
3437
3438 Option("osd_debug_verify_missing_on_start", Option::TYPE_BOOL, Option::LEVEL_DEV)
3439 .set_default(false)
3440 .set_description(""),
3441
3442 Option("osd_debug_verify_snaps", Option::TYPE_BOOL, Option::LEVEL_DEV)
3443 .set_default(false)
3444 .set_description(""),
3445
3446 Option("osd_debug_verify_stray_on_activate", Option::TYPE_BOOL, Option::LEVEL_DEV)
3447 .set_default(false)
3448 .set_description(""),
3449
3450 Option("osd_debug_skip_full_check_in_backfill_reservation", Option::TYPE_BOOL, Option::LEVEL_DEV)
3451 .set_default(false)
3452 .set_description(""),
3453
3454 Option("osd_debug_reject_backfill_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3455 .set_default(0)
3456 .set_description(""),
3457
3458 Option("osd_debug_inject_copyfrom_error", Option::TYPE_BOOL, Option::LEVEL_DEV)
3459 .set_default(false)
3460 .set_description(""),
3461
3462 Option("osd_debug_misdirected_ops", Option::TYPE_BOOL, Option::LEVEL_DEV)
3463 .set_default(false)
3464 .set_description(""),
3465
3466 Option("osd_debug_skip_full_check_in_recovery", Option::TYPE_BOOL, Option::LEVEL_DEV)
3467 .set_default(false)
3468 .set_description(""),
3469
3470 Option("osd_debug_random_push_read_error", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3471 .set_default(0)
3472 .set_description(""),
3473
3474 Option("osd_debug_verify_cached_snaps", Option::TYPE_BOOL, Option::LEVEL_DEV)
3475 .set_default(false)
3476 .set_description(""),
3477
3478 Option("osd_debug_deep_scrub_sleep", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3479 .set_default(0)
3480 .set_description("Inject an expensive sleep during deep scrub IO to make it easier to induce preemption"),
3481
3482 Option("osd_debug_no_acting_change", Option::TYPE_BOOL, Option::LEVEL_DEV)
3483 .set_default(false),
3484 Option("osd_debug_no_purge_strays", Option::TYPE_BOOL, Option::LEVEL_DEV)
3485 .set_default(false),
3486
3487 Option("osd_debug_pretend_recovery_active", Option::TYPE_BOOL, Option::LEVEL_DEV)
3488 .set_default(false)
3489 .set_description(""),
3490
3491 Option("osd_enable_op_tracker", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3492 .set_default(true)
3493 .set_description(""),
3494
3495 Option("osd_num_op_tracker_shard", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3496 .set_default(32)
3497 .set_description(""),
3498
3499 Option("osd_op_history_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3500 .set_default(20)
3501 .set_description(""),
3502
3503 Option("osd_op_history_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3504 .set_default(600)
3505 .set_description(""),
3506
3507 Option("osd_op_history_slow_op_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3508 .set_default(20)
3509 .set_description(""),
3510
3511 Option("osd_op_history_slow_op_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3512 .set_default(10.0)
3513 .set_description(""),
3514
3515 Option("osd_target_transaction_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3516 .set_default(30)
3517 .set_description(""),
3518
3519 Option("osd_delete_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3520 .set_default(0)
3521 .set_description("Time in seconds to sleep before next removal transaction (overrides values below)"),
3522
3523 Option("osd_delete_sleep_hdd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3524 .set_default(5)
3525 .set_description("Time in seconds to sleep before next removal transaction for HDDs"),
3526
3527 Option("osd_delete_sleep_ssd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3528 .set_default(0)
3529 .set_description("Time in seconds to sleep before next removal transaction for SSDs"),
3530
3531 Option("osd_delete_sleep_hybrid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3532 .set_default(2)
3533 .set_description("Time in seconds to sleep before next removal transaction when data is on HDD and journal is on SSD"),
3534
3535 Option("osd_failsafe_full_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3536 .set_default(.97)
3537 .set_description(""),
3538
3539 Option("osd_fast_shutdown", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3540 .set_default(true)
3541 .set_description("Fast, immediate shutdown")
3542 .set_long_description("Setting this to false makes the OSD do a slower teardown of all state when it receives a SIGINT or SIGTERM or when shutting down for any other reason. That slow shutdown is primarilyy useful for doing memory leak checking with valgrind."),
3543
3544 Option("osd_fast_fail_on_connection_refused", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3545 .set_default(true)
3546 .set_description(""),
3547
3548 Option("osd_pg_object_context_cache_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3549 .set_default(64)
3550 .set_description(""),
3551
3552 Option("osd_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3553 .set_default(false)
3554 .set_description(""),
3555
3556 Option("osd_function_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3557 .set_default(false)
3558 .set_description(""),
3559
3560 Option("osd_fast_info", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3561 .set_default(true)
3562 .set_description(""),
3563
3564 Option("osd_debug_pg_log_writeout", Option::TYPE_BOOL, Option::LEVEL_DEV)
3565 .set_default(false)
3566 .set_description(""),
3567
3568 Option("osd_loop_before_reset_tphandle", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3569 .set_default(64)
3570 .set_description(""),
3571
3572 Option("threadpool_default_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3573 .set_default(60)
3574 .set_description(""),
3575
3576 Option("threadpool_empty_queue_max_wait", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3577 .set_default(2)
3578 .set_description(""),
3579
3580 Option("leveldb_log_to_ceph_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3581 .set_default(true)
3582 .set_description(""),
3583
3584 Option("leveldb_write_buffer_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3585 .set_default(8_M)
3586 .set_description(""),
3587
3588 Option("leveldb_cache_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3589 .set_default(128_M)
3590 .set_description(""),
3591
3592 Option("leveldb_block_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3593 .set_default(0)
3594 .set_description(""),
3595
3596 Option("leveldb_bloom_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3597 .set_default(0)
3598 .set_description(""),
3599
3600 Option("leveldb_max_open_files", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3601 .set_default(0)
3602 .set_description(""),
3603
3604 Option("leveldb_compression", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3605 .set_default(true)
3606 .set_description(""),
3607
3608 Option("leveldb_paranoid", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3609 .set_default(false)
3610 .set_description(""),
3611
3612 Option("leveldb_log", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3613 .set_default("/dev/null")
3614 .set_description(""),
3615
3616 Option("leveldb_compact_on_mount", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3617 .set_default(false)
3618 .set_description(""),
3619
3620 Option("rocksdb_log_to_ceph_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3621 .set_default(true)
3622 .set_description(""),
3623
3624 Option("rocksdb_cache_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3625 .set_default(512_M)
3626 .set_flag(Option::FLAG_RUNTIME)
3627 .set_description(""),
3628
3629 Option("rocksdb_cache_row_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3630 .set_default(0)
3631 .set_description(""),
3632
3633 Option("rocksdb_cache_shard_bits", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3634 .set_default(4)
3635 .set_description(""),
3636
3637 Option("rocksdb_cache_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3638 .set_default("binned_lru")
3639 .set_description(""),
3640
3641 Option("rocksdb_block_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3642 .set_default(4_K)
3643 .set_description(""),
3644
3645 Option("rocksdb_perf", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3646 .set_default(false)
3647 .set_description(""),
3648
3649 Option("rocksdb_collect_compaction_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3650 .set_default(false)
3651 .set_description(""),
3652
3653 Option("rocksdb_collect_extended_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3654 .set_default(false)
3655 .set_description(""),
3656
3657 Option("rocksdb_collect_memory_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3658 .set_default(false)
3659 .set_description(""),
3660
3661 Option("rocksdb_delete_range_threshold", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3662 .set_default(1048576)
3663 .set_description("The number of keys required to invoke DeleteRange when deleting muliple keys."),
3664
3665 Option("rocksdb_bloom_bits_per_key", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3666 .set_default(20)
3667 .set_description("Number of bits per key to use for RocksDB's bloom filters.")
3668 .set_long_description("RocksDB bloom filters can be used to quickly answer the question of whether or not a key may exist or definitely does not exist in a given RocksDB SST file without having to read all keys into memory. Using a higher bit value decreases the likelihood of false positives at the expense of additional disk space and memory consumption when the filter is loaded into RAM. The current default value of 20 was found to provide significant performance gains when getattr calls are made (such as during new object creation in bluestore) without significant memory overhead or cache pollution when combined with rocksdb partitioned index filters. See: https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters for more information."),
3669
3670 Option("rocksdb_cache_index_and_filter_blocks", Option::TYPE_BOOL, Option::LEVEL_DEV)
3671 .set_default(true)
3672 .set_description("Whether to cache indices and filters in block cache")
3673 .set_long_description("By default RocksDB will load an SST file's index and bloom filters into memory when it is opened and remove them from memory when an SST file is closed. Thus, memory consumption by indices and bloom filters is directly tied to the number of concurrent SST files allowed to be kept open. This option instead stores cached indicies and filters in the block cache where they directly compete with other cached data. By default we set this option to true to better account for and bound rocksdb memory usage and keep filters in memory even when an SST file is closed."),
3674
3675 Option("rocksdb_cache_index_and_filter_blocks_with_high_priority", Option::TYPE_BOOL, Option::LEVEL_DEV)
3676 .set_default(true)
3677 .set_description("Whether to cache indices and filters in the block cache with high priority")
3678 .set_long_description("A downside of setting rocksdb_cache_index_and_filter_blocks to true is that regular data can push indices and filters out of memory. Setting this option to true means they are cached with higher priority than other data and should typically stay in the block cache."),
3679
3680 Option("rocksdb_pin_l0_filter_and_index_blocks_in_cache", Option::TYPE_BOOL, Option::LEVEL_DEV)
3681 .set_default(false)
3682 .set_description("Whether to pin Level 0 indices and bloom filters in the block cache")
3683 .set_long_description("A downside of setting rocksdb_cache_index_and_filter_blocks to true is that regular data can push indices and filters out of memory. Setting this option to true means that level 0 SST files will always have their indices and filters pinned in the block cache."),
3684
3685 Option("rocksdb_index_type", Option::TYPE_STR, Option::LEVEL_DEV)
3686 .set_default("binary_search")
3687 .set_description("Type of index for SST files: binary_search, hash_search, two_level")
3688 .set_long_description("This option controls the table index type. binary_search is a space efficient index block that is optimized for block-search-based index. hash_search may improve prefix lookup performance at the expense of higher disk and memory usage and potentially slower compactions. two_level is an experimental index type that uses two binary search indexes and works in conjunction with partition filters. See: http://rocksdb.org/blog/2017/05/12/partitioned-index-filter.html"),
3689
3690 Option("rocksdb_partition_filters", Option::TYPE_BOOL, Option::LEVEL_DEV)
3691 .set_default(false)
3692 .set_description("(experimental) partition SST index/filters into smaller blocks")
3693 .set_long_description("This is an experimental option for rocksdb that works in conjunction with two_level indices to avoid having to keep the entire filter/index in cache when cache_index_and_filter_blocks is true. The idea is to keep a much smaller top-level index in heap/cache and then opportunistically cache the lower level indices. See: https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters"),
3694
3695 Option("rocksdb_metadata_block_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
3696 .set_default(4_K)
3697 .set_description("The block size for index partitions. (0 = rocksdb default)"),
3698
3699 Option("mon_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3700 .set_default("write_buffer_size=33554432,"
3701 "compression=kNoCompression,"
3702 "level_compaction_dynamic_level_bytes=true")
3703 .set_description(""),
3704
3705 Option("osd_client_op_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3706 .set_default(63)
3707 .set_description(""),
3708
3709 Option("osd_recovery_op_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3710 .set_default(3)
3711 .set_description("Priority to use for recovery operations if not specified for the pool"),
3712
3713 Option("osd_peering_op_priority", Option::TYPE_UINT, Option::LEVEL_DEV)
3714 .set_default(255)
3715 .set_description(""),
3716
3717 Option("osd_snap_trim_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3718 .set_default(5)
3719 .set_description(""),
3720
3721 Option("osd_snap_trim_cost", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3722 .set_default(1<<20)
3723 .set_description(""),
3724
3725 Option("osd_pg_delete_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3726 .set_default(5)
3727 .set_description(""),
3728
3729 Option("osd_pg_delete_cost", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3730 .set_default(1<<20)
3731 .set_description(""),
3732
3733 Option("osd_scrub_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3734 .set_default(5)
3735 .set_description("Priority for scrub operations in work queue"),
3736
3737 Option("osd_scrub_cost", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3738 .set_default(50<<20)
3739 .set_description("Cost for scrub operations in work queue"),
3740
3741 Option("osd_requested_scrub_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3742 .set_default(120)
3743 .set_description(""),
3744
3745 Option("osd_recovery_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3746 .set_default(5)
3747 .set_description("Priority of recovery in the work queue")
3748 .set_long_description("Not related to a pool's recovery_priority"),
3749
3750 Option("osd_recovery_cost", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3751 .set_default(20<<20)
3752 .set_description(""),
3753
3754 Option("osd_recovery_op_warn_multiple", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3755 .set_default(16)
3756 .set_description(""),
3757
3758 Option("osd_mon_shutdown_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3759 .set_default(5)
3760 .set_description(""),
3761
3762 Option("osd_shutdown_pgref_assert", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3763 .set_default(false)
3764 .set_description(""),
3765
3766 Option("osd_max_object_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3767 .set_default(128_M)
3768 .set_description(""),
3769
3770 Option("osd_max_object_name_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3771 .set_default(2048)
3772 .set_description(""),
3773
3774 Option("osd_max_object_namespace_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3775 .set_default(256)
3776 .set_description(""),
3777
3778 Option("osd_max_attr_name_len", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3779 .set_default(100)
3780 .set_description(""),
3781
3782 Option("osd_max_attr_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3783 .set_default(0)
3784 .set_description(""),
3785
3786 Option("osd_max_omap_entries_per_request", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3787 .set_default(1024)
3788 .set_description(""),
3789
3790 Option("osd_max_omap_bytes_per_request", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3791 .set_default(1_G)
3792 .set_description(""),
3793
3794 Option("osd_max_write_op_reply_len", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3795 .set_default(32)
3796 .set_description("Max size of the per-op payload for requests with the RETURNVEC flag set")
3797 .set_long_description("This value caps the amount of data (per op; a request may have many ops) that will be sent back to the client and recorded in the PG log."),
3798
3799 Option("osd_objectstore", Option::TYPE_STR, Option::LEVEL_ADVANCED)
3800 .set_default("bluestore")
3801 .set_enum_allowed({"bluestore", "filestore", "memstore", "kstore"})
3802 .set_flag(Option::FLAG_CREATE)
3803 .set_description("backend type for an OSD (like filestore or bluestore)"),
3804
3805 Option("osd_objectstore_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3806 .set_default(false)
3807 .set_description(""),
3808
3809 Option("osd_objectstore_fuse", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3810 .set_default(false)
3811 .set_description(""),
3812
3813 Option("osd_bench_small_size_max_iops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3814 .set_default(100)
3815 .set_description(""),
3816
3817 Option("osd_bench_large_size_max_throughput", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3818 .set_default(100_M)
3819 .set_description(""),
3820
3821 Option("osd_bench_max_block_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3822 .set_default(64_M)
3823 .set_description(""),
3824
3825 Option("osd_bench_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
3826 .set_default(30)
3827 .set_description(""),
3828
3829 Option("osd_blkin_trace_all", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3830 .set_default(false)
3831 .set_description(""),
3832
3833 Option("osdc_blkin_trace_all", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3834 .set_default(false)
3835 .set_description(""),
3836
3837 Option("osd_discard_disconnected_ops", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3838 .set_default(true)
3839 .set_description(""),
3840
3841 Option("osd_memory_target", Option::TYPE_SIZE, Option::LEVEL_BASIC)
3842 .set_default(4_G)
3843 .set_min(896_M)
3844 .set_flag(Option::FLAG_RUNTIME)
3845 .add_see_also("bluestore_cache_autotune")
3846 .add_see_also("osd_memory_cache_min")
3847 .add_see_also("osd_memory_base")
3848 .set_description("When tcmalloc and cache autotuning is enabled, try to keep this many bytes mapped in memory.")
3849 .set_long_description("The minimum value must be at least equal to osd_memory_base + osd_memory_cache_min."),
3850
3851 Option("osd_memory_target_cgroup_limit_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3852 .set_default(0.8)
3853 .set_min_max(0.0, 1.0)
3854 .add_see_also("osd_memory_target")
3855 .set_description("Set the default value for osd_memory_target to the cgroup memory limit (if set) times this value")
3856 .set_long_description("A value of 0 disables this feature."),
3857
3858 Option("osd_memory_base", Option::TYPE_SIZE, Option::LEVEL_DEV)
3859 .set_default(768_M)
3860 .set_flag(Option::FLAG_RUNTIME)
3861 .add_see_also("bluestore_cache_autotune")
3862 .set_description("When tcmalloc and cache autotuning is enabled, estimate the minimum amount of memory in bytes the OSD will need."),
3863
3864 Option("osd_memory_expected_fragmentation", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3865 .set_default(0.15)
3866 .set_min_max(0.0, 1.0)
3867 .set_flag(Option::FLAG_RUNTIME)
3868 .add_see_also("bluestore_cache_autotune")
3869 .set_description("When tcmalloc and cache autotuning is enabled, estimate the percent of memory fragmentation."),
3870
3871 Option("osd_memory_cache_min", Option::TYPE_SIZE, Option::LEVEL_DEV)
3872 .set_default(128_M)
3873 .set_min(128_M)
3874 .set_flag(Option::FLAG_RUNTIME)
3875 .add_see_also("bluestore_cache_autotune")
3876 .set_description("When tcmalloc and cache autotuning is enabled, set the minimum amount of memory used for caches."),
3877
3878 Option("osd_memory_cache_resize_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3879 .set_default(1)
3880 .add_see_also("bluestore_cache_autotune")
3881 .set_description("When tcmalloc and cache autotuning is enabled, wait this many seconds between resizing caches."),
3882
3883 Option("memstore_device_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3884 .set_default(1_G)
3885 .set_description(""),
3886
3887 Option("memstore_page_set", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3888 .set_default(false)
3889 .set_description(""),
3890
3891 Option("memstore_page_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3892 .set_default(64_K)
3893 .set_description(""),
3894
3895 Option("memstore_debug_omit_block_device_write", Option::TYPE_BOOL, Option::LEVEL_DEV)
3896 .set_default(false)
3897 .add_see_also("bluestore_debug_omit_block_device_write")
3898 .set_description("write metadata only"),
3899
3900 Option("objectstore_blackhole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3901 .set_default(false)
3902 .set_description(""),
3903
3904 // --------------------------
3905 // bluestore
3906
3907 Option("bdev_debug_inflight_ios", Option::TYPE_BOOL, Option::LEVEL_DEV)
3908 .set_default(false)
3909 .set_description(""),
3910
3911 Option("bdev_inject_crash", Option::TYPE_INT, Option::LEVEL_DEV)
3912 .set_default(0)
3913 .set_description(""),
3914
3915 Option("bdev_inject_crash_flush_delay", Option::TYPE_INT, Option::LEVEL_DEV)
3916 .set_default(2)
3917 .set_description(""),
3918
3919 Option("bdev_aio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3920 .set_default(true)
3921 .set_description(""),
3922
3923 Option("bdev_aio_poll_ms", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3924 .set_default(250)
3925 .set_description(""),
3926
3927 Option("bdev_aio_max_queue_depth", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3928 .set_default(1024)
3929 .set_description(""),
3930
3931 Option("bdev_aio_reap_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3932 .set_default(16)
3933 .set_description(""),
3934
3935 Option("bdev_block_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3936 .set_default(4_K)
3937 .set_description(""),
3938
3939 Option("bdev_debug_aio", Option::TYPE_BOOL, Option::LEVEL_DEV)
3940 .set_default(false)
3941 .set_description(""),
3942
3943 Option("bdev_debug_aio_suicide_timeout", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3944 .set_default(60.0)
3945 .set_description(""),
3946
3947 Option("bdev_debug_aio_log_age", Option::TYPE_FLOAT, Option::LEVEL_DEV)
3948 .set_default(5.0)
3949 .set_description(""),
3950
3951 Option("bdev_nvme_unbind_from_kernel", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3952 .set_default(false)
3953 .set_description(""),
3954
3955 Option("bdev_nvme_retry_count", Option::TYPE_INT, Option::LEVEL_ADVANCED)
3956 .set_default(-1)
3957 .set_description(""),
3958
3959 Option("bdev_enable_discard", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3960 .set_default(false)
3961 .set_description(""),
3962
3963 Option("bdev_async_discard", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
3964 .set_default(false)
3965 .set_description(""),
3966
3967 Option("bluefs_alloc_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3968 .set_default(1_M)
3969 .set_description("Allocation unit size for DB and WAL devices"),
3970
3971 Option("bluefs_shared_alloc_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3972 .set_default(64_K)
3973 .set_description("Allocation unit size for primary/shared device"),
3974
3975 Option("bluefs_max_prefetch", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3976 .set_default(1_M)
3977 .set_description(""),
3978
3979 Option("bluefs_min_log_runway", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3980 .set_default(1_M)
3981 .set_description(""),
3982
3983 Option("bluefs_max_log_runway", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3984 .set_default(4194304)
3985 .set_description(""),
3986
3987 Option("bluefs_log_compact_min_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
3988 .set_default(5.0)
3989 .set_description(""),
3990
3991 Option("bluefs_log_compact_min_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3992 .set_default(16_M)
3993 .set_description(""),
3994
3995 Option("bluefs_min_flush_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
3996 .set_default(512_K)
3997 .set_description(""),
3998
3999 Option("bluefs_compact_log_sync", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4000 .set_default(false)
4001 .set_description(""),
4002
4003 Option("bluefs_buffered_io", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4004 .set_default(false)
4005 .set_description("Enabled buffered IO for bluefs reads.")
4006 .set_long_description("When this option is enabled, bluefs will in some cases perform buffered reads. This allows the kernel page cache to act as a secondary cache for things like RocksDB compaction. For example, if the rocksdb block cache isn't large enough to hold blocks from the compressed SST files itself, they can be read from page cache instead of from the disk. This option previously was enabled by default, however in some test cases it appears to cause excessive swap utilization by the linux kernel and a large negative performance impact after several hours of run time. Please exercise caution when enabling."),
4007
4008 Option("bluefs_sync_write", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4009 .set_default(false)
4010 .set_description(""),
4011
4012 Option("bluefs_allocator", Option::TYPE_STR, Option::LEVEL_DEV)
4013 .set_default("hybrid")
4014 .set_enum_allowed({"bitmap", "stupid", "avl", "hybrid"})
4015 .set_description(""),
4016
4017 Option("bluefs_preextend_wal_files", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4018 .set_default(false)
4019 .set_description("Preextent rocksdb wal files on mkfs to avoid performance penalty"),
4020
4021 Option("bluefs_log_replay_check_allocations", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4022 .set_default(true)
4023 .set_description("Enables checks for allocations consistency during log replay"),
4024
4025 Option("bluefs_replay_recovery", Option::TYPE_BOOL, Option::LEVEL_DEV)
4026 .set_default(false)
4027 .set_description("Attempt to read bluefs log so large that it became unreadable.")
4028 .set_long_description("If BlueFS log grows to extreme sizes (200GB+) it is likely that it becames unreadable. "
4029 "This options enables heuristics that scans devices for missing data. "
4030 "DO NOT ENABLE BY DEFAULT"),
4031
4032 Option("bluefs_replay_recovery_disable_compact", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4033 .set_default(false)
4034 .set_description(""),
4035
4036 Option("bluestore_bluefs", Option::TYPE_BOOL, Option::LEVEL_DEV)
4037 .set_default(true)
4038 .set_flag(Option::FLAG_CREATE)
4039 .set_description("Use BlueFS to back rocksdb")
4040 .set_long_description("BlueFS allows rocksdb to share the same physical device(s) as the rest of BlueStore. It should be used in all cases unless testing/developing an alternative metadata database for BlueStore."),
4041
4042 Option("bluestore_bluefs_env_mirror", Option::TYPE_BOOL, Option::LEVEL_DEV)
4043 .set_default(false)
4044 .set_flag(Option::FLAG_CREATE)
4045 .set_description("Mirror bluefs data to file system for testing/validation"),
4046
4047 Option("bluestore_bluefs_min", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4048 .set_default(1_G)
4049 .set_description("minimum disk space allocated to BlueFS (e.g., at mkfs)"),
4050
4051 Option("bluestore_bluefs_min_free", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4052 .set_default(1_G)
4053 .set_description("minimum free space allocated to BlueFS"),
4054
4055 Option("bluestore_bluefs_max_free", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4056 .set_default(10_G)
4057 .set_description("Maximum free space allocated to BlueFS"),
4058
4059 Option("bluestore_bluefs_min_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4060 .set_default(.02)
4061 .set_description("Minimum fraction of free space devoted to BlueFS"),
4062
4063 Option("bluestore_bluefs_max_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4064 .set_default(.90)
4065 .set_description("Maximum fraction of free storage devoted to BlueFS"),
4066
4067 Option("bluestore_bluefs_gift_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4068 .set_default(.02)
4069 .set_description("Maximum fraction of free space to give to BlueFS at once"),
4070
4071 Option("bluestore_bluefs_reclaim_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4072 .set_default(.20)
4073 .set_description("Maximum fraction of free space to reclaim from BlueFS at once"),
4074
4075 Option("bluestore_bluefs_balance_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4076 .set_default(1)
4077 .set_description("How frequently (in seconds) to balance free space between BlueFS and BlueStore"),
4078
4079 Option("bluestore_bluefs_alloc_failure_dump_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4080 .set_default(0)
4081 .set_description("How frequently (in seconds) to dump allocator on"
4082 "BlueFS space allocation failure"),
4083
4084 Option("bluestore_bluefs_db_compatibility", Option::TYPE_BOOL, Option::LEVEL_DEV)
4085 .set_default(true)
4086 .set_description("Sync db with legacy bluefs extents info")
4087 .set_long_description("Enforces db sync with legacy bluefs extents information on close."
4088 " Enables downgrades to pre-nautilus releases"),
4089
4090 Option("bluestore_spdk_mem", Option::TYPE_SIZE, Option::LEVEL_DEV)
4091 .set_default(512)
4092 .set_description("Amount of dpdk memory size in MB")
4093 .set_long_description("If running multiple SPDK instances per node, you must specify the amount of dpdk memory size in MB each instance will use, to make sure each instance uses its own dpdk memory"),
4094
4095 Option("bluestore_spdk_coremask", Option::TYPE_STR, Option::LEVEL_DEV)
4096 .set_default("0x1")
4097 .set_description("A hexadecimal bit mask of the cores to run on. Note the core numbering can change between platforms and should be determined beforehand"),
4098
4099 Option("bluestore_spdk_max_io_completion", Option::TYPE_UINT, Option::LEVEL_DEV)
4100 .set_default(0)
4101 .set_description("Maximal I/Os to be batched completed while checking queue pair completions, 0 means let spdk library determine it"),
4102
4103 Option("bluestore_spdk_io_sleep", Option::TYPE_UINT, Option::LEVEL_DEV)
4104 .set_default(5)
4105 .set_description("Time period to wait if there is no completed I/O from polling"),
4106
4107 Option("bluestore_block_path", Option::TYPE_STR, Option::LEVEL_DEV)
4108 .set_default("")
4109 .set_flag(Option::FLAG_CREATE)
4110 .set_description("Path to block device/file"),
4111
4112 Option("bluestore_block_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4113 .set_default(100_G)
4114 .set_flag(Option::FLAG_CREATE)
4115 .set_description("Size of file to create for backing bluestore"),
4116
4117 Option("bluestore_block_create", Option::TYPE_BOOL, Option::LEVEL_DEV)
4118 .set_default(true)
4119 .set_flag(Option::FLAG_CREATE)
4120 .set_description("Create bluestore_block_path if it doesn't exist")
4121 .add_see_also("bluestore_block_path").add_see_also("bluestore_block_size"),
4122
4123 Option("bluestore_block_db_path", Option::TYPE_STR, Option::LEVEL_DEV)
4124 .set_default("")
4125 .set_flag(Option::FLAG_CREATE)
4126 .set_description("Path for db block device"),
4127
4128 Option("bluestore_block_db_size", Option::TYPE_UINT, Option::LEVEL_DEV)
4129 .set_default(0)
4130 .set_flag(Option::FLAG_CREATE)
4131 .set_description("Size of file to create for bluestore_block_db_path"),
4132
4133 Option("bluestore_block_db_create", Option::TYPE_BOOL, Option::LEVEL_DEV)
4134 .set_default(false)
4135 .set_flag(Option::FLAG_CREATE)
4136 .set_description("Create bluestore_block_db_path if it doesn't exist")
4137 .add_see_also("bluestore_block_db_path")
4138 .add_see_also("bluestore_block_db_size"),
4139
4140 Option("bluestore_block_wal_path", Option::TYPE_STR, Option::LEVEL_DEV)
4141 .set_default("")
4142 .set_flag(Option::FLAG_CREATE)
4143 .set_description("Path to block device/file backing bluefs wal"),
4144
4145 Option("bluestore_block_wal_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4146 .set_default(96_M)
4147 .set_flag(Option::FLAG_CREATE)
4148 .set_description("Size of file to create for bluestore_block_wal_path"),
4149
4150 Option("bluestore_block_wal_create", Option::TYPE_BOOL, Option::LEVEL_DEV)
4151 .set_default(false)
4152 .set_flag(Option::FLAG_CREATE)
4153 .set_description("Create bluestore_block_wal_path if it doesn't exist")
4154 .add_see_also("bluestore_block_wal_path")
4155 .add_see_also("bluestore_block_wal_size"),
4156
4157 Option("bluestore_block_preallocate_file", Option::TYPE_BOOL, Option::LEVEL_DEV)
4158 .set_default(false)
4159 .set_flag(Option::FLAG_CREATE)
4160 .set_description("Preallocate file created via bluestore_block*_create"),
4161
4162 Option("bluestore_ignore_data_csum", Option::TYPE_BOOL, Option::LEVEL_DEV)
4163 .set_default(false)
4164 .set_flag(Option::FLAG_RUNTIME)
4165 .set_description("Ignore checksum errors on read and do not generate an EIO error"),
4166
4167 Option("bluestore_csum_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4168 .set_default("crc32c")
4169 .set_enum_allowed({"none", "crc32c", "crc32c_16", "crc32c_8", "xxhash32", "xxhash64"})
4170 .set_flag(Option::FLAG_RUNTIME)
4171 .set_description("Default checksum algorithm to use")
4172 .set_long_description("crc32c, xxhash32, and xxhash64 are available. The _16 and _8 variants use only a subset of the bits for more compact (but less reliable) checksumming."),
4173
4174 Option("bluestore_retry_disk_reads", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4175 .set_default(3)
4176 .set_min_max(0, 255)
4177 .set_flag(Option::FLAG_RUNTIME)
4178 .set_description("Number of read retries on checksum validation error")
4179 .set_long_description("Retries to read data from the disk this many times when checksum validation fails to handle spurious read errors gracefully."),
4180
4181 Option("bluestore_min_alloc_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4182 .set_default(0)
4183 .set_flag(Option::FLAG_CREATE)
4184 .set_description("Minimum allocation size to allocate for an object")
4185 .set_long_description("A smaller allocation size generally means less data is read and then rewritten when a copy-on-write operation is triggered (e.g., when writing to something that was recently snapshotted). Similarly, less data is journaled before performing an overwrite (writes smaller than min_alloc_size must first pass through the BlueStore journal). Larger values of min_alloc_size reduce the amount of metadata required to describe the on-disk layout and reduce overall fragmentation."),
4186
4187 Option("bluestore_min_alloc_size_hdd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4188 .set_default(64_K)
4189 .set_flag(Option::FLAG_CREATE)
4190 .set_description("Default min_alloc_size value for rotational media")
4191 .add_see_also("bluestore_min_alloc_size"),
4192
4193 Option("bluestore_min_alloc_size_ssd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4194 .set_default(4_K)
4195 .set_flag(Option::FLAG_CREATE)
4196 .set_description("Default min_alloc_size value for non-rotational (solid state) media")
4197 .add_see_also("bluestore_min_alloc_size"),
4198
4199 Option("bluestore_max_alloc_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4200 .set_default(0)
4201 .set_flag(Option::FLAG_CREATE)
4202 .set_description("Maximum size of a single allocation (0 for no max)"),
4203
4204 Option("bluestore_prefer_deferred_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4205 .set_default(0)
4206 .set_flag(Option::FLAG_RUNTIME)
4207 .set_description("Writes smaller than this size will be written to the journal and then asynchronously written to the device. This can be beneficial when using rotational media where seeks are expensive, and is helpful both with and without solid state journal/wal devices."),
4208
4209 Option("bluestore_prefer_deferred_size_hdd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4210 .set_default(32768)
4211 .set_flag(Option::FLAG_RUNTIME)
4212 .set_description("Default bluestore_prefer_deferred_size for rotational media")
4213 .add_see_also("bluestore_prefer_deferred_size"),
4214
4215 Option("bluestore_prefer_deferred_size_ssd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4216 .set_default(0)
4217 .set_flag(Option::FLAG_RUNTIME)
4218 .set_description("Default bluestore_prefer_deferred_size for non-rotational (solid state) media")
4219 .add_see_also("bluestore_prefer_deferred_size"),
4220
4221 Option("bluestore_compression_mode", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4222 .set_default("none")
4223 .set_enum_allowed({"none", "passive", "aggressive", "force"})
4224 .set_flag(Option::FLAG_RUNTIME)
4225 .set_description("Default policy for using compression when pool does not specify")
4226 .set_long_description("'none' means never use compression. 'passive' means use compression when clients hint that data is compressible. 'aggressive' means use compression unless clients hint that data is not compressible. This option is used when the per-pool property for the compression mode is not present."),
4227
4228 Option("bluestore_compression_algorithm", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4229 .set_default("snappy")
4230 .set_enum_allowed({"", "snappy", "zlib", "zstd", "lz4"})
4231 .set_flag(Option::FLAG_RUNTIME)
4232 .set_description("Default compression algorithm to use when writing object data")
4233 .set_long_description("This controls the default compressor to use (if any) if the per-pool property is not set. Note that zstd is *not* recommended for bluestore due to high CPU overhead when compressing small amounts of data."),
4234
4235 Option("bluestore_compression_min_blob_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4236 .set_default(0)
4237 .set_flag(Option::FLAG_RUNTIME)
4238 .set_description("Maximum chunk size to apply compression to when random access is expected for an object.")
4239 .set_long_description("Chunks larger than this are broken into smaller chunks before being compressed"),
4240
4241 Option("bluestore_compression_min_blob_size_hdd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4242 .set_default(128_K)
4243 .set_flag(Option::FLAG_RUNTIME)
4244 .set_description("Default value of bluestore_compression_min_blob_size for rotational media")
4245 .add_see_also("bluestore_compression_min_blob_size"),
4246
4247 Option("bluestore_compression_min_blob_size_ssd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4248 .set_default(8_K)
4249 .set_flag(Option::FLAG_RUNTIME)
4250 .set_description("Default value of bluestore_compression_min_blob_size for non-rotational (solid state) media")
4251 .add_see_also("bluestore_compression_min_blob_size"),
4252
4253 Option("bluestore_compression_max_blob_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4254 .set_default(0)
4255 .set_flag(Option::FLAG_RUNTIME)
4256 .set_description("Maximum chunk size to apply compression to when non-random access is expected for an object.")
4257 .set_long_description("Chunks larger than this are broken into smaller chunks before being compressed"),
4258
4259 Option("bluestore_compression_max_blob_size_hdd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4260 .set_default(512_K)
4261 .set_flag(Option::FLAG_RUNTIME)
4262 .set_description("Default value of bluestore_compression_max_blob_size for rotational media")
4263 .add_see_also("bluestore_compression_max_blob_size"),
4264
4265 Option("bluestore_compression_max_blob_size_ssd", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4266 .set_default(64_K)
4267 .set_flag(Option::FLAG_RUNTIME)
4268 .set_description("Default value of bluestore_compression_max_blob_size for non-rotational (solid state) media")
4269 .add_see_also("bluestore_compression_max_blob_size"),
4270
4271 Option("bluestore_gc_enable_blob_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
4272 .set_default(0)
4273 .set_flag(Option::FLAG_RUNTIME)
4274 .set_description(""),
4275
4276 Option("bluestore_gc_enable_total_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
4277 .set_default(0)
4278 .set_flag(Option::FLAG_RUNTIME)
4279 .set_description(""),
4280
4281 Option("bluestore_max_blob_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4282 .set_default(0)
4283 .set_flag(Option::FLAG_RUNTIME)
4284 .set_description("")
4285 .set_long_description("Bluestore blobs are collections of extents (ie on-disk data) originating from one or more objects. Blobs can be compressed, typically have checksum data, may be overwritten, may be shared (with an extent ref map), or split. This setting controls the maximum size a blob is allowed to be."),
4286
4287 Option("bluestore_max_blob_size_hdd", Option::TYPE_SIZE, Option::LEVEL_DEV)
4288 .set_default(512_K)
4289 .set_flag(Option::FLAG_RUNTIME)
4290 .set_description("")
4291 .add_see_also("bluestore_max_blob_size"),
4292
4293 Option("bluestore_max_blob_size_ssd", Option::TYPE_SIZE, Option::LEVEL_DEV)
4294 .set_default(64_K)
4295 .set_flag(Option::FLAG_RUNTIME)
4296 .set_description("")
4297 .add_see_also("bluestore_max_blob_size"),
4298
4299 Option("bluestore_compression_required_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4300 .set_default(.875)
4301 .set_flag(Option::FLAG_RUNTIME)
4302 .set_description("Compression ratio required to store compressed data")
4303 .set_long_description("If we compress data and get less than this we discard the result and store the original uncompressed data."),
4304
4305 Option("bluestore_extent_map_shard_max_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4306 .set_default(1200)
4307 .set_description("Max size (bytes) for a single extent map shard before splitting"),
4308
4309 Option("bluestore_extent_map_shard_target_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4310 .set_default(500)
4311 .set_description("Target size (bytes) for a single extent map shard"),
4312
4313 Option("bluestore_extent_map_shard_min_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4314 .set_default(150)
4315 .set_description("Min size (bytes) for a single extent map shard before merging"),
4316
4317 Option("bluestore_extent_map_shard_target_size_slop", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4318 .set_default(.2)
4319 .set_description("Ratio above/below target for a shard when trying to align to an existing extent or blob boundary"),
4320
4321 Option("bluestore_extent_map_inline_shard_prealloc_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4322 .set_default(256)
4323 .set_description("Preallocated buffer for inline shards"),
4324
4325 Option("bluestore_cache_trim_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4326 .set_default(.05)
4327 .set_description("How frequently we trim the bluestore cache"),
4328
4329 Option("bluestore_cache_trim_max_skip_pinned", Option::TYPE_UINT, Option::LEVEL_DEV)
4330 .set_default(64)
4331 .set_description("Max pinned cache entries we consider before giving up"),
4332
4333 Option("bluestore_cache_type", Option::TYPE_STR, Option::LEVEL_DEV)
4334 .set_default("2q")
4335 .set_enum_allowed({"2q", "lru"})
4336 .set_description("Cache replacement algorithm"),
4337
4338 Option("bluestore_2q_cache_kin_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4339 .set_default(.5)
4340 .set_description("2Q paper suggests .5"),
4341
4342 Option("bluestore_2q_cache_kout_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4343 .set_default(.5)
4344 .set_description("2Q paper suggests .5"),
4345
4346 Option("bluestore_cache_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4347 .set_default(0)
4348 .set_description("Cache size (in bytes) for BlueStore")
4349 .set_long_description("This includes data and metadata cached by BlueStore as well as memory devoted to rocksdb's cache(s)."),
4350
4351 Option("bluestore_cache_size_hdd", Option::TYPE_SIZE, Option::LEVEL_DEV)
4352 .set_default(1_G)
4353 .set_description("Default bluestore_cache_size for rotational media")
4354 .add_see_also("bluestore_cache_size"),
4355
4356 Option("bluestore_cache_size_ssd", Option::TYPE_SIZE, Option::LEVEL_DEV)
4357 .set_default(3_G)
4358 .set_description("Default bluestore_cache_size for non-rotational (solid state) media")
4359 .add_see_also("bluestore_cache_size"),
4360
4361 Option("bluestore_cache_meta_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4362 .set_default(.4)
4363 .add_see_also("bluestore_cache_size")
4364 .set_description("Ratio of bluestore cache to devote to metadata"),
4365
4366 Option("bluestore_cache_kv_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4367 .set_default(.4)
4368 .add_see_also("bluestore_cache_size")
4369 .set_description("Ratio of bluestore cache to devote to kv database (rocksdb)"),
4370
4371 Option("bluestore_cache_autotune", Option::TYPE_BOOL, Option::LEVEL_DEV)
4372 .set_default(true)
4373 .add_see_also("bluestore_cache_size")
4374 .add_see_also("bluestore_cache_meta_ratio")
4375 .set_description("Automatically tune the ratio of caches while respecting min values."),
4376
4377 Option("bluestore_cache_autotune_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4378 .set_default(5)
4379 .add_see_also("bluestore_cache_autotune")
4380 .set_description("The number of seconds to wait between rebalances when cache autotune is enabled."),
4381
4382 Option("bluestore_alloc_stats_dump_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4383 .set_default(3600 * 24)
4384 .set_description("The period (in second) for logging allocation statistics."),
4385
4386 Option("bluestore_kvbackend", Option::TYPE_STR, Option::LEVEL_DEV)
4387 .set_default("rocksdb")
4388 .set_flag(Option::FLAG_CREATE)
4389 .set_description("Key value database to use for bluestore"),
4390
4391 Option("bluestore_allocator", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4392 .set_default("hybrid")
4393 .set_enum_allowed({"bitmap", "stupid", "avl", "hybrid"})
4394 .set_description("Allocator policy")
4395 .set_long_description("Allocator to use for bluestore. Stupid should only be used for testing."),
4396
4397 Option("bluestore_freelist_blocks_per_key", Option::TYPE_SIZE, Option::LEVEL_DEV)
4398 .set_default(128)
4399 .set_description("Block (and bits) per database key"),
4400
4401 Option("bluestore_bitmapallocator_blocks_per_zone", Option::TYPE_SIZE, Option::LEVEL_DEV)
4402 .set_default(1024)
4403 .set_description(""),
4404
4405 Option("bluestore_bitmapallocator_span_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4406 .set_default(1024)
4407 .set_description(""),
4408
4409 Option("bluestore_max_deferred_txc", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4410 .set_default(32)
4411 .set_description("Max transactions with deferred writes that can accumulate before we force flush deferred writes"),
4412
4413 Option("bluestore_max_defer_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4414 .set_default(3)
4415 .set_description("max duration to force deferred submit"),
4416
4417 Option("bluestore_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4418 .set_default("compression=kNoCompression,max_write_buffer_number=4,min_write_buffer_number_to_merge=1,recycle_log_file_num=4,write_buffer_size=268435456,writable_file_max_buffer_size=0,compaction_readahead_size=2097152,max_background_compactions=2")
4419 .set_description("Rocksdb options"),
4420
4421 Option("bluestore_rocksdb_cf", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4422 .set_default(false)
4423 .set_description("Enable use of rocksdb column families for bluestore metadata"),
4424
4425 Option("bluestore_rocksdb_cfs", Option::TYPE_STR, Option::LEVEL_DEV)
4426 .set_default("M= P= L=")
4427 .set_description("List of whitespace-separate key/value pairs where key is CF name and value is CF options"),
4428
4429 Option("bluestore_fsck_on_mount", Option::TYPE_BOOL, Option::LEVEL_DEV)
4430 .set_default(false)
4431 .set_description("Run fsck at mount"),
4432
4433 Option("bluestore_fsck_on_mount_deep", Option::TYPE_BOOL, Option::LEVEL_DEV)
4434 .set_default(false)
4435 .set_description("Run deep fsck at mount when bluestore_fsck_on_mount is set to true"),
4436
4437 Option("bluestore_fsck_quick_fix_on_mount", Option::TYPE_BOOL, Option::LEVEL_DEV)
4438 .set_default(true)
4439 .set_description("Do quick-fix for the store at mount"),
4440
4441 Option("bluestore_fsck_on_umount", Option::TYPE_BOOL, Option::LEVEL_DEV)
4442 .set_default(false)
4443 .set_description("Run fsck at umount"),
4444
4445 Option("bluestore_fsck_on_umount_deep", Option::TYPE_BOOL, Option::LEVEL_DEV)
4446 .set_default(false)
4447 .set_description("Run deep fsck at umount when bluestore_fsck_on_umount is set to true"),
4448
4449 Option("bluestore_fsck_on_mkfs", Option::TYPE_BOOL, Option::LEVEL_DEV)
4450 .set_default(true)
4451 .set_description("Run fsck after mkfs"),
4452
4453 Option("bluestore_fsck_on_mkfs_deep", Option::TYPE_BOOL, Option::LEVEL_DEV)
4454 .set_default(false)
4455 .set_description("Run deep fsck after mkfs"),
4456
4457 Option("bluestore_sync_submit_transaction", Option::TYPE_BOOL, Option::LEVEL_DEV)
4458 .set_default(false)
4459 .set_description("Try to submit metadata transaction to rocksdb in queuing thread context"),
4460
4461 Option("bluestore_fsck_read_bytes_cap", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4462 .set_default(64_M)
4463 .set_flag(Option::FLAG_RUNTIME)
4464 .set_description("Maximum bytes read at once by deep fsck"),
4465
4466 Option("bluestore_fsck_quick_fix_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4467 .set_default(2)
4468 .set_description("Number of additional threads to perform quick-fix (shallow fsck) command"),
4469
4470 Option("bluestore_throttle_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4471 .set_default(64_M)
4472 .set_flag(Option::FLAG_RUNTIME)
4473 .set_description("Maximum bytes in flight before we throttle IO submission"),
4474
4475 Option("bluestore_throttle_deferred_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4476 .set_default(128_M)
4477 .set_flag(Option::FLAG_RUNTIME)
4478 .set_description("Maximum bytes for deferred writes before we throttle IO submission"),
4479
4480 Option("bluestore_throttle_cost_per_io", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4481 .set_default(0)
4482 .set_flag(Option::FLAG_RUNTIME)
4483 .set_description("Overhead added to transaction cost (in bytes) for each IO"),
4484
4485 Option("bluestore_throttle_cost_per_io_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4486 .set_default(670000)
4487 .set_flag(Option::FLAG_RUNTIME)
4488 .set_description("Default bluestore_throttle_cost_per_io for rotational media")
4489 .add_see_also("bluestore_throttle_cost_per_io"),
4490
4491 Option("bluestore_throttle_cost_per_io_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4492 .set_default(4000)
4493 .set_flag(Option::FLAG_RUNTIME)
4494 .set_description("Default bluestore_throttle_cost_per_io for non-rotation (solid state) media")
4495 .add_see_also("bluestore_throttle_cost_per_io"),
4496
4497 Option("bluestore_deferred_batch_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4498 .set_default(0)
4499 .set_flag(Option::FLAG_RUNTIME)
4500 .set_description("Max number of deferred writes before we flush the deferred write queue"),
4501
4502 Option("bluestore_deferred_batch_ops_hdd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4503 .set_default(64)
4504 .set_flag(Option::FLAG_RUNTIME)
4505 .set_description("Default bluestore_deferred_batch_ops for rotational media")
4506 .add_see_also("bluestore_deferred_batch_ops"),
4507
4508 Option("bluestore_deferred_batch_ops_ssd", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4509 .set_default(16)
4510 .set_flag(Option::FLAG_RUNTIME)
4511 .set_description("Default bluestore_deferred_batch_ops for non-rotational (solid state) media")
4512 .add_see_also("bluestore_deferred_batch_ops"),
4513
4514 Option("bluestore_nid_prealloc", Option::TYPE_INT, Option::LEVEL_DEV)
4515 .set_default(1024)
4516 .set_description("Number of unique object ids to preallocate at a time"),
4517
4518 Option("bluestore_blobid_prealloc", Option::TYPE_UINT, Option::LEVEL_DEV)
4519 .set_default(10240)
4520 .set_description("Number of unique blob ids to preallocate at a time"),
4521
4522 Option("bluestore_clone_cow", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4523 .set_default(true)
4524 .set_flag(Option::FLAG_RUNTIME)
4525 .set_description("Use copy-on-write when cloning objects (versus reading and rewriting them at clone time)"),
4526
4527 Option("bluestore_default_buffered_read", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4528 .set_default(true)
4529 .set_flag(Option::FLAG_RUNTIME)
4530 .set_description("Cache read results by default (unless hinted NOCACHE or WONTNEED)"),
4531
4532 Option("bluestore_default_buffered_write", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4533 .set_default(false)
4534 .set_flag(Option::FLAG_RUNTIME)
4535 .set_description("Cache writes by default (unless hinted NOCACHE or WONTNEED)"),
4536
4537 Option("bluestore_debug_misc", Option::TYPE_BOOL, Option::LEVEL_DEV)
4538 .set_default(false)
4539 .set_description(""),
4540
4541 Option("bluestore_debug_no_reuse_blocks", Option::TYPE_BOOL, Option::LEVEL_DEV)
4542 .set_default(false)
4543 .set_description(""),
4544
4545 Option("bluestore_debug_small_allocations", Option::TYPE_INT, Option::LEVEL_DEV)
4546 .set_default(0)
4547 .set_description(""),
4548
4549 Option("bluestore_debug_too_many_blobs_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
4550 .set_default(24*1024)
4551 .set_description(""),
4552
4553 Option("bluestore_debug_freelist", Option::TYPE_BOOL, Option::LEVEL_DEV)
4554 .set_default(false)
4555 .set_description(""),
4556
4557 Option("bluestore_debug_prefill", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4558 .set_default(0)
4559 .set_description("simulate fragmentation"),
4560
4561 Option("bluestore_debug_prefragment_max", Option::TYPE_SIZE, Option::LEVEL_DEV)
4562 .set_default(1_M)
4563 .set_description(""),
4564
4565 Option("bluestore_debug_inject_read_err", Option::TYPE_BOOL, Option::LEVEL_DEV)
4566 .set_default(false)
4567 .set_description(""),
4568
4569 Option("bluestore_debug_randomize_serial_transaction", Option::TYPE_INT, Option::LEVEL_DEV)
4570 .set_default(0)
4571 .set_description(""),
4572
4573 Option("bluestore_debug_omit_block_device_write", Option::TYPE_BOOL, Option::LEVEL_DEV)
4574 .set_default(false)
4575 .set_description(""),
4576
4577 Option("bluestore_debug_fsck_abort", Option::TYPE_BOOL, Option::LEVEL_DEV)
4578 .set_default(false)
4579 .set_description(""),
4580
4581 Option("bluestore_debug_omit_kv_commit", Option::TYPE_BOOL, Option::LEVEL_DEV)
4582 .set_default(false)
4583 .set_description(""),
4584
4585 Option("bluestore_debug_permit_any_bdev_label", Option::TYPE_BOOL, Option::LEVEL_DEV)
4586 .set_default(false)
4587 .set_description(""),
4588
4589 Option("bluestore_debug_random_read_err", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4590 .set_default(0)
4591 .set_description(""),
4592
4593 Option("bluestore_debug_inject_bug21040", Option::TYPE_BOOL, Option::LEVEL_DEV)
4594 .set_default(false)
4595 .set_description(""),
4596
4597 Option("bluestore_debug_inject_csum_err_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4598 .set_default(0.0)
4599 .set_description("inject crc verification errors into bluestore device reads"),
4600
4601 Option("bluestore_fsck_error_on_no_per_pool_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4602 .set_default(false)
4603 .set_description("Make fsck error (instead of warn) when bluestore lacks per-pool stats, e.g., after an upgrade"),
4604
4605 Option("bluestore_warn_on_bluefs_spillover", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4606 .set_default(true)
4607 .set_description("Enable health indication on bluefs slow device usage"),
4608
4609 Option("bluestore_warn_on_legacy_statfs", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4610 .set_default(true)
4611 .set_description("Enable health indication on lack of per-pool statfs reporting from bluestore"),
4612
4613 Option("bluestore_fsck_error_on_no_per_pool_omap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4614 .set_default(false)
4615 .set_description("Make fsck error (instead of warn) when objects without per-pool omap are found"),
4616
4617 Option("bluestore_warn_on_no_per_pool_omap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4618 .set_default(true)
4619 .set_description("Enable health indication on lack of per-pool omap"),
4620
4621 Option("bluestore_log_op_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4622 .set_default(5)
4623 .set_description("log operation if it's slower than this age (seconds)"),
4624
4625 Option("bluestore_log_omap_iterator_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4626 .set_default(5)
4627 .set_description("log omap iteration operation if it's slower than this age (seconds)"),
4628
4629 Option("bluestore_log_collection_list_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4630 .set_default(60)
4631 .set_description("log collection list operation if it's slower than this age (seconds)"),
4632
4633 Option("bluestore_debug_enforce_settings", Option::TYPE_STR, Option::LEVEL_DEV)
4634 .set_default("default")
4635 .set_enum_allowed({"default", "hdd", "ssd"})
4636 .set_description("Enforces specific hw profile settings")
4637 .set_long_description("'hdd' enforces settings intended for BlueStore above a rotational drive. 'ssd' enforces settings intended for BlueStore above a solid drive. 'default' - using settings for the actual hardware."),
4638
4639 Option("bluestore_avl_alloc_bf_threshold", Option::TYPE_UINT, Option::LEVEL_DEV)
4640 .set_default(131072)
4641 .set_description(""),
4642
4643 Option("bluestore_avl_alloc_bf_free_pct", Option::TYPE_UINT, Option::LEVEL_DEV)
4644 .set_default(4)
4645 .set_description(""),
4646
4647 Option("bluestore_hybrid_alloc_mem_cap", Option::TYPE_UINT, Option::LEVEL_DEV)
4648 .set_default(64_M)
4649 .set_description("Maximum RAM hybrid allocator should use before enabling bitmap supplement"),
4650
4651 Option("bluestore_volume_selection_policy", Option::TYPE_STR, Option::LEVEL_DEV)
4652 .set_default("rocksdb_original")
4653 .set_enum_allowed({ "rocksdb_original", "use_some_extra" })
4654 .set_description("Determines bluefs volume selection policy")
4655 .set_long_description("Determines bluefs volume selection policy. 'use_some_extra' policy allows to override RocksDB level granularity and put high level's data to faster device even when the level doesn't completely fit there"),
4656
4657 Option("bluestore_volume_selection_reserved_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4658 .set_flag(Option::FLAG_STARTUP)
4659 .set_default(2.0)
4660 .set_description("DB level size multiplier. Determines amount of space at DB device to bar from the usage when 'use some extra' policy is in action. Reserved size is determined as sum(L_max_size[0], L_max_size[L-1]) + L_max_size[L] * this_factor"),
4661
4662 Option("bluestore_volume_selection_reserved", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4663 .set_flag(Option::FLAG_STARTUP)
4664 .set_default(0)
4665 .set_description("Space reserved at DB device and not allowed for 'use some extra' policy usage. Overrides 'bluestore_volume_selection_reserved_factor' setting and introduces straightforward limit."),
4666
4667 Option("bluestore_ioring", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4668 .set_default(false)
4669 .set_description("Enables Linux io_uring API instead of libaio"),
4670
4671 // -----------------------------------------
4672 // kstore
4673
4674 Option("kstore_max_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4675 .set_default(512)
4676 .set_description(""),
4677
4678 Option("kstore_max_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4679 .set_default(64_M)
4680 .set_description(""),
4681
4682 Option("kstore_backend", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4683 .set_default("rocksdb")
4684 .set_description(""),
4685
4686 Option("kstore_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
4687 .set_default("compression=kNoCompression")
4688 .set_description("Options to pass through when RocksDB is used as the KeyValueDB for kstore."),
4689
4690 Option("kstore_fsck_on_mount", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4691 .set_default(false)
4692 .set_description("Whether or not to run fsck on mount for kstore."),
4693
4694 Option("kstore_fsck_on_mount_deep", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4695 .set_default(true)
4696 .set_description("Whether or not to run deep fsck on mount for kstore"),
4697
4698 Option("kstore_nid_prealloc", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4699 .set_default(1024)
4700 .set_description(""),
4701
4702 Option("kstore_sync_transaction", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4703 .set_default(false)
4704 .set_description(""),
4705
4706 Option("kstore_sync_submit_transaction", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4707 .set_default(false)
4708 .set_description(""),
4709
4710 Option("kstore_onode_map_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4711 .set_default(1024)
4712 .set_description(""),
4713
4714 Option("kstore_default_stripe_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4715 .set_default(65536)
4716 .set_description(""),
4717
4718 // ---------------------
4719 // filestore
4720
4721 Option("filestore_rocksdb_options", Option::TYPE_STR, Option::LEVEL_DEV)
4722 .set_default("max_background_jobs=10,compaction_readahead_size=2097152,compression=kNoCompression")
4723 .set_description("Options to pass through when RocksDB is used as the KeyValueDB for filestore."),
4724
4725 Option("filestore_omap_backend", Option::TYPE_STR, Option::LEVEL_DEV)
4726 .set_default("rocksdb")
4727 .set_enum_allowed({"leveldb", "rocksdb"})
4728 .set_description("The KeyValueDB to use for filestore metadata (ie omap)."),
4729
4730 Option("filestore_omap_backend_path", Option::TYPE_STR, Option::LEVEL_DEV)
4731 .set_default("")
4732 .set_description("The path where the filestore KeyValueDB should store it's database(s)."),
4733
4734 Option("filestore_wbthrottle_enable", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4735 .set_default(true)
4736 .set_description("Enabling throttling of operations to backing file system"),
4737
4738 Option("filestore_wbthrottle_btrfs_bytes_start_flusher", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4739 .set_default(41943040)
4740 .set_description("Start flushing (fsyncing) when this many bytes are written(btrfs)"),
4741
4742 Option("filestore_wbthrottle_btrfs_bytes_hard_limit", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4743 .set_default(419430400)
4744 .set_description("Block writes when this many bytes haven't been flushed (fsynced) (btrfs)"),
4745
4746 Option("filestore_wbthrottle_btrfs_ios_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4747 .set_default(500)
4748 .set_description("Start flushing (fsyncing) when this many IOs are written (brtrfs)"),
4749
4750 Option("filestore_wbthrottle_btrfs_ios_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4751 .set_default(5000)
4752 .set_description("Block writes when this many IOs haven't been flushed (fsynced) (btrfs)"),
4753
4754 Option("filestore_wbthrottle_btrfs_inodes_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4755 .set_default(500)
4756 .set_description("Start flushing (fsyncing) when this many distinct inodes have been modified (btrfs)"),
4757
4758 Option("filestore_wbthrottle_xfs_bytes_start_flusher", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4759 .set_default(41943040)
4760 .set_description("Start flushing (fsyncing) when this many bytes are written(xfs)"),
4761
4762 Option("filestore_wbthrottle_xfs_bytes_hard_limit", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4763 .set_default(419430400)
4764 .set_description("Block writes when this many bytes haven't been flushed (fsynced) (xfs)"),
4765
4766 Option("filestore_wbthrottle_xfs_ios_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4767 .set_default(500)
4768 .set_description("Start flushing (fsyncing) when this many IOs are written (xfs)"),
4769
4770 Option("filestore_wbthrottle_xfs_ios_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4771 .set_default(5000)
4772 .set_description("Block writes when this many IOs haven't been flushed (fsynced) (xfs)"),
4773
4774 Option("filestore_wbthrottle_xfs_inodes_start_flusher", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4775 .set_default(500)
4776 .set_description("Start flushing (fsyncing) when this many distinct inodes have been modified (xfs)"),
4777
4778 Option("filestore_wbthrottle_btrfs_inodes_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4779 .set_default(5000)
4780 .set_description("Block writing when this many inodes have outstanding writes (btrfs)"),
4781
4782 Option("filestore_wbthrottle_xfs_inodes_hard_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4783 .set_default(5000)
4784 .set_description("Block writing when this many inodes have outstanding writes (xfs)"),
4785
4786 Option("filestore_odsync_write", Option::TYPE_BOOL, Option::LEVEL_DEV)
4787 .set_default(false)
4788 .set_description("Write with O_DSYNC"),
4789
4790 Option("filestore_index_retry_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4791 .set_default(0)
4792 .set_description(""),
4793
4794 Option("filestore_debug_inject_read_err", Option::TYPE_BOOL, Option::LEVEL_DEV)
4795 .set_default(false)
4796 .set_description(""),
4797
4798 Option("filestore_debug_random_read_err", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4799 .set_default(0)
4800 .set_description(""),
4801
4802 Option("filestore_debug_omap_check", Option::TYPE_BOOL, Option::LEVEL_DEV)
4803 .set_default(false)
4804 .set_description(""),
4805
4806 Option("filestore_omap_header_cache_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4807 .set_default(1024)
4808 .set_description(""),
4809
4810 Option("filestore_max_inline_xattr_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4811 .set_default(0)
4812 .set_description(""),
4813
4814 Option("filestore_max_inline_xattr_size_xfs", Option::TYPE_SIZE, Option::LEVEL_DEV)
4815 .set_default(65536)
4816 .set_description(""),
4817
4818 Option("filestore_max_inline_xattr_size_btrfs", Option::TYPE_SIZE, Option::LEVEL_DEV)
4819 .set_default(2048)
4820 .set_description(""),
4821
4822 Option("filestore_max_inline_xattr_size_other", Option::TYPE_SIZE, Option::LEVEL_DEV)
4823 .set_default(512)
4824 .set_description(""),
4825
4826 Option("filestore_max_inline_xattrs", Option::TYPE_UINT, Option::LEVEL_DEV)
4827 .set_default(0)
4828 .set_description(""),
4829
4830 Option("filestore_max_inline_xattrs_xfs", Option::TYPE_UINT, Option::LEVEL_DEV)
4831 .set_default(10)
4832 .set_description(""),
4833
4834 Option("filestore_max_inline_xattrs_btrfs", Option::TYPE_UINT, Option::LEVEL_DEV)
4835 .set_default(10)
4836 .set_description(""),
4837
4838 Option("filestore_max_inline_xattrs_other", Option::TYPE_UINT, Option::LEVEL_DEV)
4839 .set_default(2)
4840 .set_description(""),
4841
4842 Option("filestore_max_xattr_value_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4843 .set_default(0)
4844 .set_description(""),
4845
4846 Option("filestore_max_xattr_value_size_xfs", Option::TYPE_SIZE, Option::LEVEL_DEV)
4847 .set_default(64_K)
4848 .set_description(""),
4849
4850 Option("filestore_max_xattr_value_size_btrfs", Option::TYPE_SIZE, Option::LEVEL_DEV)
4851 .set_default(64_K)
4852 .set_description(""),
4853
4854 Option("filestore_max_xattr_value_size_other", Option::TYPE_SIZE, Option::LEVEL_DEV)
4855 .set_default(1_K)
4856 .set_description(""),
4857
4858 Option("filestore_sloppy_crc", Option::TYPE_BOOL, Option::LEVEL_DEV)
4859 .set_default(false)
4860 .set_description(""),
4861
4862 Option("filestore_sloppy_crc_block_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4863 .set_default(65536)
4864 .set_description(""),
4865
4866 Option("filestore_max_alloc_hint_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
4867 .set_default(1ULL << 20)
4868 .set_description(""),
4869
4870 Option("filestore_max_sync_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4871 .set_default(5)
4872 .set_description("Period between calls to syncfs(2) and journal trims (seconds)"),
4873
4874 Option("filestore_min_sync_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4875 .set_default(.01)
4876 .set_description("Minimum period between calls to syncfs(2)"),
4877
4878 Option("filestore_btrfs_snap", Option::TYPE_BOOL, Option::LEVEL_DEV)
4879 .set_default(true)
4880 .set_description(""),
4881
4882 Option("filestore_btrfs_clone_range", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4883 .set_default(true)
4884 .set_description("Use btrfs clone_range ioctl to efficiently duplicate objects"),
4885
4886 Option("filestore_zfs_snap", Option::TYPE_BOOL, Option::LEVEL_DEV)
4887 .set_default(false)
4888 .set_description(""),
4889
4890 Option("filestore_fsync_flushes_journal_data", Option::TYPE_BOOL, Option::LEVEL_DEV)
4891 .set_default(false)
4892 .set_description(""),
4893
4894 Option("filestore_fiemap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4895 .set_default(false)
4896 .set_description("Use fiemap ioctl(2) to determine which parts of objects are sparse"),
4897
4898 Option("filestore_punch_hole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4899 .set_default(false)
4900 .set_description("Use fallocate(2) FALLOC_FL_PUNCH_HOLE to efficiently zero ranges of objects"),
4901
4902 Option("filestore_seek_data_hole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4903 .set_default(false)
4904 .set_description("Use lseek(2) SEEK_HOLE and SEEK_DATA to determine which parts of objects are sparse"),
4905
4906 Option("filestore_splice", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4907 .set_default(false)
4908 .set_description("Use splice(2) to more efficiently copy data between files"),
4909
4910 Option("filestore_fadvise", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4911 .set_default(true)
4912 .set_description("Use posix_fadvise(2) to pass hints to file system"),
4913
4914 Option("filestore_collect_device_partition_information", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4915 .set_default(true)
4916 .set_description("Collect metadata about the backing file system on OSD startup"),
4917
4918 Option("filestore_xfs_extsize", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
4919 .set_default(false)
4920 .set_description("Use XFS extsize ioctl(2) to hint allocator about expected write sizes"),
4921
4922 Option("filestore_journal_parallel", Option::TYPE_BOOL, Option::LEVEL_DEV)
4923 .set_default(false)
4924 .set_description(""),
4925
4926 Option("filestore_journal_writeahead", Option::TYPE_BOOL, Option::LEVEL_DEV)
4927 .set_default(false)
4928 .set_description(""),
4929
4930 Option("filestore_journal_trailing", Option::TYPE_BOOL, Option::LEVEL_DEV)
4931 .set_default(false)
4932 .set_description(""),
4933
4934 Option("filestore_queue_max_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
4935 .set_default(50)
4936 .set_description("Max IO operations in flight"),
4937
4938 Option("filestore_queue_max_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
4939 .set_default(100_M)
4940 .set_description("Max (written) bytes in flight"),
4941
4942 Option("filestore_caller_concurrency", Option::TYPE_INT, Option::LEVEL_DEV)
4943 .set_default(10)
4944 .set_description(""),
4945
4946 Option("filestore_expected_throughput_bytes", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4947 .set_default(200_M)
4948 .set_description("Expected throughput of backend device (aids throttling calculations)"),
4949
4950 Option("filestore_expected_throughput_ops", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4951 .set_default(200)
4952 .set_description("Expected through of backend device in IOPS (aids throttling calculations)"),
4953
4954 Option("filestore_queue_max_delay_multiple", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4955 .set_default(0)
4956 .set_description(""),
4957
4958 Option("filestore_queue_high_delay_multiple", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4959 .set_default(0)
4960 .set_description(""),
4961
4962 Option("filestore_queue_max_delay_multiple_bytes", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4963 .set_default(0)
4964 .set_description(""),
4965
4966 Option("filestore_queue_high_delay_multiple_bytes", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4967 .set_default(0)
4968 .set_description(""),
4969
4970 Option("filestore_queue_max_delay_multiple_ops", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4971 .set_default(0)
4972 .set_description(""),
4973
4974 Option("filestore_queue_high_delay_multiple_ops", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4975 .set_default(0)
4976 .set_description(""),
4977
4978 Option("filestore_queue_low_threshhold", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4979 .set_default(0.3)
4980 .set_description(""),
4981
4982 Option("filestore_queue_high_threshhold", Option::TYPE_FLOAT, Option::LEVEL_DEV)
4983 .set_default(0.9)
4984 .set_description(""),
4985
4986 Option("filestore_op_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4987 .set_default(2)
4988 .set_description("Threads used to apply changes to backing file system"),
4989
4990 Option("filestore_op_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4991 .set_default(60)
4992 .set_description("Seconds before a worker thread is considered stalled"),
4993
4994 Option("filestore_op_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
4995 .set_default(180)
4996 .set_description("Seconds before a worker thread is considered dead"),
4997
4998 Option("filestore_commit_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
4999 .set_default(600)
5000 .set_description("Seconds before backing file system is considered hung"),
5001
5002 Option("filestore_fiemap_threshold", Option::TYPE_SIZE, Option::LEVEL_DEV)
5003 .set_default(4_K)
5004 .set_description(""),
5005
5006 Option("filestore_merge_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
5007 .set_default(-10)
5008 .set_description(""),
5009
5010 Option("filestore_split_multiple", Option::TYPE_INT, Option::LEVEL_DEV)
5011 .set_default(2)
5012 .set_description(""),
5013
5014 Option("filestore_split_rand_factor", Option::TYPE_UINT, Option::LEVEL_DEV)
5015 .set_default(20)
5016 .set_description(""),
5017
5018 Option("filestore_update_to", Option::TYPE_INT, Option::LEVEL_DEV)
5019 .set_default(1000)
5020 .set_description(""),
5021
5022 Option("filestore_blackhole", Option::TYPE_BOOL, Option::LEVEL_DEV)
5023 .set_default(false)
5024 .set_description(""),
5025
5026 Option("filestore_fd_cache_size", Option::TYPE_INT, Option::LEVEL_DEV)
5027 .set_default(128)
5028 .set_description(""),
5029
5030 Option("filestore_fd_cache_shards", Option::TYPE_INT, Option::LEVEL_DEV)
5031 .set_default(16)
5032 .set_description(""),
5033
5034 Option("filestore_ondisk_finisher_threads", Option::TYPE_INT, Option::LEVEL_DEV)
5035 .set_default(1)
5036 .set_description(""),
5037
5038 Option("filestore_apply_finisher_threads", Option::TYPE_INT, Option::LEVEL_DEV)
5039 .set_default(1)
5040 .set_description(""),
5041
5042 Option("filestore_dump_file", Option::TYPE_STR, Option::LEVEL_DEV)
5043 .set_default("")
5044 .set_description(""),
5045
5046 Option("filestore_kill_at", Option::TYPE_INT, Option::LEVEL_DEV)
5047 .set_default(0)
5048 .set_description(""),
5049
5050 Option("filestore_inject_stall", Option::TYPE_INT, Option::LEVEL_DEV)
5051 .set_default(0)
5052 .set_description(""),
5053
5054 Option("filestore_fail_eio", Option::TYPE_BOOL, Option::LEVEL_DEV)
5055 .set_default(true)
5056 .set_description(""),
5057
5058 Option("filestore_debug_verify_split", Option::TYPE_BOOL, Option::LEVEL_DEV)
5059 .set_default(false)
5060 .set_description(""),
5061
5062 Option("journal_dio", Option::TYPE_BOOL, Option::LEVEL_DEV)
5063 .set_default(true)
5064 .set_description(""),
5065
5066 Option("journal_aio", Option::TYPE_BOOL, Option::LEVEL_DEV)
5067 .set_default(true)
5068 .set_description(""),
5069
5070 Option("journal_force_aio", Option::TYPE_BOOL, Option::LEVEL_DEV)
5071 .set_default(false)
5072 .set_description(""),
5073
5074 Option("journal_block_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
5075 .set_default(4_K)
5076 .set_description(""),
5077
5078 Option("journal_block_align", Option::TYPE_BOOL, Option::LEVEL_DEV)
5079 .set_default(true)
5080 .set_description(""),
5081
5082 Option("journal_write_header_frequency", Option::TYPE_UINT, Option::LEVEL_DEV)
5083 .set_default(0)
5084 .set_description(""),
5085
5086 Option("journal_max_write_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
5087 .set_default(10_M)
5088 .set_description("Max bytes in flight to journal"),
5089
5090 Option("journal_max_write_entries", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5091 .set_default(100)
5092 .set_description("Max IOs in flight to journal"),
5093
5094 Option("journal_throttle_low_threshhold", Option::TYPE_FLOAT, Option::LEVEL_DEV)
5095 .set_default(0.6)
5096 .set_description(""),
5097
5098 Option("journal_throttle_high_threshhold", Option::TYPE_FLOAT, Option::LEVEL_DEV)
5099 .set_default(0.9)
5100 .set_description(""),
5101
5102 Option("journal_throttle_high_multiple", Option::TYPE_FLOAT, Option::LEVEL_DEV)
5103 .set_default(0)
5104 .set_description(""),
5105
5106 Option("journal_throttle_max_multiple", Option::TYPE_FLOAT, Option::LEVEL_DEV)
5107 .set_default(0)
5108 .set_description(""),
5109
5110 Option("journal_align_min_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
5111 .set_default(64_K)
5112 .set_description(""),
5113
5114 Option("journal_replay_from", Option::TYPE_INT, Option::LEVEL_DEV)
5115 .set_default(0)
5116 .set_description(""),
5117
5118 Option("mgr_stats_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5119 .set_default((int64_t)PerfCountersBuilder::PRIO_USEFUL)
5120 .set_description("Lowest perfcounter priority collected by mgr")
5121 .set_long_description("Daemons only set perf counter data to the manager "
5122 "daemon if the counter has a priority higher than this.")
5123 .set_min_max((int64_t)PerfCountersBuilder::PRIO_DEBUGONLY,
5124 (int64_t)PerfCountersBuilder::PRIO_CRITICAL + 1),
5125
5126 Option("journal_zero_on_create", Option::TYPE_BOOL, Option::LEVEL_DEV)
5127 .set_default(false)
5128 .set_description(""),
5129
5130 Option("journal_ignore_corruption", Option::TYPE_BOOL, Option::LEVEL_DEV)
5131 .set_default(false)
5132 .set_description(""),
5133
5134 Option("journal_discard", Option::TYPE_BOOL, Option::LEVEL_DEV)
5135 .set_default(false)
5136 .set_description(""),
5137
5138 Option("fio_dir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5139 .set_default("/tmp/fio")
5140 .set_description(""),
5141
5142 Option("rados_mon_op_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5143 .set_default(0)
5144 .set_description(""),
5145
5146 Option("rados_osd_op_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5147 .set_default(0)
5148 .set_description(""),
5149
5150 Option("rados_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5151 .set_default(false)
5152 .set_description(""),
5153
5154 Option("cephadm_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5155 .set_default("/usr/sbin/cephadm")
5156 .add_service("mgr")
5157 .set_description("Path to cephadm utility"),
5158
5159 Option("mgr_module_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5160 .set_default(CEPH_DATADIR "/mgr")
5161 .add_service("mgr")
5162 .set_description("Filesystem path to manager modules."),
5163
5164 Option("mgr_initial_modules", Option::TYPE_STR, Option::LEVEL_BASIC)
5165 .set_default("restful iostat")
5166 .set_flag(Option::FLAG_NO_MON_UPDATE)
5167 .set_flag(Option::FLAG_CLUSTER_CREATE)
5168 .add_service("mon")
5169 .set_description("List of manager modules to enable when the cluster is "
5170 "first started")
5171 .set_long_description("This list of module names is read by the monitor "
5172 "when the cluster is first started after installation, to populate "
5173 "the list of enabled manager modules. Subsequent updates are done using "
5174 "the 'mgr module [enable|disable]' commands. List may be comma "
5175 "or space separated."),
5176
5177 Option("mgr_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5178 .set_default("/var/lib/ceph/mgr/$cluster-$id")
5179 .set_flag(Option::FLAG_NO_MON_UPDATE)
5180 .add_service("mgr")
5181 .set_description("Filesystem path to the ceph-mgr data directory, used to "
5182 "contain keyring."),
5183
5184 Option("mgr_tick_period", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
5185 .set_default(2)
5186 .add_service("mgr")
5187 .set_description("Period in seconds of beacon messages to monitor"),
5188
5189 Option("mgr_stats_period", Option::TYPE_INT, Option::LEVEL_BASIC)
5190 .set_default(5)
5191 .add_service("mgr")
5192 .set_description("Period in seconds of OSD/MDS stats reports to manager")
5193 .set_long_description("Use this setting to control the granularity of "
5194 "time series data collection from daemons. Adjust "
5195 "upwards if the manager CPU load is too high, or "
5196 "if you simply do not require the most up to date "
5197 "performance counter data."),
5198
5199 Option("mgr_client_bytes", Option::TYPE_SIZE, Option::LEVEL_DEV)
5200 .set_default(128_M)
5201 .add_service("mgr"),
5202
5203 Option("mgr_client_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
5204 .set_default(512)
5205 .add_service("mgr"),
5206
5207 Option("mgr_osd_bytes", Option::TYPE_SIZE, Option::LEVEL_DEV)
5208 .set_default(512_M)
5209 .add_service("mgr"),
5210
5211 Option("mgr_osd_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
5212 .set_default(8192)
5213 .add_service("mgr"),
5214
5215 Option("mgr_mds_bytes", Option::TYPE_SIZE, Option::LEVEL_DEV)
5216 .set_default(128_M)
5217 .add_service("mgr"),
5218
5219 Option("mgr_mds_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
5220 .set_default(128)
5221 .add_service("mgr"),
5222
5223 Option("mgr_mon_bytes", Option::TYPE_SIZE, Option::LEVEL_DEV)
5224 .set_default(128_M)
5225 .add_service("mgr"),
5226
5227 Option("mgr_mon_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
5228 .set_default(128)
5229 .add_service("mgr"),
5230
5231 Option("mgr_connect_retry_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
5232 .set_default(1.0)
5233 .add_service("common"),
5234
5235 Option("mgr_service_beacon_grace", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5236 .set_default(60.0)
5237 .add_service("mgr")
5238 .set_description("Period in seconds from last beacon to manager dropping "
5239 "state about a monitored service (RGW, rbd-mirror etc)"),
5240
5241 Option("mgr_client_service_daemon_unregister_timeout", Option::TYPE_FLOAT, Option::LEVEL_DEV)
5242 .set_default(1.0)
5243 .set_description("Time to wait during shutdown to deregister service with mgr"),
5244
5245 Option("mgr_debug_aggressive_pg_num_changes", Option::TYPE_BOOL, Option::LEVEL_DEV)
5246 .set_default(false)
5247 .set_description("Bypass most throttling and safety checks in pg[p]_num controller")
5248 .add_service("mgr"),
5249
5250 Option("mon_mgr_digest_period", Option::TYPE_INT, Option::LEVEL_DEV)
5251 .set_default(5)
5252 .add_service("mon")
5253 .set_description("Period in seconds between monitor-to-manager "
5254 "health/status updates"),
5255
5256 Option("mon_mgr_beacon_grace", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
5257 .set_default(30)
5258 .add_service("mon")
5259 .set_description("Period in seconds from last beacon to monitor marking "
5260 "a manager daemon as failed"),
5261
5262 Option("mon_mgr_inactive_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5263 .set_default(60)
5264 .add_service("mon")
5265 .set_description("Period in seconds after cluster creation during which "
5266 "cluster may have no active manager")
5267 .set_long_description("This grace period enables the cluster to come "
5268 "up cleanly without raising spurious health check "
5269 "failures about managers that aren't online yet"),
5270
5271 Option("mon_mgr_mkfs_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5272 .set_default(120)
5273 .add_service("mon")
5274 .set_description("Period in seconds that the cluster may have no active "
5275 "manager before this is reported as an ERR rather than "
5276 "a WARN"),
5277
5278 Option("throttler_perf_counter", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5279 .set_default(true)
5280 .set_description(""),
5281
5282 Option("event_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5283 .set_default(false)
5284 .set_description(""),
5285
5286 Option("bluestore_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5287 .set_default(false)
5288 .set_description("Enable bluestore event tracing."),
5289
5290 Option("bluestore_throttle_trace_rate", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5291 .set_default(0)
5292 .set_description("Rate at which to sample bluestore transactions (per second)"),
5293
5294 Option("debug_deliberately_leak_memory", Option::TYPE_BOOL, Option::LEVEL_DEV)
5295 .set_default(false)
5296 .set_description(""),
5297
5298 Option("debug_asserts_on_shutdown", Option::TYPE_BOOL,Option::LEVEL_DEV)
5299 .set_default(false)
5300 .set_description("Enable certain asserts to check for refcounting bugs on shutdown; see http://tracker.ceph.com/issues/21738"),
5301
5302 Option("debug_asok_assert_abort", Option::TYPE_BOOL, Option::LEVEL_DEV)
5303 .set_default(false)
5304 .set_description("allow commands 'assert' and 'abort' via asok for testing crash dumps etc"),
5305
5306 Option("target_max_misplaced_ratio", Option::TYPE_FLOAT, Option::LEVEL_BASIC)
5307 .set_default(.05)
5308 .set_description("Max ratio of misplaced objects to target when throttling data rebalancing activity"),
5309
5310 Option("device_failure_prediction_mode", Option::TYPE_STR, Option::LEVEL_BASIC)
5311 .set_default("none")
5312 .set_flag(Option::FLAG_RUNTIME)
5313 .set_enum_allowed({"none", "local", "cloud"})
5314 .set_description("Method used to predict device failures")
5315 .set_long_description("To disable prediction, use 'none', 'local' uses a prediction model that runs inside the mgr daemon. 'cloud' will share metrics with a cloud service and query the service for devicelife expectancy."),
5316
5317 /* KRB Authentication. */
5318 Option("gss_ktab_client_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5319 .set_default("/var/lib/ceph/$name/gss_client_$name.ktab")
5320 .set_description("GSS/KRB5 Keytab file for client authentication")
5321 .add_service({"mon", "osd"})
5322 .set_long_description("This sets the full path for the GSS/Kerberos client keytab file location."),
5323
5324 Option("gss_target_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5325 .set_default("ceph")
5326 .set_description("")
5327 .add_service({"mon", "osd"})
5328 .set_long_description("This sets the gss target service name."),
5329
5330 Option("debug_disable_randomized_ping", Option::TYPE_BOOL, Option::LEVEL_DEV)
5331 .set_default(false)
5332 .set_description("Disable heartbeat ping randomization for testing purposes"),
5333
5334 Option("debug_heartbeat_testing_span", Option::TYPE_INT, Option::LEVEL_DEV)
5335 .set_default(0)
5336 .set_description("Override 60 second periods for testing only"),
5337
5338 // ----------------------------
5339 // Crimson specific options
5340
5341 Option("crimson_osd_obc_lru_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5342 .set_default(10)
5343 .set_description("Number of obcs to cache")
5344
5345 });
5346 }
5347
5348 std::vector<Option> get_rgw_options() {
5349 return std::vector<Option>({
5350 Option("rgw_acl_grants_max_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5351 .set_default(100)
5352 .set_description("Max number of ACL grants in a single request"),
5353
5354 Option("rgw_cors_rules_max_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5355 .set_default(100)
5356 .set_description("Max number of cors rules in a single request"),
5357
5358 Option("rgw_delete_multi_obj_max_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5359 .set_default(1000)
5360 .set_description("Max number of objects in a single multi-object delete request"),
5361
5362 Option("rgw_website_routing_rules_max_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5363 .set_default(50)
5364 .set_description("Max number of website routing rules in a single request"),
5365
5366 Option("rgw_rados_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5367 .set_default(false)
5368 .set_description("true if LTTng-UST tracepoints should be enabled"),
5369
5370 Option("rgw_op_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5371 .set_default(false)
5372 .set_description("true if LTTng-UST tracepoints should be enabled"),
5373
5374 Option("rgw_max_chunk_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
5375 .set_default(4_M)
5376 .set_description("Set RGW max chunk size")
5377 .set_long_description(
5378 "The chunk size is the size of RADOS I/O requests that RGW sends when accessing "
5379 "data objects. RGW read and write operation will never request more than this amount "
5380 "in a single request. This also defines the rgw object head size, as head operations "
5381 "need to be atomic, and anything larger than this would require more than a single "
5382 "operation."),
5383
5384 Option("rgw_put_obj_min_window_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
5385 .set_default(16_M)
5386 .set_description("The minimum RADOS write window size (in bytes).")
5387 .set_long_description(
5388 "The window size determines the total concurrent RADOS writes of a single rgw object. "
5389 "When writing an object RGW will send multiple chunks to RADOS. The total size of the "
5390 "writes does not exceed the window size. The window size can be automatically "
5391 "in order to better utilize the pipe.")
5392 .add_see_also({"rgw_put_obj_max_window_size", "rgw_max_chunk_size"}),
5393
5394 Option("rgw_put_obj_max_window_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
5395 .set_default(64_M)
5396 .set_description("The maximum RADOS write window size (in bytes).")
5397 .set_long_description("The window size may be dynamically adjusted, but will not surpass this value.")
5398 .add_see_also({"rgw_put_obj_min_window_size", "rgw_max_chunk_size"}),
5399
5400 Option("rgw_max_put_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
5401 .set_default(5_G)
5402 .set_description("Max size (in bytes) of regular (non multi-part) object upload.")
5403 .set_long_description(
5404 "Plain object upload is capped at this amount of data. In order to upload larger "
5405 "objects, a special upload mechanism is required. The S3 API provides the "
5406 "multi-part upload, and Swift provides DLO and SLO."),
5407
5408 Option("rgw_max_put_param_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
5409 .set_default(1_M)
5410 .set_description("The maximum size (in bytes) of data input of certain RESTful requests."),
5411
5412 Option("rgw_max_attr_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
5413 .set_default(0)
5414 .set_description("The maximum length of metadata value. 0 skips the check"),
5415
5416 Option("rgw_max_attr_name_len", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
5417 .set_default(0)
5418 .set_description("The maximum length of metadata name. 0 skips the check"),
5419
5420 Option("rgw_max_attrs_num_in_req", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5421 .set_default(0)
5422 .set_description("The maximum number of metadata items that can be put via single request"),
5423
5424 Option("rgw_override_bucket_index_max_shards", Option::TYPE_UINT, Option::LEVEL_DEV)
5425 .set_default(0)
5426 .set_description("The default number of bucket index shards for newly-created "
5427 "buckets. This value overrides bucket_index_max_shards stored in the zone. "
5428 "Setting this value in the zone is preferred, because it applies globally "
5429 "to all radosgw daemons running in the zone."),
5430
5431 Option("rgw_bucket_index_max_aio", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5432 .set_default(128)
5433 .set_description("Max number of concurrent RADOS requests when handling bucket shards."),
5434
5435 Option("rgw_enable_quota_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5436 .set_default(true)
5437 .set_description("Enables the quota maintenance thread.")
5438 .set_long_description(
5439 "The quota maintenance thread is responsible for quota related maintenance work. "
5440 "The thread itself can be disabled, but in order for quota to work correctly, at "
5441 "least one RGW in each zone needs to have this thread running. Having the thread "
5442 "enabled on multiple RGW processes within the same zone can spread "
5443 "some of the maintenance work between them.")
5444 .add_see_also({"rgw_enable_gc_threads", "rgw_enable_lc_threads"}),
5445
5446 Option("rgw_enable_gc_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5447 .set_default(true)
5448 .set_description("Enables the garbage collection maintenance thread.")
5449 .set_long_description(
5450 "The garbage collection maintenance thread is responsible for garbage collector "
5451 "maintenance work. The thread itself can be disabled, but in order for garbage "
5452 "collection to work correctly, at least one RGW in each zone needs to have this "
5453 "thread running. Having the thread enabled on multiple RGW processes within the "
5454 "same zone can spread some of the maintenance work between them.")
5455 .add_see_also({"rgw_enable_quota_threads", "rgw_enable_lc_threads"}),
5456
5457 Option("rgw_enable_lc_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5458 .set_default(true)
5459 .set_description("Enables the lifecycle maintenance thread. This is required on at least one rgw for each zone.")
5460 .set_long_description(
5461 "The lifecycle maintenance thread is responsible for lifecycle related maintenance "
5462 "work. The thread itself can be disabled, but in order for lifecycle to work "
5463 "correctly, at least one RGW in each zone needs to have this thread running. Having"
5464 "the thread enabled on multiple RGW processes within the same zone can spread "
5465 "some of the maintenance work between them.")
5466 .add_see_also({"rgw_enable_gc_threads", "rgw_enable_quota_threads"}),
5467
5468 Option("rgw_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5469 .set_default("/var/lib/ceph/radosgw/$cluster-$id")
5470 .set_flag(Option::FLAG_NO_MON_UPDATE)
5471 .set_description("Alternative location for RGW configuration.")
5472 .set_long_description(
5473 "If this is set, the different Ceph system configurables (such as the keyring file "
5474 "will be located in the path that is specified here. "),
5475
5476 Option("rgw_enable_apis", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5477 .set_default("s3, s3website, swift, swift_auth, admin, sts, iam, pubsub")
5478 .set_description("A list of set of RESTful APIs that rgw handles."),
5479
5480 Option("rgw_cache_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5481 .set_default(true)
5482 .set_description("Enable RGW metadata cache.")
5483 .set_long_description(
5484 "The metadata cache holds metadata entries that RGW requires for processing "
5485 "requests. Metadata entries can be user info, bucket info, and bucket instance "
5486 "info. If not found in the cache, entries will be fetched from the backing "
5487 "RADOS store.")
5488 .add_see_also("rgw_cache_lru_size"),
5489
5490 Option("rgw_cache_lru_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5491 .set_default(10000)
5492 .set_description("Max number of items in RGW metadata cache.")
5493 .set_long_description(
5494 "When full, the RGW metadata cache evicts least recently used entries.")
5495 .add_see_also("rgw_cache_enabled"),
5496
5497 Option("rgw_socket_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5498 .set_default("")
5499 .set_description("RGW FastCGI socket path (for FastCGI over Unix domain sockets).")
5500 .add_see_also("rgw_fcgi_socket_backlog"),
5501
5502 Option("rgw_host", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5503 .set_default("")
5504 .set_description("RGW FastCGI host name (for FastCGI over TCP)")
5505 .add_see_also({"rgw_port", "rgw_fcgi_socket_backlog"}),
5506
5507 Option("rgw_port", Option::TYPE_STR, Option::LEVEL_BASIC)
5508 .set_default("")
5509 .set_description("RGW FastCGI port number (for FastCGI over TCP)")
5510 .add_see_also({"rgw_host", "rgw_fcgi_socket_backlog"}),
5511
5512 Option("rgw_dns_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5513 .set_default("")
5514 .set_description("The host name that RGW uses.")
5515 .set_long_description(
5516 "This is Needed for virtual hosting of buckets to work properly, unless configured "
5517 "via zonegroup configuration."),
5518
5519 Option("rgw_dns_s3website_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5520 .set_default("")
5521 .set_description("The host name that RGW uses for static websites (S3)")
5522 .set_long_description(
5523 "This is needed for virtual hosting of buckets, unless configured via zonegroup "
5524 "configuration."),
5525
5526 Option("rgw_numa_node", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5527 .set_default(-1)
5528 .set_flag(Option::FLAG_STARTUP)
5529 .set_description("set rgw's cpu affinity to a numa node (-1 for none)"),
5530
5531 Option("rgw_service_provider_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5532 .set_default("")
5533 .set_description("Service provider name which is contained in http response headers")
5534 .set_long_description(
5535 "As S3 or other cloud storage providers do, http response headers should contain the name of the provider. "
5536 "This name will be placed in http header 'Server'."),
5537
5538 Option("rgw_content_length_compat", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5539 .set_default(false)
5540 .set_description("Multiple content length headers compatibility")
5541 .set_long_description(
5542 "Try to handle requests with abiguous multiple content length headers "
5543 "(Content-Length, Http-Content-Length)."),
5544
5545 Option("rgw_relaxed_region_enforcement", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5546 .set_default(false)
5547 .set_description("Disable region constraint enforcement")
5548 .set_long_description(
5549 "Enable requests such as bucket creation to succeed irrespective of region restrictions (Jewel compat)."),
5550
5551 Option("rgw_lifecycle_work_time", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5552 .set_default("00:00-06:00")
5553 .set_description("Lifecycle allowed work time")
5554 .set_long_description("Local time window in which the lifecycle maintenance thread can work."),
5555
5556 Option("rgw_lc_lock_max_time", Option::TYPE_INT, Option::LEVEL_DEV)
5557 .set_default(90)
5558 .set_description(""),
5559
5560 Option("rgw_lc_thread_delay", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5561 .set_default(0)
5562 .set_description("Delay after processing of bucket listing chunks (i.e., per 1000 entries) in milliseconds"),
5563
5564 Option("rgw_lc_max_worker", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5565 .set_default(3)
5566 .set_description("Number of LCWorker tasks that will be run in parallel")
5567 .set_long_description(
5568 "Number of LCWorker tasks that will run in parallel--used to permit >1 "
5569 "bucket/index shards to be processed simultaneously"),
5570
5571 Option("rgw_lc_max_wp_worker", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5572 .set_default(3)
5573 .set_description("Number of workpool threads per LCWorker")
5574 .set_long_description(
5575 "Number of threads in per-LCWorker workpools--used to accelerate "
5576 "per-bucket processing"),
5577
5578 Option("rgw_lc_max_objs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5579 .set_default(32)
5580 .set_description("Number of lifecycle data shards")
5581 .set_long_description(
5582 "Number of RADOS objects to use for storing lifecycle index. This "
5583 "affects concurrency of lifecycle maintenance, as shards can be "
5584 "processed in parallel."),
5585
5586 Option("rgw_lc_max_rules", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5587 .set_default(1000)
5588 .set_description("Max number of lifecycle rules set on one bucket")
5589 .set_long_description("Number of lifecycle rules set on one bucket should be limited."),
5590
5591 Option("rgw_lc_debug_interval", Option::TYPE_INT, Option::LEVEL_DEV)
5592 .set_default(-1)
5593 .set_description(""),
5594
5595 Option("rgw_mp_lock_max_time", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5596 .set_default(600)
5597 .set_description("Multipart upload max completion time")
5598 .set_long_description(
5599 "Time length to allow completion of a multipart upload operation. This is done "
5600 "to prevent concurrent completions on the same object with the same upload id."),
5601
5602 Option("rgw_script_uri", Option::TYPE_STR, Option::LEVEL_DEV)
5603 .set_default("")
5604 .set_description(""),
5605
5606 Option("rgw_request_uri", Option::TYPE_STR, Option::LEVEL_DEV)
5607 .set_default("")
5608 .set_description(""),
5609
5610 Option("rgw_ignore_get_invalid_range", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5611 .set_default(false)
5612 .set_description("Treat invalid (e.g., negative) range request as full")
5613 .set_long_description("Treat invalid (e.g., negative) range request "
5614 "as request for the full object (AWS compatibility)"),
5615
5616 Option("rgw_swift_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5617 .set_default("")
5618 .set_description("Swift-auth storage URL")
5619 .set_long_description(
5620 "Used in conjunction with rgw internal swift authentication. This affects the "
5621 "X-Storage-Url response header value.")
5622 .add_see_also("rgw_swift_auth_entry"),
5623
5624 Option("rgw_swift_url_prefix", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5625 .set_default("swift")
5626 .set_description("Swift URL prefix")
5627 .set_long_description("The URL path prefix for swift requests."),
5628
5629 Option("rgw_swift_auth_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5630 .set_default("")
5631 .set_description("Swift auth URL")
5632 .set_long_description(
5633 "Default url to which RGW connects and verifies tokens for v1 auth (if not using "
5634 "internal swift auth)."),
5635
5636 Option("rgw_swift_auth_entry", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5637 .set_default("auth")
5638 .set_description("Swift auth URL prefix")
5639 .set_long_description("URL path prefix for internal swift auth requests.")
5640 .add_see_also("rgw_swift_url"),
5641
5642 Option("rgw_swift_tenant_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5643 .set_default("")
5644 .set_description("Swift tenant name")
5645 .set_long_description("Tenant name that is used when constructing the swift path.")
5646 .add_see_also("rgw_swift_account_in_url"),
5647
5648 Option("rgw_swift_account_in_url", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5649 .set_default(false)
5650 .set_description("Swift account encoded in URL")
5651 .set_long_description("Whether the swift account is encoded in the uri path (AUTH_<account>).")
5652 .add_see_also("rgw_swift_tenant_name"),
5653
5654 Option("rgw_swift_enforce_content_length", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5655 .set_default(false)
5656 .set_description("Send content length when listing containers (Swift)")
5657 .set_long_description(
5658 "Whether content length header is needed when listing containers. When this is "
5659 "set to false, RGW will send extra info for each entry in the response."),
5660
5661 Option("rgw_keystone_url", Option::TYPE_STR, Option::LEVEL_BASIC)
5662 .set_default("")
5663 .set_description("The URL to the Keystone server."),
5664
5665 Option("rgw_keystone_admin_token", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5666 .set_default("")
5667 .set_description("DEPRECATED: The admin token (shared secret) that is used for the Keystone requests."),
5668
5669 Option("rgw_keystone_admin_token_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5670 .set_default("")
5671 .set_description("Path to a file containing the admin token (shared secret) that is used for the Keystone requests."),
5672
5673 Option("rgw_keystone_admin_user", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5674 .set_default("")
5675 .set_description("Keystone admin user."),
5676
5677 Option("rgw_keystone_admin_password", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5678 .set_default("")
5679 .set_description("DEPRECATED: Keystone admin password."),
5680
5681 Option("rgw_keystone_admin_password_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5682 .set_default("")
5683 .set_description("Path to a file containing the Keystone admin password."),
5684
5685 Option("rgw_keystone_admin_tenant", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5686 .set_default("")
5687 .set_description("Keystone admin user tenant."),
5688
5689 Option("rgw_keystone_admin_project", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5690 .set_default("")
5691 .set_description("Keystone admin user project (for Keystone v3)."),
5692
5693 Option("rgw_keystone_admin_domain", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5694 .set_default("")
5695 .set_description("Keystone admin user domain (for Keystone v3)."),
5696
5697 Option("rgw_keystone_barbican_user", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5698 .set_default("")
5699 .set_description("Keystone user to access barbican secrets."),
5700
5701 Option("rgw_keystone_barbican_password", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5702 .set_default("")
5703 .set_description("Keystone password for barbican user."),
5704
5705 Option("rgw_keystone_barbican_tenant", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5706 .set_default("")
5707 .set_description("Keystone barbican user tenant (Keystone v2.0)."),
5708
5709 Option("rgw_keystone_barbican_project", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5710 .set_default("")
5711 .set_description("Keystone barbican user project (Keystone v3)."),
5712
5713 Option("rgw_keystone_barbican_domain", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5714 .set_default("")
5715 .set_description("Keystone barbican user domain."),
5716
5717 Option("rgw_keystone_api_version", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5718 .set_default(2)
5719 .set_description("Version of Keystone API to use (2 or 3)."),
5720
5721 Option("rgw_keystone_accepted_roles", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5722 .set_default("Member, admin")
5723 .set_description("Only users with one of these roles will be served when doing Keystone authentication."),
5724
5725 Option("rgw_keystone_accepted_admin_roles", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5726 .set_default("")
5727 .set_description("List of roles allowing user to gain admin privileges (Keystone)."),
5728
5729 Option("rgw_keystone_token_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5730 .set_default(10000)
5731 .set_description("Keystone token cache size")
5732 .set_long_description(
5733 "Max number of Keystone tokens that will be cached. Token that is not cached "
5734 "requires RGW to access the Keystone server when authenticating."),
5735
5736 Option("rgw_keystone_verify_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5737 .set_default(true)
5738 .set_description("Should RGW verify the Keystone server SSL certificate."),
5739
5740 Option("rgw_keystone_implicit_tenants", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5741 .set_default("false")
5742 .set_enum_allowed( { "false", "true", "swift", "s3", "both", "0", "1", "none" } )
5743 .set_description("RGW Keystone implicit tenants creation")
5744 .set_long_description(
5745 "Implicitly create new users in their own tenant with the same name when "
5746 "authenticating via Keystone. Can be limited to s3 or swift only."),
5747
5748 Option("rgw_cross_domain_policy", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5749 .set_default("<allow-access-from domain=\"*\" secure=\"false\" />")
5750 .set_description("RGW handle cross domain policy")
5751 .set_long_description("Returned cross domain policy when accessing the crossdomain.xml "
5752 "resource (Swift compatiility)."),
5753
5754 Option("rgw_healthcheck_disabling_path", Option::TYPE_STR, Option::LEVEL_DEV)
5755 .set_default("")
5756 .set_description("Swift health check api can be disabled if a file can be accessed in this path."),
5757
5758 Option("rgw_s3_auth_use_rados", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5759 .set_default(true)
5760 .set_description("Should S3 authentication use credentials stored in RADOS backend."),
5761
5762 Option("rgw_s3_auth_use_keystone", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5763 .set_default(false)
5764 .set_description("Should S3 authentication use Keystone."),
5765
5766 Option("rgw_s3_auth_order", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5767 .set_default("sts, external, local")
5768 .set_description("Authentication strategy order to use for s3 authentication")
5769 .set_long_description(
5770 "Order of authentication strategies to try for s3 authentication, the allowed "
5771 "options are a comma separated list of engines external, local. The "
5772 "default order is to try all the externally configured engines before "
5773 "attempting local rados based authentication"),
5774
5775 Option("rgw_barbican_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5776 .set_default("")
5777 .set_description("URL to barbican server."),
5778
5779 Option("rgw_ldap_uri", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5780 .set_default("ldaps://<ldap.your.domain>")
5781 .set_description("Space-separated list of LDAP servers in URI format."),
5782
5783 Option("rgw_ldap_binddn", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5784 .set_default("uid=admin,cn=users,dc=example,dc=com")
5785 .set_description("LDAP entry RGW will bind with (user match)."),
5786
5787 Option("rgw_ldap_searchdn", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5788 .set_default("cn=users,cn=accounts,dc=example,dc=com")
5789 .set_description("LDAP search base (basedn)."),
5790
5791 Option("rgw_ldap_dnattr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5792 .set_default("uid")
5793 .set_description("LDAP attribute containing RGW user names (to form binddns)."),
5794
5795 Option("rgw_ldap_secret", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5796 .set_default("/etc/openldap/secret")
5797 .set_description("Path to file containing credentials for rgw_ldap_binddn."),
5798
5799 Option("rgw_s3_auth_use_ldap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5800 .set_default(false)
5801 .set_description("Should S3 authentication use LDAP."),
5802
5803 Option("rgw_ldap_searchfilter", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5804 .set_default("")
5805 .set_description("LDAP search filter."),
5806
5807 Option("rgw_opa_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5808 .set_default("")
5809 .set_description("URL to OPA server."),
5810
5811 Option("rgw_opa_token", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5812 .set_default("")
5813 .set_description("The Bearer token OPA uses to authenticate client requests."),
5814
5815 Option("rgw_opa_verify_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5816 .set_default(true)
5817 .set_description("Should RGW verify the OPA server SSL certificate."),
5818
5819 Option("rgw_use_opa_authz", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5820 .set_default(false)
5821 .set_description("Should OPA be used to authorize client requests."),
5822
5823 Option("rgw_admin_entry", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5824 .set_default("admin")
5825 .set_description("Path prefix to be used for accessing RGW RESTful admin API."),
5826
5827 Option("rgw_enforce_swift_acls", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5828 .set_default(true)
5829 .set_description("RGW enforce swift acls")
5830 .set_long_description(
5831 "Should RGW enforce special Swift-only ACLs. Swift has a special ACL that gives "
5832 "permission to access all objects in a container."),
5833
5834 Option("rgw_swift_token_expiration", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5835 .set_default(1_day)
5836 .set_description("Expiration time (in seconds) for token generated through RGW Swift auth."),
5837
5838 Option("rgw_print_continue", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5839 .set_default(true)
5840 .set_description("RGW support of 100-continue")
5841 .set_long_description(
5842 "Should RGW explicitly send 100 (continue) responses. This is mainly relevant when "
5843 "using FastCGI, as some FastCGI modules do not fully support this feature."),
5844
5845 Option("rgw_print_prohibited_content_length", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5846 .set_default(false)
5847 .set_description("RGW RFC-7230 compatibility")
5848 .set_long_description(
5849 "Specifies whether RGW violates RFC 7230 and sends Content-Length with 204 or 304 "
5850 "statuses."),
5851
5852 Option("rgw_remote_addr_param", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5853 .set_default("REMOTE_ADDR")
5854 .set_description("HTTP header that holds the remote address in incoming requests.")
5855 .set_long_description(
5856 "RGW will use this header to extract requests origin. When RGW runs behind "
5857 "a reverse proxy, the remote address header will point at the proxy's address "
5858 "and not at the originator's address. Therefore it is sometimes possible to "
5859 "have the proxy add the originator's address in a separate HTTP header, which "
5860 "will allow RGW to log it correctly."
5861 )
5862 .add_see_also("rgw_enable_ops_log"),
5863
5864 Option("rgw_op_thread_timeout", Option::TYPE_INT, Option::LEVEL_DEV)
5865 .set_default(10*60)
5866 .set_description("Timeout for async rados coroutine operations."),
5867
5868 Option("rgw_op_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_DEV)
5869 .set_default(0)
5870 .set_description(""),
5871
5872 Option("rgw_thread_pool_size", Option::TYPE_INT, Option::LEVEL_BASIC)
5873 .set_default(512)
5874 .set_description("RGW requests handling thread pool size.")
5875 .set_long_description(
5876 "This parameter determines the number of concurrent requests RGW can process "
5877 "when using either the civetweb, or the fastcgi frontends. The higher this "
5878 "number is, RGW will be able to deal with more concurrent requests at the "
5879 "cost of more resource utilization."),
5880
5881 Option("rgw_num_control_oids", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5882 .set_default(8)
5883 .set_description("Number of control objects used for cross-RGW communication.")
5884 .set_long_description(
5885 "RGW uses certain control objects to send messages between different RGW "
5886 "processes running on the same zone. These messages include metadata cache "
5887 "invalidation info that is being sent when metadata is modified (such as "
5888 "user or bucket information). A higher number of control objects allows "
5889 "better concurrency of these messages, at the cost of more resource "
5890 "utilization."),
5891
5892 Option("rgw_num_rados_handles", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5893 .set_default(1)
5894 .set_description("Number of librados handles that RGW uses.")
5895 .set_long_description(
5896 "This param affects the number of separate librados handles it uses to "
5897 "connect to the RADOS backend, which directly affects the number of connections "
5898 "RGW will have to each OSD. A higher number affects resource utilization."),
5899
5900 Option("rgw_verify_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5901 .set_default(true)
5902 .set_description("Should RGW verify SSL when connecing to a remote HTTP server")
5903 .set_long_description(
5904 "RGW can send requests to other RGW servers (e.g., in multi-site sync work). "
5905 "This configurable selects whether RGW should verify the certificate for "
5906 "the remote peer and host.")
5907 .add_see_also("rgw_keystone_verify_ssl"),
5908
5909 Option("rgw_nfs_lru_lanes", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5910 .set_default(5)
5911 .set_description(""),
5912
5913 Option("rgw_nfs_lru_lane_hiwat", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5914 .set_default(911)
5915 .set_description(""),
5916
5917 Option("rgw_nfs_fhcache_partitions", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5918 .set_default(3)
5919 .set_description(""),
5920
5921 Option("rgw_nfs_fhcache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5922 .set_default(2017)
5923 .set_description(""),
5924
5925 Option("rgw_nfs_namespace_expire_secs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5926 .set_default(300)
5927 .set_min(1)
5928 .set_description(""),
5929
5930 Option("rgw_nfs_max_gc", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5931 .set_default(300)
5932 .set_min(1)
5933 .set_description(""),
5934
5935 Option("rgw_nfs_write_completion_interval_s", Option::TYPE_INT, Option::LEVEL_ADVANCED)
5936 .set_default(10)
5937 .set_description(""),
5938
5939 Option("rgw_nfs_s3_fast_attrs", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5940 .set_default(false)
5941 .set_description("use fast S3 attrs from bucket index (immutable only)")
5942 .set_long_description("use fast S3 attrs from bucket index (assumes NFS "
5943 "mounts are immutable)"),
5944
5945 Option("rgw_nfs_run_gc_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5946 .set_default(false)
5947 .set_description("run GC threads in librgw (default off)"),
5948
5949 Option("rgw_nfs_run_lc_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5950 .set_default(false)
5951 .set_description("run lifecycle threads in librgw (default off)"),
5952
5953 Option("rgw_nfs_run_quota_threads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5954 .set_default(false)
5955 .set_description("run quota threads in librgw (default off)"),
5956
5957 Option("rgw_nfs_run_sync_thread", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
5958 .set_default(false)
5959 .set_description("run sync thread in librgw (default off)"),
5960
5961 Option("rgw_rados_pool_autoscale_bias", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
5962 .set_default(4.0)
5963 .set_min_max(0.01, 100000.0)
5964 .set_description("pg_autoscale_bias value for RGW metadata (omap-heavy) pools"),
5965
5966 Option("rgw_rados_pool_pg_num_min", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5967 .set_default(8)
5968 .set_min_max(1, 1024)
5969 .set_description("pg_num_min value for RGW metadata (omap-heavy) pools"),
5970
5971 Option("rgw_rados_pool_recovery_priority", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
5972 .set_default(5)
5973 .set_min_max(-10, 10)
5974 .set_description("recovery_priority value for RGW metadata (omap-heavy) pools"),
5975
5976 Option("rgw_zone", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5977 .set_default("")
5978 .set_description("Zone name")
5979 .add_see_also({"rgw_zonegroup", "rgw_realm"}),
5980
5981 Option("rgw_zone_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5982 .set_default(".rgw.root")
5983 .set_description("Zone root pool name")
5984 .set_long_description(
5985 "The zone root pool, is the pool where the RGW zone configuration located."
5986 )
5987 .add_see_also({"rgw_zonegroup_root_pool", "rgw_realm_root_pool", "rgw_period_root_pool"}),
5988
5989 Option("rgw_default_zone_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5990 .set_default("default.zone")
5991 .set_description("Default zone info object id")
5992 .set_long_description(
5993 "Name of the RADOS object that holds the default zone information."
5994 ),
5995
5996 Option("rgw_region", Option::TYPE_STR, Option::LEVEL_ADVANCED)
5997 .set_default("")
5998 .set_description("Region name")
5999 .set_long_description(
6000 "Obsolete config option. The rgw_zonegroup option should be used instead.")
6001 .add_see_also("rgw_zonegroup"),
6002
6003 Option("rgw_region_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6004 .set_default(".rgw.root")
6005 .set_description("Region root pool")
6006 .set_long_description(
6007 "Obsolete config option. The rgw_zonegroup_root_pool should be used instead.")
6008 .add_see_also("rgw_zonegroup_root_pool"),
6009
6010 Option("rgw_default_region_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6011 .set_default("default.region")
6012 .set_description("Default region info object id")
6013 .set_long_description(
6014 "Obsolete config option. The rgw_default_zonegroup_info_oid should be used instead.")
6015 .add_see_also("rgw_default_zonegroup_info_oid"),
6016
6017 Option("rgw_zonegroup", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6018 .set_default("")
6019 .set_description("Zonegroup name")
6020 .add_see_also({"rgw_zone", "rgw_realm"}),
6021
6022 Option("rgw_zonegroup_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6023 .set_default(".rgw.root")
6024 .set_description("Zonegroup root pool")
6025 .set_long_description(
6026 "The zonegroup root pool, is the pool where the RGW zonegroup configuration located."
6027 )
6028 .add_see_also({"rgw_zone_root_pool", "rgw_realm_root_pool", "rgw_period_root_pool"}),
6029
6030 Option("rgw_default_zonegroup_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6031 .set_default("default.zonegroup")
6032 .set_description(""),
6033
6034 Option("rgw_realm", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6035 .set_default("")
6036 .set_description(""),
6037
6038 Option("rgw_realm_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6039 .set_default(".rgw.root")
6040 .set_description("Realm root pool")
6041 .set_long_description(
6042 "The realm root pool, is the pool where the RGW realm configuration located."
6043 )
6044 .add_see_also({"rgw_zonegroup_root_pool", "rgw_zone_root_pool", "rgw_period_root_pool"}),
6045
6046 Option("rgw_default_realm_info_oid", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6047 .set_default("default.realm")
6048 .set_description(""),
6049
6050 Option("rgw_period_root_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6051 .set_default(".rgw.root")
6052 .set_description("Period root pool")
6053 .set_long_description(
6054 "The period root pool, is the pool where the RGW period configuration located."
6055 )
6056 .add_see_also({"rgw_zonegroup_root_pool", "rgw_zone_root_pool", "rgw_realm_root_pool"}),
6057
6058 Option("rgw_period_latest_epoch_info_oid", Option::TYPE_STR, Option::LEVEL_DEV)
6059 .set_default(".latest_epoch")
6060 .set_description(""),
6061
6062 Option("rgw_log_nonexistent_bucket", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6063 .set_default(false)
6064 .set_description("Should RGW log operations on bucket that does not exist")
6065 .set_long_description(
6066 "This config option applies to the ops log. When this option is set, the ops log "
6067 "will log operations that are sent to non existing buckets. These operations "
6068 "inherently fail, and do not correspond to a specific user.")
6069 .add_see_also("rgw_enable_ops_log"),
6070
6071 Option("rgw_log_object_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6072 .set_default("%Y-%m-%d-%H-%i-%n")
6073 .set_description("Ops log object name format")
6074 .set_long_description(
6075 "Defines the format of the RADOS objects names that ops log uses to store ops "
6076 "log data")
6077 .add_see_also("rgw_enable_ops_log"),
6078
6079 Option("rgw_log_object_name_utc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6080 .set_default(false)
6081 .set_description("Should ops log object name based on UTC")
6082 .set_long_description(
6083 "If set, the names of the RADOS objects that hold the ops log data will be based "
6084 "on UTC time zone. If not set, it will use the local time zone.")
6085 .add_see_also({"rgw_enable_ops_log", "rgw_log_object_name"}),
6086
6087 Option("rgw_usage_max_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6088 .set_default(32)
6089 .set_description("Number of shards for usage log.")
6090 .set_long_description(
6091 "The number of RADOS objects that RGW will use in order to store the usage log "
6092 "data.")
6093 .add_see_also("rgw_enable_usage_log"),
6094
6095 Option("rgw_usage_max_user_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6096 .set_default(1)
6097 .set_min(1)
6098 .set_description("Number of shards for single user in usage log")
6099 .set_long_description(
6100 "The number of shards that a single user will span over in the usage log.")
6101 .add_see_also("rgw_enable_usage_log"),
6102
6103 Option("rgw_enable_ops_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6104 .set_default(false)
6105 .set_description("Enable ops log")
6106 .add_see_also({"rgw_log_nonexistent_bucket", "rgw_log_object_name", "rgw_ops_log_rados",
6107 "rgw_ops_log_socket_path"}),
6108
6109 Option("rgw_enable_usage_log", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6110 .set_default(false)
6111 .set_description("Enable usage log")
6112 .add_see_also("rgw_usage_max_shards"),
6113
6114 Option("rgw_ops_log_rados", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6115 .set_default(true)
6116 .set_description("Use RADOS for ops log")
6117 .set_long_description(
6118 "If set, RGW will store ops log information in RADOS.")
6119 .add_see_also({"rgw_enable_ops_log"}),
6120
6121 Option("rgw_ops_log_socket_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6122 .set_default("")
6123 .set_description("Unix domain socket path for ops log.")
6124 .set_long_description(
6125 "Path to unix domain socket that RGW will listen for connection on. When connected, "
6126 "RGW will send ops log data through it.")
6127 .add_see_also({"rgw_enable_ops_log", "rgw_ops_log_data_backlog"}),
6128
6129 Option("rgw_ops_log_data_backlog", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
6130 .set_default(5 << 20)
6131 .set_description("Ops log socket backlog")
6132 .set_long_description(
6133 "Maximum amount of data backlog that RGW can keep when ops log is configured to "
6134 "send info through unix domain socket. When data backlog is higher than this, "
6135 "ops log entries will be lost. In order to avoid ops log information loss, the "
6136 "listener needs to clear data (by reading it) quickly enough.")
6137 .add_see_also({"rgw_enable_ops_log", "rgw_ops_log_socket_path"}),
6138
6139 Option("rgw_fcgi_socket_backlog", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6140 .set_default(1024)
6141 .set_description("FastCGI socket connection backlog")
6142 .set_long_description(
6143 "Size of FastCGI connection backlog. This reflects the maximum number of new "
6144 "connection requests that RGW can handle concurrently without dropping any. ")
6145 .add_see_also({"rgw_host", "rgw_socket_path"}),
6146
6147 Option("rgw_usage_log_flush_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6148 .set_default(1024)
6149 .set_description("Number of entries in usage log before flushing")
6150 .set_long_description(
6151 "This is the max number of entries that will be held in the usage log, before it "
6152 "will be flushed to the backend. Note that the usage log is periodically flushed, "
6153 "even if number of entries does not reach this threshold. A usage log entry "
6154 "corresponds to one or more operations on a single bucket.i")
6155 .add_see_also({"rgw_enable_usage_log", "rgw_usage_log_tick_interval"}),
6156
6157 Option("rgw_usage_log_tick_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6158 .set_default(30)
6159 .set_description("Number of seconds between usage log flush cycles")
6160 .set_long_description(
6161 "The number of seconds between consecutive usage log flushes. The usage log will "
6162 "also flush itself to the backend if the number of pending entries reaches a "
6163 "certain threshold.")
6164 .add_see_also({"rgw_enable_usage_log", "rgw_usage_log_flush_threshold"}),
6165
6166 Option("rgw_init_timeout", Option::TYPE_INT, Option::LEVEL_BASIC)
6167 .set_default(300)
6168 .set_description("Initialization timeout")
6169 .set_long_description(
6170 "The time length (in seconds) that RGW will allow for its initialization. RGW "
6171 "process will give up and quit if initialization is not complete after this amount "
6172 "of time."),
6173
6174 Option("rgw_mime_types_file", Option::TYPE_STR, Option::LEVEL_BASIC)
6175 .set_default("/etc/mime.types")
6176 .set_description("Path to local mime types file")
6177 .set_long_description(
6178 "The mime types file is needed in Swift when uploading an object. If object's "
6179 "content type is not specified, RGW will use data from this file to assign "
6180 "a content type to the object."),
6181
6182 Option("rgw_gc_max_objs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6183 .set_default(32)
6184 .set_description("Number of shards for garbage collector data")
6185 .set_long_description(
6186 "The number of garbage collector data shards, is the number of RADOS objects that "
6187 "RGW will use to store the garbage collection information on.")
6188 .add_see_also({"rgw_gc_obj_min_wait", "rgw_gc_processor_max_time", "rgw_gc_processor_period", "rgw_gc_max_concurrent_io"}),
6189
6190 Option("rgw_gc_obj_min_wait", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6191 .set_default(2_hr)
6192 .set_description("Garbage collection object expiration time")
6193 .set_long_description(
6194 "The length of time (in seconds) that the RGW collector will wait before purging "
6195 "a deleted object's data. RGW will not remove object immediately, as object could "
6196 "still have readers. A mechanism exists to increase the object's expiration time "
6197 "when it's being read. The recommended value of its lower limit is 30 minutes")
6198 .add_see_also({"rgw_gc_max_objs", "rgw_gc_processor_max_time", "rgw_gc_processor_period", "rgw_gc_max_concurrent_io"}),
6199
6200 Option("rgw_gc_processor_max_time", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6201 .set_default(1_hr)
6202 .set_description("Length of time GC processor can lease shard")
6203 .set_long_description(
6204 "Garbage collection thread in RGW process holds a lease on its data shards. These "
6205 "objects contain the information about the objects that need to be removed. RGW "
6206 "takes a lease in order to prevent multiple RGW processes from handling the same "
6207 "objects concurrently. This time signifies that maximum amount of time (in seconds) that RGW "
6208 "is allowed to hold that lease. In the case where RGW goes down uncleanly, this "
6209 "is the amount of time where processing of that data shard will be blocked.")
6210 .add_see_also({"rgw_gc_max_objs", "rgw_gc_obj_min_wait", "rgw_gc_processor_period", "rgw_gc_max_concurrent_io"}),
6211
6212 Option("rgw_gc_processor_period", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6213 .set_default(1_hr)
6214 .set_description("Garbage collector cycle run time")
6215 .set_long_description(
6216 "The amount of time between the start of consecutive runs of the garbage collector "
6217 "threads. If garbage collector runs takes more than this period, it will not wait "
6218 "before running again.")
6219 .add_see_also({"rgw_gc_max_objs", "rgw_gc_obj_min_wait", "rgw_gc_processor_max_time", "rgw_gc_max_concurrent_io", "rgw_gc_max_trim_chunk"}),
6220
6221 Option("rgw_gc_max_concurrent_io", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6222 .set_default(10)
6223 .set_description("Max concurrent RADOS IO operations for garbage collection")
6224 .set_long_description(
6225 "The maximum number of concurrent IO operations that the RGW garbage collection "
6226 "thread will use when purging old data.")
6227 .add_see_also({"rgw_gc_max_objs", "rgw_gc_obj_min_wait", "rgw_gc_processor_max_time", "rgw_gc_max_trim_chunk"}),
6228
6229 Option("rgw_gc_max_trim_chunk", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6230 .set_default(16)
6231 .set_description("Max number of keys to remove from garbage collector log in a single operation")
6232 .add_see_also({"rgw_gc_max_objs", "rgw_gc_obj_min_wait", "rgw_gc_processor_max_time", "rgw_gc_max_concurrent_io"}),
6233
6234 Option("rgw_gc_max_deferred_entries_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6235 .set_default(3072)
6236 .set_description("maximum allowed size of deferred entries in queue head for gc"),
6237
6238 Option("rgw_gc_max_queue_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6239 .set_default(134213632)
6240 .set_description("Maximum allowed queue size for gc")
6241 .set_long_description(
6242 "The maximum allowed size of each gc queue, and its value should not "
6243 "be greater than (osd_max_object_size - rgw_gc_max_deferred_entries_size - 1K).")
6244 .add_see_also({"osd_max_object_size", "rgw_gc_max_deferred_entries_size"}),
6245
6246 Option("rgw_gc_max_deferred", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6247 .set_default(50)
6248 .set_description("Number of maximum deferred data entries to be stored in queue for gc"),
6249
6250 Option("rgw_s3_success_create_obj_status", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6251 .set_default(0)
6252 .set_description("HTTP return code override for object creation")
6253 .set_long_description(
6254 "If not zero, this is the HTTP return code that will be returned on a successful S3 "
6255 "object creation."),
6256
6257 Option("rgw_resolve_cname", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6258 .set_default(false)
6259 .set_description("Support vanity domain names via CNAME")
6260 .set_long_description(
6261 "If true, RGW will query DNS when detecting that it's serving a request that was "
6262 "sent to a host in another domain. If a CNAME record is configured for that domain "
6263 "it will use it instead. This gives user to have the ability of creating a unique "
6264 "domain of their own to point at data in their bucket."),
6265
6266 Option("rgw_obj_stripe_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
6267 .set_default(4_M)
6268 .set_description("RGW object stripe size")
6269 .set_long_description(
6270 "The size of an object stripe for RGW objects. This is the maximum size a backing "
6271 "RADOS object will have. RGW objects that are larger than this will span over "
6272 "multiple objects."),
6273
6274 Option("rgw_extended_http_attrs", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6275 .set_default("")
6276 .set_description("RGW support extended HTTP attrs")
6277 .set_long_description(
6278 "Add new set of attributes that could be set on an object. These extra attributes "
6279 "can be set through HTTP header fields when putting the objects. If set, these "
6280 "attributes will return as HTTP fields when doing GET/HEAD on the object."),
6281
6282 Option("rgw_exit_timeout_secs", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6283 .set_default(120)
6284 .set_description("RGW shutdown timeout")
6285 .set_long_description("Number of seconds to wait for a process before exiting unconditionally."),
6286
6287 Option("rgw_get_obj_window_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
6288 .set_default(16_M)
6289 .set_description("RGW object read window size")
6290 .set_long_description("The window size in bytes for a single object read request"),
6291
6292 Option("rgw_get_obj_max_req_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
6293 .set_default(4_M)
6294 .set_description("RGW object read chunk size")
6295 .set_long_description(
6296 "The maximum request size of a single object read operation sent to RADOS"),
6297
6298 Option("rgw_relaxed_s3_bucket_names", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6299 .set_default(false)
6300 .set_description("RGW enable relaxed S3 bucket names")
6301 .set_long_description("RGW enable relaxed S3 bucket name rules for US region buckets."),
6302
6303 Option("rgw_defer_to_bucket_acls", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6304 .set_default("")
6305 .set_description("Bucket ACLs override object ACLs")
6306 .set_long_description(
6307 "If not empty, a string that selects that mode of operation. 'recurse' will use "
6308 "bucket's ACL for the authorizaton. 'full-control' will allow users that users "
6309 "that have full control permission on the bucket have access to the object."),
6310
6311 Option("rgw_list_buckets_max_chunk", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6312 .set_default(1000)
6313 .set_description("Max number of buckets to retrieve in a single listing operation")
6314 .set_long_description(
6315 "When RGW fetches lists of user's buckets from the backend, this is the max number "
6316 "of entries it will try to retrieve in a single operation. Note that the backend "
6317 "may choose to return a smaller number of entries."),
6318
6319 Option("rgw_md_log_max_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6320 .set_default(64)
6321 .set_description("RGW number of metadata log shards")
6322 .set_long_description(
6323 "The number of shards the RGW metadata log entries will reside in. This affects "
6324 "the metadata sync parallelism as a shard can only be processed by a single "
6325 "RGW at a time"),
6326
6327 Option("rgw_curl_wait_timeout_ms", Option::TYPE_INT, Option::LEVEL_DEV)
6328 .set_default(1000)
6329 .set_description(""),
6330
6331 Option("rgw_curl_low_speed_limit", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6332 .set_default(1024)
6333 .set_long_description(
6334 "It contains the average transfer speed in bytes per second that the "
6335 "transfer should be below during rgw_curl_low_speed_time seconds for libcurl "
6336 "to consider it to be too slow and abort. Set it zero to disable this."),
6337
6338 Option("rgw_curl_low_speed_time", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6339 .set_default(300)
6340 .set_long_description(
6341 "It contains the time in number seconds that the transfer speed should be below "
6342 "the rgw_curl_low_speed_limit for the library to consider it too slow and abort. "
6343 "Set it zero to disable this."),
6344
6345 Option("rgw_copy_obj_progress", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6346 .set_default(true)
6347 .set_description("Send progress report through copy operation")
6348 .set_long_description(
6349 "If true, RGW will send progress information when copy operation is executed. "),
6350
6351 Option("rgw_copy_obj_progress_every_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
6352 .set_default(1_M)
6353 .set_description("Send copy-object progress info after these many bytes"),
6354
6355 Option("rgw_obj_tombstone_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6356 .set_default(1000)
6357 .set_description("Max number of entries to keep in tombstone cache")
6358 .set_long_description(
6359 "The tombstone cache is used when doing a multi-zone data sync. RGW keeps "
6360 "there information about removed objects which is needed in order to prevent "
6361 "re-syncing of objects that were already removed."),
6362
6363 Option("rgw_data_log_window", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6364 .set_default(30)
6365 .set_description("Data log time window")
6366 .set_long_description(
6367 "The data log keeps information about buckets that have objectst that were "
6368 "modified within a specific timeframe. The sync process then knows which buckets "
6369 "are needed to be scanned for data sync."),
6370
6371 Option("rgw_data_log_changes_size", Option::TYPE_INT, Option::LEVEL_DEV)
6372 .set_default(1000)
6373 .set_description("Max size of pending changes in data log")
6374 .set_long_description(
6375 "RGW will trigger update to the data log if the number of pending entries reached "
6376 "this number."),
6377
6378 Option("rgw_data_log_num_shards", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6379 .set_default(128)
6380 .set_description("Number of data log shards")
6381 .set_long_description(
6382 "The number of shards the RGW data log entries will reside in. This affects the "
6383 "data sync parallelism as a shard can only be processed by a single RGW at a time."),
6384
6385 Option("rgw_data_log_obj_prefix", Option::TYPE_STR, Option::LEVEL_DEV)
6386 .set_default("data_log")
6387 .set_description(""),
6388
6389 Option("rgw_bucket_quota_ttl", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6390 .set_default(600)
6391 .set_description("Bucket quota stats cache TTL")
6392 .set_long_description(
6393 "Length of time for bucket stats to be cached within RGW instance."),
6394
6395 Option("rgw_bucket_quota_soft_threshold", Option::TYPE_FLOAT, Option::LEVEL_BASIC)
6396 .set_default(0.95)
6397 .set_description("RGW quota soft threshold")
6398 .set_long_description(
6399 "Threshold from which RGW doesn't rely on cached info for quota "
6400 "decisions. This is done for higher accuracy of the quota mechanism at "
6401 "cost of performance, when getting close to the quota limit. The value "
6402 "configured here is the ratio between the data usage to the max usage "
6403 "as specified by the quota."),
6404
6405 Option("rgw_bucket_quota_cache_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6406 .set_default(10000)
6407 .set_description("RGW quota stats cache size")
6408 .set_long_description(
6409 "Maximum number of entries in the quota stats cache."),
6410
6411 Option("rgw_bucket_default_quota_max_objects", Option::TYPE_INT, Option::LEVEL_BASIC)
6412 .set_default(-1)
6413 .set_description("Default quota for max objects in a bucket")
6414 .set_long_description(
6415 "The default quota configuration for max number of objects in a bucket. A "
6416 "negative number means 'unlimited'."),
6417
6418 Option("rgw_bucket_default_quota_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6419 .set_default(-1)
6420 .set_description("Default quota for total size in a bucket")
6421 .set_long_description(
6422 "The default quota configuration for total size of objects in a bucket. A "
6423 "negative number means 'unlimited'."),
6424
6425 Option("rgw_expose_bucket", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6426 .set_default(false)
6427 .set_description("Send Bucket HTTP header with the response")
6428 .set_long_description(
6429 "If true, RGW will send a Bucket HTTP header with the responses. The header will "
6430 "contain the name of the bucket the operation happened on."),
6431
6432 Option("rgw_frontends", Option::TYPE_STR, Option::LEVEL_BASIC)
6433 .set_default("beast port=7480")
6434 .set_description("RGW frontends configuration")
6435 .set_long_description(
6436 "A comma delimited list of frontends configuration. Each configuration contains "
6437 "the type of the frontend followed by an optional space delimited set of "
6438 "key=value config parameters."),
6439
6440 Option("rgw_frontend_defaults", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6441 .set_default("beast ssl_certificate=config://rgw/cert/$realm/$zone.crt ssl_private_key=config://rgw/cert/$realm/$zone.key")
6442 .set_description("RGW frontends default configuration")
6443 .set_long_description(
6444 "A comma delimited list of default frontends configuration."),
6445
6446 Option("rgw_user_quota_bucket_sync_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6447 .set_default(180)
6448 .set_description("User quota bucket sync interval")
6449 .set_long_description(
6450 "Time period for accumulating modified buckets before syncing these stats."),
6451
6452 Option("rgw_user_quota_sync_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6453 .set_default(1_day)
6454 .set_description("User quota sync interval")
6455 .set_long_description(
6456 "Time period for accumulating modified buckets before syncing entire user stats."),
6457
6458 Option("rgw_user_quota_sync_idle_users", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6459 .set_default(false)
6460 .set_description("Should sync idle users quota")
6461 .set_long_description(
6462 "Whether stats for idle users be fully synced."),
6463
6464 Option("rgw_user_quota_sync_wait_time", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6465 .set_default(1_day)
6466 .set_description("User quota full-sync wait time")
6467 .set_long_description(
6468 "Minimum time between two full stats sync for non-idle users."),
6469
6470 Option("rgw_user_default_quota_max_objects", Option::TYPE_INT, Option::LEVEL_BASIC)
6471 .set_default(-1)
6472 .set_description("User quota max objects")
6473 .set_long_description(
6474 "The default quota configuration for total number of objects for a single user. A "
6475 "negative number means 'unlimited'."),
6476
6477 Option("rgw_user_default_quota_max_size", Option::TYPE_INT, Option::LEVEL_BASIC)
6478 .set_default(-1)
6479 .set_description("User quota max size")
6480 .set_long_description(
6481 "The default quota configuration for total size of objects for a single user. A "
6482 "negative number means 'unlimited'."),
6483
6484 Option("rgw_multipart_min_part_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
6485 .set_default(5_M)
6486 .set_description("Minimum S3 multipart-upload part size")
6487 .set_long_description(
6488 "When doing a multipart upload, each part (other than the last part) should be "
6489 "at least this size."),
6490
6491 Option("rgw_multipart_part_upload_limit", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6492 .set_default(10000)
6493 .set_description("Max number of parts in multipart upload"),
6494
6495 Option("rgw_max_slo_entries", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6496 .set_default(1000)
6497 .set_description("Max number of entries in Swift Static Large Object manifest"),
6498
6499 Option("rgw_olh_pending_timeout_sec", Option::TYPE_INT, Option::LEVEL_DEV)
6500 .set_default(1_hr)
6501 .set_description("Max time for pending OLH change to complete")
6502 .set_long_description(
6503 "OLH is a versioned object's logical head. Operations on it are journaled and "
6504 "as pending before completion. If an operation doesn't complete with this amount "
6505 "of seconds, we remove the operation from the journal."),
6506
6507 Option("rgw_user_max_buckets", Option::TYPE_INT, Option::LEVEL_BASIC)
6508 .set_default(1000)
6509 .set_description("Max number of buckets per user")
6510 .set_long_description(
6511 "A user can create at most this number of buckets. Zero means "
6512 "no limit; a negative value means users cannot create any new "
6513 "buckets, although users will retain buckets already created."),
6514
6515 Option("rgw_objexp_gc_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6516 .set_default(10_min)
6517 .set_description("Swift objects expirer garbage collector interval"),
6518
6519 Option("rgw_objexp_hints_num_shards", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6520 .set_default(127)
6521 .set_description("Number of object expirer data shards")
6522 .set_long_description(
6523 "The number of shards the (Swift) object expirer will store its data on."),
6524
6525 Option("rgw_objexp_chunk_size", Option::TYPE_UINT, Option::LEVEL_DEV)
6526 .set_default(100)
6527 .set_description(""),
6528
6529 Option("rgw_enable_static_website", Option::TYPE_BOOL, Option::LEVEL_BASIC)
6530 .set_default(false)
6531 .set_description("Enable static website APIs")
6532 .set_long_description(
6533 "This configurable controls whether RGW handles the website control APIs. RGW can "
6534 "server static websites if s3website hostnames are configured, and unrelated to "
6535 "this configurable."),
6536
6537 Option("rgw_user_unique_email", Option::TYPE_BOOL, Option::LEVEL_BASIC)
6538 .set_default(true)
6539 .set_description("Require local RGW users to have unique email addresses")
6540 .set_long_description(
6541 "Enforce builtin user accounts to have unique email addresses. This "
6542 "setting is historical. In future, non-enforcement of email address "
6543 "uniqueness is likely to become the default."),
6544
6545 Option("rgw_log_http_headers", Option::TYPE_STR, Option::LEVEL_BASIC)
6546 .set_default("")
6547 .set_description("List of HTTP headers to log")
6548 .set_long_description(
6549 "A comma delimited list of HTTP headers to log when seen, ignores case (e.g., "
6550 "http_x_forwarded_for)."),
6551
6552 Option("rgw_num_async_rados_threads", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6553 .set_default(32)
6554 .set_description("Number of concurrent RADOS operations in multisite sync")
6555 .set_long_description(
6556 "The number of concurrent RADOS IO operations that will be triggered for handling "
6557 "multisite sync operations. This includes control related work, and not the actual "
6558 "sync operations."),
6559
6560 Option("rgw_md_notify_interval_msec", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6561 .set_default(200)
6562 .set_description("Length of time to aggregate metadata changes")
6563 .set_long_description(
6564 "Length of time (in milliseconds) in which the master zone aggregates all the "
6565 "metadata changes that occurred, before sending notifications to all the other "
6566 "zones."),
6567
6568 Option("rgw_run_sync_thread", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6569 .set_default(true)
6570 .set_description("Should run sync thread"),
6571
6572 Option("rgw_sync_lease_period", Option::TYPE_INT, Option::LEVEL_DEV)
6573 .set_default(120)
6574 .set_description(""),
6575
6576 Option("rgw_sync_log_trim_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6577 .set_default(1200)
6578 .set_description("Sync log trim interval")
6579 .set_long_description(
6580 "Time in seconds between attempts to trim sync logs."),
6581
6582 Option("rgw_sync_log_trim_max_buckets", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6583 .set_default(16)
6584 .set_description("Maximum number of buckets to trim per interval")
6585 .set_long_description("The maximum number of buckets to consider for bucket index log trimming each trim interval, regardless of the number of bucket index shards. Priority is given to buckets with the most sync activity over the last trim interval.")
6586 .add_see_also("rgw_sync_log_trim_interval")
6587 .add_see_also("rgw_sync_log_trim_min_cold_buckets")
6588 .add_see_also("rgw_sync_log_trim_concurrent_buckets"),
6589
6590 Option("rgw_sync_log_trim_min_cold_buckets", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6591 .set_default(4)
6592 .set_description("Minimum number of cold buckets to trim per interval")
6593 .set_long_description("Of the `rgw_sync_log_trim_max_buckets` selected for bucket index log trimming each trim interval, at least this many of them must be 'cold' buckets. These buckets are selected in order from the list of all bucket instances, to guarantee that all buckets will be visited eventually.")
6594 .add_see_also("rgw_sync_log_trim_interval")
6595 .add_see_also("rgw_sync_log_trim_max_buckets")
6596 .add_see_also("rgw_sync_log_trim_concurrent_buckets"),
6597
6598 Option("rgw_sync_log_trim_concurrent_buckets", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6599 .set_default(4)
6600 .set_description("Maximum number of buckets to trim in parallel")
6601 .add_see_also("rgw_sync_log_trim_interval")
6602 .add_see_also("rgw_sync_log_trim_max_buckets")
6603 .add_see_also("rgw_sync_log_trim_min_cold_buckets"),
6604
6605 Option("rgw_sync_data_inject_err_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
6606 .set_default(0)
6607 .set_description(""),
6608
6609 Option("rgw_sync_meta_inject_err_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
6610 .set_default(0)
6611 .set_description(""),
6612
6613 Option("rgw_sync_trace_history_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
6614 .set_default(4096)
6615 .set_description("Sync trace history size")
6616 .set_long_description(
6617 "Maximum number of complete sync trace entries to keep."),
6618
6619 Option("rgw_sync_trace_per_node_log_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6620 .set_default(32)
6621 .set_description("Sync trace per-node log size")
6622 .set_long_description(
6623 "The number of log entries to keep per sync-trace node."),
6624
6625 Option("rgw_sync_trace_servicemap_update_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6626 .set_default(10)
6627 .set_description("Sync-trace service-map update interval")
6628 .set_long_description(
6629 "Number of seconds between service-map updates of sync-trace events."),
6630
6631 Option("rgw_period_push_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
6632 .set_default(2)
6633 .set_description("Period push interval")
6634 .set_long_description(
6635 "Number of seconds to wait before retrying 'period push' operation."),
6636
6637 Option("rgw_period_push_interval_max", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
6638 .set_default(30)
6639 .set_description("Period push maximum interval")
6640 .set_long_description(
6641 "The max number of seconds to wait before retrying 'period push' after exponential "
6642 "backoff."),
6643
6644 Option("rgw_safe_max_objects_per_shard", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6645 .set_default(100*1024)
6646 .set_description("Safe number of objects per shard")
6647 .set_long_description(
6648 "This is the max number of objects per bucket index shard that RGW considers "
6649 "safe. RGW will warn if it identifies a bucket where its per-shard count is "
6650 "higher than a percentage of this number.")
6651 .add_see_also("rgw_shard_warning_threshold"),
6652
6653 Option("rgw_shard_warning_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
6654 .set_default(90)
6655 .set_description("Warn about max objects per shard")
6656 .set_long_description(
6657 "Warn if number of objects per shard in a specific bucket passed this percentage "
6658 "of the safe number.")
6659 .add_see_also("rgw_safe_max_objects_per_shard"),
6660
6661 Option("rgw_swift_versioning_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6662 .set_default(false)
6663 .set_description("Enable Swift versioning"),
6664
6665 Option("rgw_swift_custom_header", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6666 .set_default("")
6667 .set_description("Enable swift custom header")
6668 .set_long_description(
6669 "If not empty, specifies a name of HTTP header that can include custom data. When "
6670 "uploading an object, if this header is passed RGW will store this header info "
6671 "and it will be available when listing the bucket."),
6672
6673 Option("rgw_swift_need_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6674 .set_default(true)
6675 .set_description("Enable stats on bucket listing in Swift"),
6676
6677 Option("rgw_reshard_num_logs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6678 .set_default(16)
6679 .set_min(1)
6680 .set_description("")
6681 .add_service("rgw"),
6682
6683 Option("rgw_reshard_bucket_lock_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6684 .set_default(360)
6685 .set_min(30)
6686 .set_description("Number of seconds the timeout on the reshard locks (bucket reshard lock and reshard log lock) are set to. As a reshard proceeds these locks can be renewed/extended. If too short, reshards cannot complete and will fail, causing a future reshard attempt. If too long a hung or crashed reshard attempt will keep the bucket locked for an extended period, not allowing RGW to detect the failed reshard attempt and recover.")
6687 .add_tag("performance")
6688 .add_service("rgw"),
6689
6690 Option("rgw_reshard_batch_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6691 .set_default(64)
6692 .set_min(8)
6693 .set_description("Number of reshard entries to batch together before sending the operations to the CLS back-end")
6694 .add_tag("performance")
6695 .add_service("rgw"),
6696
6697 Option("rgw_reshard_max_aio", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6698 .set_default(128)
6699 .set_min(16)
6700 .set_description("Maximum number of outstanding asynchronous I/O operations to allow at a time during resharding")
6701 .add_tag("performance")
6702 .add_service("rgw"),
6703
6704 Option("rgw_trust_forwarded_https", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6705 .set_default(false)
6706 .set_description("Trust Forwarded and X-Forwarded-Proto headers")
6707 .set_long_description(
6708 "When a proxy in front of radosgw is used for ssl termination, radosgw "
6709 "does not know whether incoming http connections are secure. Enable "
6710 "this option to trust the Forwarded and X-Forwarded-Proto headers sent "
6711 "by the proxy when determining whether the connection is secure. This "
6712 "is required for some features, such as server side encryption.")
6713 .add_see_also("rgw_crypt_require_ssl"),
6714
6715 Option("rgw_crypt_require_ssl", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6716 .set_default(true)
6717 .set_description("Requests including encryption key headers must be sent over ssl"),
6718
6719 Option("rgw_crypt_default_encryption_key", Option::TYPE_STR, Option::LEVEL_DEV)
6720 .set_default("")
6721 .set_description(""),
6722
6723 Option("rgw_crypt_s3_kms_backend", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6724 .set_default("barbican")
6725 .set_enum_allowed({"barbican", "vault", "testing"})
6726 .set_description(
6727 "Where the SSE-KMS encryption keys are stored. Supported KMS "
6728 "systems are OpenStack Barbican ('barbican', the default) and HashiCorp "
6729 "Vault ('vault')."),
6730
6731 Option("rgw_crypt_s3_kms_encryption_keys", Option::TYPE_STR, Option::LEVEL_DEV)
6732 .set_default("")
6733 .set_description(""),
6734
6735 Option("rgw_crypt_vault_auth", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6736 .set_default("token")
6737 .set_enum_allowed({"token", "agent"})
6738 .set_description(
6739 "Type of authentication method to be used with Vault. ")
6740 .add_see_also({
6741 "rgw_crypt_s3_kms_backend",
6742 "rgw_crypt_vault_addr",
6743 "rgw_crypt_vault_token_file"}),
6744
6745 Option("rgw_crypt_vault_token_file", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6746 .set_default("")
6747 .set_description(
6748 "If authentication method is 'token', provide a path to the token file, "
6749 "which for security reasons should readable only by Rados Gateway.")
6750 .add_see_also({
6751 "rgw_crypt_s3_kms_backend",
6752 "rgw_crypt_vault_auth",
6753 "rgw_crypt_vault_addr"}),
6754
6755 Option("rgw_crypt_vault_addr", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6756 .set_default("")
6757 .set_description("Vault server base address.")
6758 .add_see_also({
6759 "rgw_crypt_s3_kms_backend",
6760 "rgw_crypt_vault_auth",
6761 "rgw_crypt_vault_prefix"}),
6762
6763 Option("rgw_crypt_vault_prefix", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6764 .set_default("")
6765 .set_description("Vault secret URL prefix, which can be used to restrict "
6766 "access to a particular subset of the Vault secret space.")
6767 .add_see_also({
6768 "rgw_crypt_s3_kms_backend",
6769 "rgw_crypt_vault_addr",
6770 "rgw_crypt_vault_auth"}),
6771
6772
6773 Option("rgw_crypt_vault_secret_engine", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6774 .set_enum_allowed({"kv", "transit"})
6775 .set_default("transit")
6776 .set_description(
6777 "Vault Secret Engine to be used to retrieve encryption keys.")
6778 .add_see_also({
6779 "rgw_crypt_s3_kms_backend",
6780 "rgw_crypt_vault_auth",
6781 "rgw_crypt_vault_addr"}),
6782
6783 Option("rgw_crypt_vault_namespace", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6784 .set_default("")
6785 .set_description("Vault Namespace to be used to select your tenant")
6786 .add_see_also({
6787 "rgw_crypt_s3_kms_backend",
6788 "rgw_crypt_vault_auth",
6789 "rgw_crypt_vault_addr"}),
6790
6791 Option("rgw_crypt_suppress_logs", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6792 .set_default(true)
6793 .set_description("Suppress logs that might print client key"),
6794
6795 Option("rgw_list_bucket_min_readahead", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6796 .set_default(1000)
6797 .set_description("Minimum number of entries to request from rados for bucket listing"),
6798
6799 Option("rgw_rest_getusage_op_compat", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6800 .set_default(false)
6801 .set_description("REST GetUsage request backward compatibility"),
6802
6803 Option("rgw_torrent_flag", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6804 .set_default(false)
6805 .set_description("When true, uploaded objects will calculate and store "
6806 "a SHA256 hash of object data so the object can be "
6807 "retrieved as a torrent file"),
6808
6809 Option("rgw_torrent_tracker", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6810 .set_default("")
6811 .set_description("Torrent field announce and announce list"),
6812
6813 Option("rgw_torrent_createby", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6814 .set_default("")
6815 .set_description("torrent field created by"),
6816
6817 Option("rgw_torrent_comment", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6818 .set_default("")
6819 .set_description("Torrent field comment"),
6820
6821 Option("rgw_torrent_encoding", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6822 .set_default("")
6823 .set_description("torrent field encoding"),
6824
6825 Option("rgw_data_notify_interval_msec", Option::TYPE_INT, Option::LEVEL_ADVANCED)
6826 .set_default(200)
6827 .set_description("data changes notification interval to followers"),
6828
6829 Option("rgw_torrent_origin", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6830 .set_default("")
6831 .set_description("Torrent origin"),
6832
6833 Option("rgw_torrent_sha_unit", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
6834 .set_default(512*1024)
6835 .set_description(""),
6836
6837 Option("rgw_dynamic_resharding", Option::TYPE_BOOL, Option::LEVEL_BASIC)
6838 .set_default(true)
6839 .set_description("Enable dynamic resharding")
6840 .set_long_description(
6841 "If true, RGW will dynamicall increase the number of shards in buckets that have "
6842 "a high number of objects per shard.")
6843 .add_see_also("rgw_max_objs_per_shard")
6844 .add_see_also("rgw_max_dynamic_shards"),
6845
6846 Option("rgw_max_objs_per_shard", Option::TYPE_UINT, Option::LEVEL_BASIC)
6847 .set_default(100000)
6848 .set_description("Max objects per shard for dynamic resharding")
6849 .set_long_description(
6850 "This is the max number of objects per bucket index shard that RGW will "
6851 "allow with dynamic resharding. RGW will trigger an automatic reshard operation "
6852 "on the bucket if it exceeds this number.")
6853 .add_see_also("rgw_dynamic_resharding")
6854 .add_see_also("rgw_max_dynamic_shards"),
6855
6856 Option("rgw_max_dynamic_shards", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6857 .set_default(1999)
6858 .set_min(1)
6859 .set_description("Max shards that dynamic resharding can create")
6860 .set_long_description(
6861 "This is the maximum number of bucket index shards that dynamic "
6862 "sharding is able to create on its own. This does not limit user "
6863 "requested resharding. Ideally this value is a prime number.")
6864 .add_see_also("rgw_dynamic_resharding")
6865 .add_see_also("rgw_max_objs_per_shard"),
6866
6867 Option("rgw_reshard_thread_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6868 .set_default(10_min)
6869 .set_min(10)
6870 .set_description("Number of seconds between processing of reshard log entries"),
6871
6872 Option("rgw_cache_expiry_interval", Option::TYPE_UINT,
6873 Option::LEVEL_ADVANCED)
6874 .set_default(15_min)
6875 .set_description("Number of seconds before entries in the cache are "
6876 "assumed stale and re-fetched. Zero is never.")
6877 .add_tag("performance")
6878 .add_service("rgw")
6879 .set_long_description("The Rados Gateway stores metadata and objects in "
6880 "an internal cache. This should be kept consistent "
6881 "by the OSD's relaying notify events between "
6882 "multiple watching RGW processes. In the event "
6883 "that this notification protocol fails, bounding "
6884 "the length of time that any data in the cache will "
6885 "be assumed valid will ensure that any RGW instance "
6886 "that falls out of sync will eventually recover. "
6887 "This seems to be an issue mostly for large numbers "
6888 "of RGW instances under heavy use. If you would like "
6889 "to turn off cache expiry, set this value to zero."),
6890
6891 Option("rgw_inject_notify_timeout_probability", Option::TYPE_FLOAT,
6892 Option::LEVEL_DEV)
6893 .set_default(0)
6894 .add_tag("fault injection")
6895 .add_tag("testing")
6896 .add_service("rgw")
6897 .set_min_max(0.0, 1.0)
6898 .set_description("Likelihood of ignoring a notify")
6899 .set_long_description("This is the probability that the RGW cache will "
6900 "ignore a cache notify message. It exists to help "
6901 "with the development and testing of cache "
6902 "consistency and recovery improvements. Please "
6903 "do not set it in a production cluster, as it "
6904 "actively causes failures. Set this to a floating "
6905 "point value between 0 and 1."),
6906 Option("rgw_max_notify_retries", Option::TYPE_UINT,
6907 Option::LEVEL_ADVANCED)
6908 .set_default(3)
6909 .add_tag("error recovery")
6910 .add_service("rgw")
6911 .set_description("Number of attempts to notify peers before giving up.")
6912 .set_long_description("The number of times we will attempt to update "
6913 "a peer's cache in the event of error before giving "
6914 "up. This is unlikely to be an issue unless your "
6915 "cluster is very heavily loaded. Beware that "
6916 "increasing this value may cause some operations to "
6917 "take longer in exceptional cases and thus may, "
6918 "rarely, cause clients to time out."),
6919 Option("rgw_sts_entry", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6920 .set_default("sts")
6921 .set_description("STS URL prefix")
6922 .set_long_description("URL path prefix for internal STS requests."),
6923
6924 Option("rgw_sts_key", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6925 .set_default("sts")
6926 .set_description("STS Key")
6927 .set_long_description("Key used for encrypting/ decrypting session token."),
6928
6929 Option("rgw_s3_auth_use_sts", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
6930 .set_default(false)
6931 .set_description("Should S3 authentication use STS."),
6932
6933 Option("rgw_sts_max_session_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
6934 .set_default(43200)
6935 .set_description("Session token max duration")
6936 .set_long_description("Max duration in seconds for which the session token is valid."),
6937
6938 Option("rgw_max_listing_results", Option::TYPE_UINT,
6939 Option::LEVEL_ADVANCED)
6940 .set_default(1000)
6941 .set_min_max(1, 100000)
6942 .add_service("rgw")
6943 .set_description("Upper bound on results in listing operations, ListBucket max-keys")
6944 .set_long_description("This caps the maximum permitted value for listing-like operations in RGW S3. "
6945 "Affects ListBucket(max-keys), "
6946 "ListBucketVersions(max-keys), "
6947 "ListBucketMultipartUploads(max-uploads), "
6948 "ListMultipartUploadParts(max-parts)"),
6949
6950 Option("rgw_sts_token_introspection_url", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6951 .set_default("")
6952 .set_description("STS Web Token introspection URL")
6953 .set_long_description("URL for introspecting an STS Web Token."),
6954
6955 Option("rgw_sts_client_id", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6956 .set_default("")
6957 .set_description("Client Id")
6958 .set_long_description("Client Id needed for introspecting a Web Token."),
6959
6960 Option("rgw_sts_client_secret", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6961 .set_default("")
6962 .set_description("Client Secret")
6963 .set_long_description("Client Secret needed for introspecting a Web Token."),
6964
6965 Option("rgw_max_concurrent_requests", Option::TYPE_INT, Option::LEVEL_BASIC)
6966 .set_default(1024)
6967 .set_description("Maximum number of concurrent HTTP requests.")
6968 .set_long_description(
6969 "Maximum number of concurrent HTTP requests that the beast frontend "
6970 "will process. Tuning this can help to limit memory usage under heavy "
6971 "load.")
6972 .add_tag("performance")
6973 .add_see_also("rgw_frontends"),
6974
6975 Option("rgw_scheduler_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
6976 .set_default("throttler")
6977 .set_description("Set the type of dmclock scheduler, defaults to throttler "
6978 "Other valid values are dmclock which is experimental"),
6979
6980 Option("rgw_dmclock_admin_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
6981 .set_default(100.0)
6982 .set_description("mclock reservation for admin requests")
6983 .add_see_also("rgw_dmclock_admin_wgt")
6984 .add_see_also("rgw_dmclock_admin_lim"),
6985
6986 Option("rgw_dmclock_admin_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
6987 .set_default(100.0)
6988 .set_description("mclock weight for admin requests")
6989 .add_see_also("rgw_dmclock_admin_res")
6990 .add_see_also("rgw_dmclock_admin_lim"),
6991
6992 Option("rgw_dmclock_admin_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
6993 .set_default(0.0)
6994 .set_description("mclock limit for admin requests")
6995 .add_see_also("rgw_dmclock_admin_res")
6996 .add_see_also("rgw_dmclock_admin_wgt"),
6997
6998 Option("rgw_dmclock_auth_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
6999 .set_default(200.0)
7000 .set_description("mclock reservation for object data requests")
7001 .add_see_also("rgw_dmclock_auth_wgt")
7002 .add_see_also("rgw_dmclock_auth_lim"),
7003
7004 Option("rgw_dmclock_auth_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7005 .set_default(100.0)
7006 .set_description("mclock weight for object data requests")
7007 .add_see_also("rgw_dmclock_auth_res")
7008 .add_see_also("rgw_dmclock_auth_lim"),
7009
7010 Option("rgw_dmclock_auth_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7011 .set_default(0.0)
7012 .set_description("mclock limit for object data requests")
7013 .add_see_also("rgw_dmclock_auth_res")
7014 .add_see_also("rgw_dmclock_auth_wgt"),
7015
7016 Option("rgw_dmclock_data_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7017 .set_default(500.0)
7018 .set_description("mclock reservation for object data requests")
7019 .add_see_also("rgw_dmclock_data_wgt")
7020 .add_see_also("rgw_dmclock_data_lim"),
7021
7022 Option("rgw_dmclock_data_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7023 .set_default(500.0)
7024 .set_description("mclock weight for object data requests")
7025 .add_see_also("rgw_dmclock_data_res")
7026 .add_see_also("rgw_dmclock_data_lim"),
7027
7028 Option("rgw_dmclock_data_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7029 .set_default(0.0)
7030 .set_description("mclock limit for object data requests")
7031 .add_see_also("rgw_dmclock_data_res")
7032 .add_see_also("rgw_dmclock_data_wgt"),
7033
7034 Option("rgw_dmclock_metadata_res", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7035 .set_default(500.0)
7036 .set_description("mclock reservation for metadata requests")
7037 .add_see_also("rgw_dmclock_metadata_wgt")
7038 .add_see_also("rgw_dmclock_metadata_lim"),
7039
7040 Option("rgw_dmclock_metadata_wgt", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7041 .set_default(500.0)
7042 .set_description("mclock weight for metadata requests")
7043 .add_see_also("rgw_dmclock_metadata_res")
7044 .add_see_also("rgw_dmclock_metadata_lim"),
7045
7046 Option("rgw_dmclock_metadata_lim", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7047 .set_default(0.0)
7048 .set_description("mclock limit for metadata requests")
7049 .add_see_also("rgw_dmclock_metadata_res")
7050 .add_see_also("rgw_dmclock_metadata_wgt"),
7051 });
7052 }
7053
7054 static std::vector<Option> get_rbd_options() {
7055 return std::vector<Option>({
7056 Option("rbd_default_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7057 .set_default("rbd")
7058 .set_description("default pool for storing new images")
7059 .set_validator([](std::string *value, std::string *error_message){
7060 std::regex pattern("^[^@/]+$");
7061 if (!std::regex_match (*value, pattern)) {
7062 *value = "rbd";
7063 *error_message = "invalid RBD default pool, resetting to 'rbd'";
7064 }
7065 return 0;
7066 }),
7067
7068 Option("rbd_default_data_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7069 .set_default("")
7070 .set_description("default pool for storing data blocks for new images")
7071 .set_validator([](std::string *value, std::string *error_message){
7072 std::regex pattern("^[^@/]*$");
7073 if (!std::regex_match (*value, pattern)) {
7074 *value = "";
7075 *error_message = "ignoring invalid RBD data pool";
7076 }
7077 return 0;
7078 }),
7079
7080 Option("rbd_default_features", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7081 .set_default("layering,exclusive-lock,object-map,fast-diff,deep-flatten")
7082 .set_description("default v2 image features for new images")
7083 .set_long_description(
7084 "RBD features are only applicable for v2 images. This setting accepts "
7085 "either an integer bitmask value or comma-delimited string of RBD "
7086 "feature names. This setting is always internally stored as an integer "
7087 "bitmask value. The mapping between feature bitmask value and feature "
7088 "name is as follows: +1 -> layering, +2 -> striping, "
7089 "+4 -> exclusive-lock, +8 -> object-map, +16 -> fast-diff, "
7090 "+32 -> deep-flatten, +64 -> journaling, +128 -> data-pool")
7091 .set_flag(Option::FLAG_RUNTIME)
7092 .set_validator([](std::string *value, std::string *error_message) {
7093 ostringstream ss;
7094 uint64_t features = librbd::rbd_features_from_string(*value, &ss);
7095 // Leave this in integer form to avoid breaking Cinder. Someday
7096 // we would like to present this in string form instead...
7097 *value = stringify(features);
7098 if (ss.str().size()) {
7099 return -EINVAL;
7100 }
7101 return 0;
7102 }),
7103
7104 Option("rbd_op_threads", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7105 .set_default(1)
7106 .set_description("number of threads to utilize for internal processing"),
7107
7108 Option("rbd_op_thread_timeout", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7109 .set_default(60)
7110 .set_description("time in seconds for detecting a hung thread"),
7111
7112 Option("rbd_disable_zero_copy_writes", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7113 .set_default(true)
7114 .set_description("Disable the use of zero-copy writes to ensure unstable "
7115 "writes from clients cannot cause a CRC mismatch"),
7116
7117 Option("rbd_non_blocking_aio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7118 .set_default(true)
7119 .set_description("process AIO ops from a dispatch thread to prevent blocking"),
7120
7121 Option("rbd_cache", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7122 .set_default(true)
7123 .set_description("whether to enable caching (writeback unless rbd_cache_max_dirty is 0)"),
7124
7125 Option("rbd_cache_policy", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7126 .set_enum_allowed({"writethrough", "writeback", "writearound"})
7127 .set_default("writearound")
7128 .set_description("cache policy for handling writes."),
7129
7130 Option("rbd_cache_writethrough_until_flush", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7131 .set_default(true)
7132 .set_description("whether to make writeback caching writethrough until "
7133 "flush is called, to be sure the user of librbd will send "
7134 "flushes so that writeback is safe"),
7135
7136 Option("rbd_cache_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7137 .set_default(32_M)
7138 .set_description("cache size in bytes"),
7139
7140 Option("rbd_cache_max_dirty", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7141 .set_default(24_M)
7142 .set_description("dirty limit in bytes - set to 0 for write-through caching"),
7143
7144 Option("rbd_cache_target_dirty", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7145 .set_default(16_M)
7146 .set_description("target dirty limit in bytes"),
7147
7148 Option("rbd_cache_max_dirty_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7149 .set_default(1.0)
7150 .set_description("seconds in cache before writeback starts"),
7151
7152 Option("rbd_cache_max_dirty_object", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7153 .set_default(0)
7154 .set_description("dirty limit for objects - set to 0 for auto calculate from rbd_cache_size"),
7155
7156 Option("rbd_cache_block_writes_upfront", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7157 .set_default(false)
7158 .set_description("whether to block writes to the cache before the aio_write call completes"),
7159
7160 Option("rbd_parent_cache_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7161 .set_default(false)
7162 .set_description("whether to enable rbd shared ro cache"),
7163
7164 Option("rbd_concurrent_management_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7165 .set_default(10)
7166 .set_min(1)
7167 .set_description("how many operations can be in flight for a management operation like deleting or resizing an image"),
7168
7169 Option("rbd_balance_snap_reads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7170 .set_default(false)
7171 .set_description("distribute snap read requests to random OSD"),
7172
7173 Option("rbd_localize_snap_reads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7174 .set_default(false)
7175 .set_description("localize snap read requests to closest OSD"),
7176
7177 Option("rbd_balance_parent_reads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7178 .set_default(false)
7179 .set_description("distribute parent read requests to random OSD"),
7180
7181 Option("rbd_localize_parent_reads", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7182 .set_default(false)
7183 .set_description("localize parent requests to closest OSD"),
7184
7185 Option("rbd_sparse_read_threshold_bytes", Option::TYPE_SIZE,
7186 Option::LEVEL_ADVANCED)
7187 .set_default(64_K)
7188 .set_description("threshold for issuing a sparse-read")
7189 .set_long_description("minimum number of sequential bytes to read against "
7190 "an object before issuing a sparse-read request to "
7191 "the cluster. 0 implies it must be a full object read "
7192 "to issue a sparse-read, 1 implies always use "
7193 "sparse-read, and any value larger than the maximum "
7194 "object size will disable sparse-read for all "
7195 "requests"),
7196
7197 Option("rbd_readahead_trigger_requests", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7198 .set_default(10)
7199 .set_description("number of sequential requests necessary to trigger readahead"),
7200
7201 Option("rbd_readahead_max_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7202 .set_default(512_K)
7203 .set_description("set to 0 to disable readahead"),
7204
7205 Option("rbd_readahead_disable_after_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7206 .set_default(50_M)
7207 .set_description("how many bytes are read in total before readahead is disabled"),
7208
7209 Option("rbd_clone_copy_on_read", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7210 .set_default(false)
7211 .set_description("copy-up parent image blocks to clone upon read request"),
7212
7213 Option("rbd_blacklist_on_break_lock", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7214 .set_default(true)
7215 .set_description("whether to blacklist clients whose lock was broken"),
7216
7217 Option("rbd_blacklist_expire_seconds", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7218 .set_default(0)
7219 .set_description("number of seconds to blacklist - set to 0 for OSD default"),
7220
7221 Option("rbd_request_timed_out_seconds", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7222 .set_default(30)
7223 .set_description("number of seconds before maintenance request times out"),
7224
7225 Option("rbd_skip_partial_discard", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7226 .set_default(true)
7227 .set_description("skip discard (zero) of unaligned extents within an object"),
7228
7229 Option("rbd_discard_granularity_bytes", Option::TYPE_UINT,
7230 Option::LEVEL_ADVANCED)
7231 .set_default(64_K)
7232 .set_min_max(4_K, 32_M)
7233 .set_validator([](std::string *value, std::string *error_message){
7234 uint64_t f = strict_si_cast<uint64_t>(value->c_str(), error_message);
7235 if (!error_message->empty()) {
7236 return -EINVAL;
7237 } else if (!isp2(f)) {
7238 *error_message = "value must be a power of two";
7239 return -EINVAL;
7240 }
7241 return 0;
7242 })
7243 .set_description("minimum aligned size of discard operations"),
7244
7245 Option("rbd_enable_alloc_hint", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7246 .set_default(true)
7247 .set_description("when writing a object, it will issue a hint to osd backend to indicate the expected size object need"),
7248
7249 Option("rbd_compression_hint", Option::TYPE_STR, Option::LEVEL_BASIC)
7250 .set_enum_allowed({"none", "compressible", "incompressible"})
7251 .set_default("none")
7252 .set_description("Compression hint to send to the OSDs during writes")
7253 .set_flag(Option::FLAG_RUNTIME),
7254
7255 Option("rbd_read_from_replica_policy", Option::TYPE_STR, Option::LEVEL_BASIC)
7256 .set_enum_allowed({"default", "balance", "localize"})
7257 .set_default("default")
7258 .set_description("Read replica policy send to the OSDS during reads")
7259 .set_flag(Option::FLAG_RUNTIME),
7260
7261 Option("rbd_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7262 .set_default(false)
7263 .set_description("true if LTTng-UST tracepoints should be enabled"),
7264
7265 Option("rbd_blkin_trace_all", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7266 .set_default(false)
7267 .set_description("create a blkin trace for all RBD requests"),
7268
7269 Option("rbd_validate_pool", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7270 .set_default(true)
7271 .set_description("validate empty pools for RBD compatibility"),
7272
7273 Option("rbd_validate_names", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7274 .set_default(true)
7275 .set_description("validate new image names for RBD compatibility"),
7276
7277 Option("rbd_auto_exclusive_lock_until_manual_request", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7278 .set_default(true)
7279 .set_description("automatically acquire/release exclusive lock until it is explicitly requested"),
7280
7281 Option("rbd_move_to_trash_on_remove", Option::TYPE_BOOL, Option::LEVEL_BASIC)
7282 .set_default(false)
7283 .set_description("automatically move images to the trash when deleted"),
7284
7285 Option("rbd_move_to_trash_on_remove_expire_seconds", Option::TYPE_UINT, Option::LEVEL_BASIC)
7286 .set_default(0)
7287 .set_description("default number of seconds to protect deleted images in the trash"),
7288
7289 Option("rbd_move_parent_to_trash_on_remove", Option::TYPE_BOOL, Option::LEVEL_BASIC)
7290 .set_default(false)
7291 .set_description("move parent with clone format v2 children to the trash when deleted"),
7292
7293 Option("rbd_mirroring_resync_after_disconnect", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7294 .set_default(false)
7295 .set_description("automatically start image resync after mirroring is disconnected due to being laggy"),
7296
7297 Option("rbd_mirroring_delete_delay", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7298 .set_default(0)
7299 .set_description("time-delay in seconds for rbd-mirror delete propagation"),
7300
7301 Option("rbd_mirroring_replay_delay", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7302 .set_default(0)
7303 .set_description("time-delay in seconds for rbd-mirror asynchronous replication"),
7304
7305 Option("rbd_mirroring_max_mirroring_snapshots", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7306 .set_default(3)
7307 .set_min(3)
7308 .set_description("mirroring snapshots limit"),
7309
7310 Option("rbd_default_format", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7311 .set_default(2)
7312 .set_description("default image format for new images"),
7313
7314 Option("rbd_default_order", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7315 .set_default(22)
7316 .set_description("default order (data block object size) for new images"),
7317
7318 Option("rbd_default_stripe_count", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7319 .set_default(0)
7320 .set_description("default stripe count for new images"),
7321
7322 Option("rbd_default_stripe_unit", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7323 .set_default(0)
7324 .set_description("default stripe width for new images"),
7325
7326 Option("rbd_default_map_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7327 .set_default("")
7328 .set_description("default krbd map options"),
7329
7330 Option("rbd_default_clone_format", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7331 .set_enum_allowed({"1", "2", "auto"})
7332 .set_default("auto")
7333 .set_description("default internal format for handling clones")
7334 .set_long_description("This sets the internal format for tracking cloned "
7335 "images. The setting of '1' requires attaching to "
7336 "protected snapshots that cannot be removed until "
7337 "the clone is removed/flattened. The setting of '2' "
7338 "will allow clones to be attached to any snapshot "
7339 "and permits removing in-use parent snapshots but "
7340 "requires Mimic or later clients. The default "
7341 "setting of 'auto' will use the v2 format if the "
7342 "cluster is configured to require mimic or later "
7343 "clients.")
7344 .set_flag(Option::FLAG_RUNTIME),
7345
7346 Option("rbd_journal_order", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7347 .set_min_max(12, 26)
7348 .set_default(24)
7349 .set_description("default order (object size) for journal data objects"),
7350
7351 Option("rbd_journal_splay_width", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7352 .set_default(4)
7353 .set_description("number of active journal objects"),
7354
7355 Option("rbd_journal_commit_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7356 .set_default(5)
7357 .set_description("commit time interval, seconds"),
7358
7359 Option("rbd_journal_object_writethrough_until_flush", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7360 .set_default(true)
7361 .set_description("when enabled, the rbd_journal_object_flush* configuration "
7362 "options are ignored until the first flush so that batched "
7363 "journal IO is known to be safe for consistency"),
7364
7365 Option("rbd_journal_object_flush_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7366 .set_default(0)
7367 .set_description("maximum number of pending commits per journal object"),
7368
7369 Option("rbd_journal_object_flush_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7370 .set_default(1_M)
7371 .set_description("maximum number of pending bytes per journal object"),
7372
7373 Option("rbd_journal_object_flush_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7374 .set_default(0)
7375 .set_description("maximum age (in seconds) for pending commits"),
7376
7377 Option("rbd_journal_object_max_in_flight_appends", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7378 .set_default(0)
7379 .set_description("maximum number of in-flight appends per journal object"),
7380
7381 Option("rbd_journal_pool", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7382 .set_default("")
7383 .set_description("pool for journal objects"),
7384
7385 Option("rbd_journal_max_payload_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7386 .set_default(16384)
7387 .set_description("maximum journal payload size before splitting"),
7388
7389 Option("rbd_journal_max_concurrent_object_sets", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7390 .set_default(0)
7391 .set_description("maximum number of object sets a journal client can be behind before it is automatically unregistered"),
7392
7393 Option("rbd_qos_iops_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7394 .set_default(0)
7395 .set_description("the desired limit of IO operations per second"),
7396
7397 Option("rbd_qos_bps_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7398 .set_default(0)
7399 .set_description("the desired limit of IO bytes per second"),
7400
7401 Option("rbd_qos_read_iops_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7402 .set_default(0)
7403 .set_description("the desired limit of read operations per second"),
7404
7405 Option("rbd_qos_write_iops_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7406 .set_default(0)
7407 .set_description("the desired limit of write operations per second"),
7408
7409 Option("rbd_qos_read_bps_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7410 .set_default(0)
7411 .set_description("the desired limit of read bytes per second"),
7412
7413 Option("rbd_qos_write_bps_limit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7414 .set_default(0)
7415 .set_description("the desired limit of write bytes per second"),
7416
7417 Option("rbd_qos_iops_burst", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7418 .set_default(0)
7419 .set_description("the desired burst limit of IO operations"),
7420
7421 Option("rbd_qos_bps_burst", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7422 .set_default(0)
7423 .set_description("the desired burst limit of IO bytes"),
7424
7425 Option("rbd_qos_read_iops_burst", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7426 .set_default(0)
7427 .set_description("the desired burst limit of read operations"),
7428
7429 Option("rbd_qos_write_iops_burst", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7430 .set_default(0)
7431 .set_description("the desired burst limit of write operations"),
7432
7433 Option("rbd_qos_read_bps_burst", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7434 .set_default(0)
7435 .set_description("the desired burst limit of read bytes"),
7436
7437 Option("rbd_qos_write_bps_burst", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7438 .set_default(0)
7439 .set_description("the desired burst limit of write bytes"),
7440
7441 Option("rbd_qos_schedule_tick_min", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7442 .set_default(50)
7443 .set_min(1)
7444 .set_description("minimum schedule tick (in milliseconds) for QoS"),
7445
7446 Option("rbd_discard_on_zeroed_write_same", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7447 .set_default(true)
7448 .set_description("discard data on zeroed write same instead of writing zero"),
7449
7450 Option("rbd_mtime_update_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7451 .set_default(60)
7452 .set_min(0)
7453 .set_description("RBD Image modify timestamp refresh interval. Set to 0 to disable modify timestamp update."),
7454
7455 Option("rbd_atime_update_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7456 .set_default(60)
7457 .set_min(0)
7458 .set_description("RBD Image access timestamp refresh interval. Set to 0 to disable access timestamp update."),
7459
7460 Option("rbd_io_scheduler", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7461 .set_default("simple")
7462 .set_enum_allowed({"none", "simple"})
7463 .set_description("RBD IO scheduler"),
7464
7465 Option("rbd_io_scheduler_simple_max_delay", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7466 .set_default(0)
7467 .set_min(0)
7468 .set_description("maximum io delay (in milliseconds) for simple io scheduler (if set to 0 dalay is calculated based on latency stats)"),
7469
7470 Option("rbd_rwl_enabled", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7471 .set_default(false)
7472 .set_description("enable persistent write back cache for this volume"),
7473
7474 Option("rbd_rwl_log_periodic_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7475 .set_default(false)
7476 .set_description("emit periodic perf stats to debug log"),
7477
7478 Option("rbd_rwl_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7479 .set_default(1073741824)
7480 .set_min(1073741824)
7481 .set_description("size of the persistent write back cache for this volume"),
7482
7483 Option("rbd_rwl_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7484 .set_default("/tmp")
7485 .set_description("location of the persistent write back cache in a DAX-enabled filesystem on persistent memory"),
7486
7487 Option("rbd_config_pool_override_update_timestamp", Option::TYPE_UINT,
7488 Option::LEVEL_DEV)
7489 .set_default(0)
7490 .set_description("timestamp of last update to pool-level config overrides"),
7491
7492 });
7493 }
7494
7495 static std::vector<Option> get_rbd_mirror_options() {
7496 return std::vector<Option>({
7497 Option("rbd_mirror_journal_commit_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7498 .set_default(5)
7499 .set_description("commit time interval, seconds"),
7500
7501 Option("rbd_mirror_journal_poll_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7502 .set_default(5)
7503 .set_description("maximum age (in seconds) between successive journal polls"),
7504
7505 Option("rbd_mirror_sync_point_update_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7506 .set_default(30)
7507 .set_description("number of seconds between each update of the image sync point object number"),
7508
7509 Option("rbd_mirror_concurrent_image_syncs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7510 .set_default(5)
7511 .set_description("maximum number of image syncs in parallel"),
7512
7513 Option("rbd_mirror_pool_replayers_refresh_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7514 .set_default(30)
7515 .set_description("interval to refresh peers in rbd-mirror daemon"),
7516
7517 Option("rbd_mirror_concurrent_image_deletions", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7518 .set_default(1)
7519 .set_min(1)
7520 .set_description("maximum number of image deletions in parallel"),
7521
7522 Option("rbd_mirror_delete_retry_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7523 .set_default(30)
7524 .set_description("interval to check and retry the failed deletion requests"),
7525
7526 Option("rbd_mirror_image_state_check_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7527 .set_default(30)
7528 .set_min(1)
7529 .set_description("interval to get images from pool watcher and set sources in replayer"),
7530
7531 Option("rbd_mirror_leader_heartbeat_interval", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7532 .set_default(5)
7533 .set_min(1)
7534 .set_description("interval (in seconds) between mirror leader heartbeats"),
7535
7536 Option("rbd_mirror_leader_max_missed_heartbeats", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7537 .set_default(2)
7538 .set_description("number of missed heartbeats for non-lock owner to attempt to acquire lock"),
7539
7540 Option("rbd_mirror_leader_max_acquire_attempts_before_break", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7541 .set_default(3)
7542 .set_description("number of failed attempts to acquire lock after missing heartbeats before breaking lock"),
7543
7544 Option("rbd_mirror_image_policy_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7545 .set_default("simple")
7546 .set_enum_allowed({"none", "simple"})
7547 .set_description("active/active policy type for mapping images to instances"),
7548
7549 Option("rbd_mirror_image_policy_migration_throttle", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7550 .set_default(300)
7551 .set_description("number of seconds after which an image can be reshuffled (migrated) again"),
7552
7553 Option("rbd_mirror_image_policy_update_throttle_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7554 .set_default(1)
7555 .set_min(1)
7556 .set_description("interval (in seconds) to throttle images for mirror daemon peer updates"),
7557
7558 Option("rbd_mirror_image_policy_rebalance_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7559 .set_default(0)
7560 .set_description("number of seconds policy should be idle before trigerring reshuffle (rebalance) of images"),
7561
7562 Option("rbd_mirror_perf_stats_prio", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7563 .set_default((int64_t)PerfCountersBuilder::PRIO_USEFUL)
7564 .set_description("Priority level for mirror daemon replication perf counters")
7565 .set_long_description("The daemon will send perf counter data to the "
7566 "manager daemon if the priority is not lower than "
7567 "mgr_stats_threshold.")
7568 .set_min_max((int64_t)PerfCountersBuilder::PRIO_DEBUGONLY,
7569 (int64_t)PerfCountersBuilder::PRIO_CRITICAL + 1),
7570
7571 Option("rbd_mirror_image_perf_stats_prio", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7572 .set_default((int64_t)PerfCountersBuilder::PRIO_USEFUL)
7573 .set_description("Priority level for mirror daemon per-image replication perf counters")
7574 .set_long_description("The daemon will send per-image perf counter data to the "
7575 "manager daemon if the priority is not lower than "
7576 "mgr_stats_threshold.")
7577 .set_min_max((int64_t)PerfCountersBuilder::PRIO_DEBUGONLY,
7578 (int64_t)PerfCountersBuilder::PRIO_CRITICAL + 1),
7579
7580 Option("rbd_mirror_memory_autotune", Option::TYPE_BOOL, Option::LEVEL_DEV)
7581 .set_default(true)
7582 .add_see_also("rbd_mirror_memory_target")
7583 .set_description("Automatically tune the ratio of caches while respecting min values."),
7584
7585 Option("rbd_mirror_memory_target", Option::TYPE_SIZE, Option::LEVEL_BASIC)
7586 .set_default(4_G)
7587 .add_see_also("rbd_mirror_memory_autotune")
7588 .set_description("When tcmalloc and cache autotuning is enabled, try to keep this many bytes mapped in memory."),
7589
7590 Option("rbd_mirror_memory_base", Option::TYPE_SIZE, Option::LEVEL_DEV)
7591 .set_default(768_M)
7592 .add_see_also("rbd_mirror_memory_autotune")
7593 .set_description("When tcmalloc and cache autotuning is enabled, estimate the minimum amount of memory in bytes the rbd-mirror daemon will need."),
7594
7595 Option("rbd_mirror_memory_expected_fragmentation", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7596 .set_default(0.15)
7597 .set_min_max(0.0, 1.0)
7598 .add_see_also("rbd_mirror_memory_autotune")
7599 .set_description("When tcmalloc and cache autotuning is enabled, estimate the percent of memory fragmentation."),
7600
7601 Option("rbd_mirror_memory_cache_min", Option::TYPE_SIZE, Option::LEVEL_DEV)
7602 .set_default(128_M)
7603 .add_see_also("rbd_mirror_memory_autotune")
7604 .set_description("When tcmalloc and cache autotuning is enabled, set the minimum amount of memory used for cache."),
7605
7606 Option("rbd_mirror_memory_cache_resize_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7607 .set_default(5)
7608 .add_see_also("rbd_mirror_memory_autotune")
7609 .set_description("When tcmalloc and cache autotuning is enabled, wait this many seconds between resizing caches."),
7610
7611 Option("rbd_mirror_memory_cache_autotune_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7612 .set_default(30)
7613 .add_see_also("rbd_mirror_memory_autotune")
7614 .set_description("The number of seconds to wait between rebalances when cache autotune is enabled."),
7615 });
7616 }
7617
7618 static std::vector<Option> get_immutable_object_cache_options() {
7619 return std::vector<Option>({
7620 Option("immutable_object_cache_path", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7621 .set_default("/tmp/ceph_immutable_object_cache")
7622 .set_description("immutable object cache data dir"),
7623
7624 Option("immutable_object_cache_sock", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7625 .set_default("/var/run/ceph/immutable_object_cache_sock")
7626 .set_description("immutable object cache domain socket"),
7627
7628 Option("immutable_object_cache_max_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7629 .set_default(1_G)
7630 .set_description("max immutable object cache data size"),
7631
7632 Option("immutable_object_cache_max_inflight_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7633 .set_default(128)
7634 .set_description("max inflight promoting requests for immutable object cache daemon"),
7635
7636 Option("immutable_object_cache_client_dedicated_thread_num", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7637 .set_default(2)
7638 .set_description("immutable object cache client dedicated thread number"),
7639
7640 Option("immutable_object_cache_watermark", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7641 .set_default(0.1)
7642 .set_description("immutable object cache water mark"),
7643 });
7644 }
7645
7646 std::vector<Option> get_mds_options() {
7647 return std::vector<Option>({
7648 Option("mds_numa_node", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7649 .set_default(-1)
7650 .set_flag(Option::FLAG_STARTUP)
7651 .set_description("set mds's cpu affinity to a numa node (-1 for none)"),
7652
7653 Option("mds_data", Option::TYPE_STR, Option::LEVEL_ADVANCED)
7654 .set_default("/var/lib/ceph/mds/$cluster-$id")
7655 .set_flag(Option::FLAG_NO_MON_UPDATE)
7656 .set_description("path to MDS data and keyring"),
7657
7658 Option("mds_join_fs", Option::TYPE_STR, Option::LEVEL_BASIC)
7659 .set_default("")
7660 .set_description("file system MDS prefers to join")
7661 .set_long_description("This setting indicates which file system name the MDS should prefer to join (affinity). The monitors will try to have the MDS cluster safely reach a state where all MDS have strong affinity, even via failovers to a standby.")
7662 .set_flag(Option::FLAG_RUNTIME),
7663
7664 Option("mds_max_xattr_pairs_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7665 .set_default(64_K)
7666 .set_description("maximum aggregate size of extended attributes on a file"),
7667
7668 Option("mds_cache_trim_interval", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
7669 .set_default(1)
7670 .set_description("interval in seconds between cache trimming")
7671 .set_flag(Option::FLAG_RUNTIME),
7672
7673 Option("mds_cache_release_free_interval", Option::TYPE_SECS, Option::LEVEL_DEV)
7674 .set_default(10)
7675 .set_description("interval in seconds between heap releases")
7676 .set_flag(Option::FLAG_RUNTIME),
7677
7678 Option("mds_cache_memory_limit", Option::TYPE_SIZE, Option::LEVEL_BASIC)
7679 .set_default(4_G)
7680 .set_description("target maximum memory usage of MDS cache")
7681 .set_flag(Option::FLAG_RUNTIME)
7682 .set_long_description("This sets a target maximum memory usage of the MDS cache and is the primary tunable to limit the MDS memory usage. The MDS will try to stay under a reservation of this limit (by default 95%; 1 - mds_cache_reservation) by trimming unused metadata in its cache and recalling cached items in the client caches. It is possible for the MDS to exceed this limit due to slow recall from clients. The mds_health_cache_threshold (150%) sets a cache full threshold for when the MDS signals a cluster health warning."),
7683
7684 Option("mds_cache_reservation", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7685 .set_default(.05)
7686 .set_description("amount of memory to reserve for future cached objects")
7687 .set_flag(Option::FLAG_RUNTIME),
7688
7689 Option("mds_health_cache_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7690 .set_default(1.5)
7691 .set_description("threshold for cache size to generate health warning"),
7692
7693 Option("mds_cache_mid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7694 .set_default(.7)
7695 .set_description("midpoint for MDS cache LRU"),
7696
7697 Option("mds_cache_trim_decay_rate", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7698 .set_default(1)
7699 .set_description("decay rate for trimming MDS cache throttle")
7700 .set_flag(Option::FLAG_RUNTIME),
7701
7702 Option("mds_cache_trim_threshold", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7703 .set_default(64_K)
7704 .set_description("threshold for number of dentries that can be trimmed")
7705 .set_flag(Option::FLAG_RUNTIME),
7706
7707 Option("mds_max_file_recover", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7708 .set_default(32)
7709 .set_description("maximum number of files to recover file sizes in parallel"),
7710
7711 Option("mds_dir_max_commit_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7712 .set_default(10)
7713 .set_description("maximum size in megabytes for a RADOS write to a directory"),
7714
7715 Option("mds_dir_keys_per_op", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7716 .set_default(16384)
7717 .set_description("number of directory entries to read in one RADOS operation"),
7718
7719 Option("mds_decay_halflife", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7720 .set_default(5)
7721 .set_description("rate of decay for temperature counters on each directory for balancing"),
7722
7723 Option("mds_beacon_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7724 .set_default(4)
7725 .set_description("interval in seconds between MDS beacons to monitors"),
7726
7727 Option("mds_beacon_grace", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7728 .set_default(15)
7729 .set_description("tolerance in seconds for missed MDS beacons to monitors"),
7730
7731 Option("mds_heartbeat_grace", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7732 .set_default(15)
7733 .set_description("tolerance in seconds for MDS internal heartbeat"),
7734
7735 Option("mds_enforce_unique_name", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7736 .set_default(true)
7737 .set_description("require MDS name is unique in the cluster"),
7738
7739 Option("mds_session_blacklist_on_timeout", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7740 .set_default(true)
7741 .set_description("blacklist clients whose sessions have become stale"),
7742
7743 Option("mds_session_blacklist_on_evict", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7744 .set_default(true)
7745 .set_description("blacklist clients that have been evicted"),
7746
7747 Option("mds_sessionmap_keys_per_op", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7748 .set_default(1024)
7749 .set_description("number of omap keys to read from the SessionMap in one operation"),
7750
7751 Option("mds_recall_max_caps", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7752 .set_default(5000)
7753 .set_description("maximum number of caps to recall from client session in single recall")
7754 .set_flag(Option::FLAG_RUNTIME),
7755
7756 Option("mds_recall_max_decay_rate", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7757 .set_default(2.5)
7758 .set_description("decay rate for throttle on recalled caps on a session")
7759 .set_flag(Option::FLAG_RUNTIME),
7760
7761 Option("mds_recall_max_decay_threshold", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7762 .set_default(16_K)
7763 .set_description("decay threshold for throttle on recalled caps on a session")
7764 .set_flag(Option::FLAG_RUNTIME),
7765
7766 Option("mds_recall_global_max_decay_threshold", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7767 .set_default(64_K)
7768 .set_description("decay threshold for throttle on recalled caps globally")
7769 .set_flag(Option::FLAG_RUNTIME),
7770
7771 Option("mds_recall_warning_threshold", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7772 .set_default(32_K)
7773 .set_description("decay threshold for warning on slow session cap recall")
7774 .set_flag(Option::FLAG_RUNTIME),
7775
7776 Option("mds_recall_warning_decay_rate", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7777 .set_default(60.0)
7778 .set_description("decay rate for warning on slow session cap recall")
7779 .set_flag(Option::FLAG_RUNTIME),
7780
7781 Option("mds_session_cache_liveness_decay_rate", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7782 .add_see_also("mds_session_cache_liveness_magnitude")
7783 .set_default(5_min)
7784 .set_description("decay rate for session liveness leading to preemptive cap recall")
7785 .set_flag(Option::FLAG_RUNTIME)
7786 .set_long_description("This determines how long a session needs to be quiescent before the MDS begins preemptively recalling capabilities. The default of 5 minutes will cause 10 halvings of the decay counter after 1 hour, or 1/1024. The default magnitude of 10 (1^10 or 1024) is chosen so that the MDS considers a previously chatty session (approximately) to be quiescent after 1 hour."),
7787
7788 Option("mds_session_cache_liveness_magnitude", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7789 .add_see_also("mds_session_cache_liveness_decay_rate")
7790 .set_default(10)
7791 .set_description("decay magnitude for preemptively recalling caps on quiet client")
7792 .set_flag(Option::FLAG_RUNTIME)
7793 .set_long_description("This is the order of magnitude difference (in base 2) of the internal liveness decay counter and the number of capabilities the session holds. When this difference occurs, the MDS treats the session as quiescent and begins recalling capabilities."),
7794
7795 Option("mds_freeze_tree_timeout", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7796 .set_default(30)
7797 .set_description(""),
7798
7799 Option("mds_health_summarize_threshold", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7800 .set_default(10)
7801 .set_description("threshold of number of clients to summarize late client recall"),
7802
7803 Option("mds_reconnect_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7804 .set_default(45)
7805 .set_description("timeout in seconds to wait for clients to reconnect during MDS reconnect recovery state"),
7806
7807 Option("mds_tick_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7808 .set_default(5)
7809 .set_description("time in seconds between upkeep tasks"),
7810
7811 Option("mds_dirstat_min_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7812 .set_default(1)
7813 .set_description(""),
7814
7815 Option("mds_scatter_nudge_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7816 .set_default(5)
7817 .set_description("minimum interval between scatter lock updates"),
7818
7819 Option("mds_client_prealloc_inos", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7820 .set_default(1000)
7821 .set_description("number of unused inodes to pre-allocate to clients for file creation"),
7822
7823 Option("mds_client_delegate_inos_pct", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7824 .set_default(50)
7825 .set_flag(Option::FLAG_RUNTIME)
7826 .set_description("percentage of preallocated inos to delegate to client"),
7827
7828 Option("mds_early_reply", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7829 .set_default(true)
7830 .set_description("additional reply to clients that metadata requests are complete but not yet durable"),
7831
7832 Option("mds_replay_unsafe_with_closed_session", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7833 .set_default(false)
7834 .set_flag(Option::FLAG_RUNTIME)
7835 .set_description("complete all the replay request when mds is restarted, no matter the session is closed or not"),
7836
7837 Option("mds_default_dir_hash", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7838 .set_default(CEPH_STR_HASH_RJENKINS)
7839 .set_description("hash function to select directory fragment for dentry name"),
7840
7841 Option("mds_log_pause", Option::TYPE_BOOL, Option::LEVEL_DEV)
7842 .set_default(false)
7843 .set_description(""),
7844
7845 Option("mds_log_skip_corrupt_events", Option::TYPE_BOOL, Option::LEVEL_DEV)
7846 .set_default(false)
7847 .set_description(""),
7848
7849 Option("mds_log_max_events", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7850 .set_default(-1)
7851 .set_description("maximum number of events in the MDS journal (-1 is unlimited)"),
7852
7853 Option("mds_log_events_per_segment", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7854 .set_default(1024)
7855 .set_description("maximum number of events in an MDS journal segment"),
7856
7857 Option("mds_log_segment_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
7858 .set_default(0)
7859 .set_description("size in bytes of each MDS log segment"),
7860
7861 Option("mds_log_max_segments", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
7862 .set_default(128)
7863 .set_description("maximum number of segments which may be untrimmed"),
7864
7865 Option("mds_bal_export_pin", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7866 .set_default(true)
7867 .set_description("allow setting directory export pins to particular ranks"),
7868
7869 Option("mds_export_ephemeral_random", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7870 .set_default(false)
7871 .set_flag(Option::FLAG_RUNTIME)
7872 .set_description("allow ephemeral random pinning of the loaded subtrees")
7873 .set_long_description("probabilistically pin the loaded directory inode and the subtree beneath it to an MDS based on the consistent hash of the inode number. The higher this value the more likely the loaded subtrees get pinned"),
7874
7875 Option("mds_export_ephemeral_random_max", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7876 .set_default(0.01)
7877 .set_flag(Option::FLAG_RUNTIME)
7878 .set_description("the maximum percent permitted for random ephemeral pin policy")
7879 .set_min_max(0.0, 1.0)
7880 .add_see_also("mds_export_ephemeral_random"),
7881
7882 Option("mds_export_ephemeral_distributed", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7883 .set_default(false)
7884 .set_flag(Option::FLAG_RUNTIME)
7885 .set_description("allow ephemeral distributed pinning of the loaded subtrees")
7886 .set_long_description("pin the immediate child directories of the loaded directory inode based on the consistent hash of the child's inode number. "),
7887
7888 Option("mds_bal_sample_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7889 .set_default(3.0)
7890 .set_description("interval in seconds between balancer ticks"),
7891
7892 Option("mds_bal_replicate_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7893 .set_default(8000)
7894 .set_description("hot popularity threshold to replicate a subtree"),
7895
7896 Option("mds_bal_unreplicate_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7897 .set_default(0)
7898 .set_description("cold popularity threshold to merge subtrees"),
7899
7900 Option("mds_bal_split_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7901 .set_default(10000)
7902 .set_description("minimum size of directory fragment before splitting"),
7903
7904 Option("mds_bal_split_rd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7905 .set_default(25000)
7906 .set_description("hot read popularity threshold for splitting a directory fragment"),
7907
7908 Option("mds_bal_split_wr", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7909 .set_default(10000)
7910 .set_description("hot write popularity threshold for splitting a directory fragment"),
7911
7912 Option("mds_bal_split_bits", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7913 .set_default(3)
7914 .set_min_max(1, 24)
7915 .set_description("power of two child fragments for a fragment on split"),
7916
7917 Option("mds_bal_merge_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7918 .set_default(50)
7919 .set_description("size of fragments where merging should occur"),
7920
7921 Option("mds_bal_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7922 .set_default(10)
7923 .set_description("interval between MDS balancer cycles"),
7924
7925 Option("mds_bal_fragment_interval", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7926 .set_default(5)
7927 .set_description("delay in seconds before interrupting client IO to perform splits"),
7928
7929 Option("mds_bal_fragment_size_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
7930 .set_default(10000*10)
7931 .set_description("maximum size of a directory fragment before new creat/links fail"),
7932
7933 Option("mds_bal_fragment_fast_factor", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7934 .set_default(1.5)
7935 .set_description("ratio of mds_bal_split_size at which fast fragment splitting occurs"),
7936
7937 Option("mds_bal_fragment_dirs", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
7938 .set_default(true)
7939 .set_description("enable directory fragmentation")
7940 .set_long_description("Directory fragmentation is a standard feature of CephFS that allows sharding directories across multiple objects for performance and stability. Additionally, this allows fragments to be distributed across multiple active MDSs to increase throughput. Disabling (new) fragmentation should only be done in exceptional circumstances and may lead to performance issues."),
7941
7942 Option("mds_bal_idle_threshold", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7943 .set_default(0)
7944 .set_description("idle metadata popularity threshold before rebalancing"),
7945
7946 Option("mds_bal_max", Option::TYPE_INT, Option::LEVEL_DEV)
7947 .set_default(-1)
7948 .set_description(""),
7949
7950 Option("mds_bal_max_until", Option::TYPE_INT, Option::LEVEL_DEV)
7951 .set_default(-1)
7952 .set_description(""),
7953
7954 Option("mds_bal_mode", Option::TYPE_INT, Option::LEVEL_DEV)
7955 .set_default(0)
7956 .set_description(""),
7957
7958 Option("mds_bal_min_rebalance", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7959 .set_default(.1)
7960 .set_description("amount overloaded over internal target before balancer begins offloading"),
7961
7962 Option("mds_bal_min_start", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7963 .set_default(.2)
7964 .set_description(""),
7965
7966 Option("mds_bal_need_min", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7967 .set_default(.8)
7968 .set_description(""),
7969
7970 Option("mds_bal_need_max", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7971 .set_default(1.2)
7972 .set_description(""),
7973
7974 Option("mds_bal_midchunk", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7975 .set_default(.3)
7976 .set_description(""),
7977
7978 Option("mds_bal_minchunk", Option::TYPE_FLOAT, Option::LEVEL_DEV)
7979 .set_default(.001)
7980 .set_description(""),
7981
7982 Option("mds_bal_target_decay", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7983 .set_default(10.0)
7984 .set_description("rate of decay for export targets communicated to clients"),
7985
7986 Option("mds_replay_interval", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
7987 .set_default(1.0)
7988 .set_description("time in seconds between replay of updates to journal by standby replay MDS"),
7989
7990 Option("mds_shutdown_check", Option::TYPE_INT, Option::LEVEL_DEV)
7991 .set_default(0)
7992 .set_description(""),
7993
7994 Option("mds_thrash_exports", Option::TYPE_INT, Option::LEVEL_DEV)
7995 .set_default(0)
7996 .set_description(""),
7997
7998 Option("mds_thrash_fragments", Option::TYPE_INT, Option::LEVEL_DEV)
7999 .set_default(0)
8000 .set_description(""),
8001
8002 Option("mds_dump_cache_on_map", Option::TYPE_BOOL, Option::LEVEL_DEV)
8003 .set_default(false)
8004 .set_description(""),
8005
8006 Option("mds_dump_cache_after_rejoin", Option::TYPE_BOOL, Option::LEVEL_DEV)
8007 .set_default(false)
8008 .set_description(""),
8009
8010 Option("mds_verify_scatter", Option::TYPE_BOOL, Option::LEVEL_DEV)
8011 .set_default(false)
8012 .set_description(""),
8013
8014 Option("mds_debug_scatterstat", Option::TYPE_BOOL, Option::LEVEL_DEV)
8015 .set_default(false)
8016 .set_description(""),
8017
8018 Option("mds_debug_frag", Option::TYPE_BOOL, Option::LEVEL_DEV)
8019 .set_default(false)
8020 .set_description(""),
8021
8022 Option("mds_debug_auth_pins", Option::TYPE_BOOL, Option::LEVEL_DEV)
8023 .set_default(false)
8024 .set_description(""),
8025
8026 Option("mds_debug_subtrees", Option::TYPE_BOOL, Option::LEVEL_DEV)
8027 .set_default(false)
8028 .set_description(""),
8029
8030 Option("mds_kill_mdstable_at", Option::TYPE_INT, Option::LEVEL_DEV)
8031 .set_default(0)
8032 .set_description(""),
8033
8034 Option("mds_max_export_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
8035 .set_default(20_M)
8036 .set_description(""),
8037
8038 Option("mds_kill_export_at", Option::TYPE_INT, Option::LEVEL_DEV)
8039 .set_default(0)
8040 .set_description(""),
8041
8042 Option("mds_kill_import_at", Option::TYPE_INT, Option::LEVEL_DEV)
8043 .set_default(0)
8044 .set_description(""),
8045
8046 Option("mds_kill_link_at", Option::TYPE_INT, Option::LEVEL_DEV)
8047 .set_default(0)
8048 .set_description(""),
8049
8050 Option("mds_kill_rename_at", Option::TYPE_INT, Option::LEVEL_DEV)
8051 .set_default(0)
8052 .set_description(""),
8053
8054 Option("mds_kill_openc_at", Option::TYPE_INT, Option::LEVEL_DEV)
8055 .set_default(0)
8056 .set_description(""),
8057
8058 Option("mds_kill_journal_at", Option::TYPE_INT, Option::LEVEL_DEV)
8059 .set_default(0)
8060 .set_description(""),
8061
8062 Option("mds_kill_journal_expire_at", Option::TYPE_INT, Option::LEVEL_DEV)
8063 .set_default(0)
8064 .set_description(""),
8065
8066 Option("mds_kill_journal_replay_at", Option::TYPE_INT, Option::LEVEL_DEV)
8067 .set_default(0)
8068 .set_description(""),
8069
8070 Option("mds_journal_format", Option::TYPE_UINT, Option::LEVEL_DEV)
8071 .set_default(1)
8072 .set_description(""),
8073
8074 Option("mds_kill_create_at", Option::TYPE_INT, Option::LEVEL_DEV)
8075 .set_default(0)
8076 .set_description(""),
8077
8078 Option("mds_inject_traceless_reply_probability", Option::TYPE_FLOAT, Option::LEVEL_DEV)
8079 .set_default(0)
8080 .set_description(""),
8081
8082 Option("mds_wipe_sessions", Option::TYPE_BOOL, Option::LEVEL_DEV)
8083 .set_default(0)
8084 .set_description(""),
8085
8086 Option("mds_wipe_ino_prealloc", Option::TYPE_BOOL, Option::LEVEL_DEV)
8087 .set_default(0)
8088 .set_description(""),
8089
8090 Option("mds_skip_ino", Option::TYPE_INT, Option::LEVEL_DEV)
8091 .set_default(0)
8092 .set_description(""),
8093
8094 Option("mds_enable_op_tracker", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8095 .set_default(true)
8096 .set_description("track remote operation progression and statistics"),
8097
8098 Option("mds_op_history_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8099 .set_default(20)
8100 .set_description("maximum size for list of historical operations"),
8101
8102 Option("mds_op_history_duration", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8103 .set_default(600)
8104 .set_description("expiration time in seconds of historical operations"),
8105
8106 Option("mds_op_complaint_time", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
8107 .set_default(30)
8108 .set_description("time in seconds to consider an operation blocked after no updates"),
8109
8110 Option("mds_op_log_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
8111 .set_default(5)
8112 .set_description(""),
8113
8114 Option("mds_snap_min_uid", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8115 .set_default(0)
8116 .set_description("minimum uid of client to perform snapshots"),
8117
8118 Option("mds_snap_max_uid", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8119 .set_default(4294967294)
8120 .set_description("maximum uid of client to perform snapshots"),
8121
8122 Option("mds_snap_rstat", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8123 .set_default(false)
8124 .set_description("enabled nested rstat for snapshots"),
8125
8126 Option("mds_verify_backtrace", Option::TYPE_UINT, Option::LEVEL_DEV)
8127 .set_default(1)
8128 .set_description(""),
8129
8130 Option("mds_max_completed_flushes", Option::TYPE_UINT, Option::LEVEL_DEV)
8131 .set_default(100000)
8132 .set_description(""),
8133
8134 Option("mds_max_completed_requests", Option::TYPE_UINT, Option::LEVEL_DEV)
8135 .set_default(100000)
8136 .set_description(""),
8137
8138 Option("mds_action_on_write_error", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8139 .set_default(1)
8140 .set_description("action to take when MDS cannot write to RADOS (0:ignore, 1:read-only, 2:suicide)"),
8141
8142 Option("mds_mon_shutdown_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
8143 .set_default(5)
8144 .set_description("time to wait for mon to receive damaged MDS rank notification"),
8145
8146 Option("mds_max_purge_files", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8147 .set_default(64)
8148 .set_description("maximum number of deleted files to purge in parallel"),
8149
8150 Option("mds_max_purge_ops", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8151 .set_default(8192)
8152 .set_description("maximum number of purge operations performed in parallel"),
8153
8154 Option("mds_max_purge_ops_per_pg", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
8155 .set_default(0.5)
8156 .set_description("number of parallel purge operations performed per PG"),
8157
8158 Option("mds_purge_queue_busy_flush_period", Option::TYPE_FLOAT, Option::LEVEL_DEV)
8159 .set_default(1.0)
8160 .set_description(""),
8161
8162 Option("mds_root_ino_uid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
8163 .set_default(0)
8164 .set_description("default uid for new root directory"),
8165
8166 Option("mds_root_ino_gid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
8167 .set_default(0)
8168 .set_description("default gid for new root directory"),
8169
8170 Option("mds_max_scrub_ops_in_progress", Option::TYPE_INT, Option::LEVEL_ADVANCED)
8171 .set_default(5)
8172 .set_description("maximum number of scrub operations performed in parallel"),
8173
8174 Option("mds_forward_all_requests_to_auth", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8175 .set_default(false)
8176 .set_flag(Option::FLAG_RUNTIME)
8177 .set_description("always process op on auth mds"),
8178
8179 Option("mds_damage_table_max_entries", Option::TYPE_INT, Option::LEVEL_ADVANCED)
8180 .set_default(10000)
8181 .set_description("maximum number of damage table entries"),
8182
8183 Option("mds_client_writeable_range_max_inc_objs", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8184 .set_default(1024)
8185 .set_description("maximum number of objects in writeable range of a file for a client"),
8186
8187 Option("mds_min_caps_per_client", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8188 .set_default(100)
8189 .set_description("minimum number of capabilities a client may hold"),
8190
8191 Option("mds_max_caps_per_client", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8192 .set_default(1_M)
8193 .set_description("maximum number of capabilities a client may hold"),
8194
8195 Option("mds_hack_allow_loading_invalid_metadata", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8196 .set_default(0)
8197 .set_description("INTENTIONALLY CAUSE DATA LOSS by bypasing checks for invalid metadata on disk. Allows testing repair tools."),
8198
8199 Option("mds_defer_session_stale", Option::TYPE_BOOL, Option::LEVEL_DEV)
8200 .set_default(true),
8201
8202 Option("mds_inject_migrator_session_race", Option::TYPE_BOOL, Option::LEVEL_DEV)
8203 .set_default(false),
8204
8205 Option("mds_request_load_average_decay_rate", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
8206 .set_default(60)
8207 .set_description("rate of decay in seconds for calculating request load average"),
8208
8209 Option("mds_cap_revoke_eviction_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
8210 .set_default(0)
8211 .set_description("number of seconds after which clients which have not responded to cap revoke messages by the MDS are evicted."),
8212
8213 Option("mds_max_retries_on_remount_failure", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8214 .set_default(5)
8215 .set_description("number of consecutive failed remount attempts for invalidating kernel dcache after which client would abort."),
8216
8217 Option("mds_dump_cache_threshold_formatter", Option::TYPE_SIZE, Option::LEVEL_DEV)
8218 .set_default(1_G)
8219 .set_description("threshold for cache usage to disallow \"dump cache\" operation to formatter")
8220 .set_long_description("Disallow MDS from dumping caches to formatter via \"dump cache\" command if cache usage exceeds this threshold."),
8221
8222 Option("mds_dump_cache_threshold_file", Option::TYPE_SIZE, Option::LEVEL_DEV)
8223 .set_default(0)
8224 .set_description("threshold for cache usage to disallow \"dump cache\" operation to file")
8225 .set_long_description("Disallow MDS from dumping caches to file via \"dump cache\" command if cache usage exceeds this threshold."),
8226
8227 Option("mds_task_status_update_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
8228 .set_default(2.0)
8229 .set_description("task status update interval to manager")
8230 .set_long_description("interval (in seconds) for sending mds task status to ceph manager"),
8231
8232 Option("mds_max_snaps_per_dir", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
8233 .set_default(100)
8234 .set_min_max(0, 4096)
8235 .set_flag(Option::FLAG_RUNTIME)
8236 .set_description("max snapshots per directory")
8237 .set_long_description("maximum number of snapshots that can be created per directory"),
8238 });
8239 }
8240
8241 std::vector<Option> get_mds_client_options() {
8242 return std::vector<Option>({
8243 Option("client_cache_size", Option::TYPE_SIZE, Option::LEVEL_BASIC)
8244 .set_default(16384)
8245 .set_description("soft maximum number of directory entries in client cache"),
8246
8247 Option("client_cache_mid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
8248 .set_default(.75)
8249 .set_description("mid-point of client cache LRU"),
8250
8251 Option("client_use_random_mds", Option::TYPE_BOOL, Option::LEVEL_DEV)
8252 .set_default(false)
8253 .set_description("issue new requests to a random active MDS"),
8254
8255 Option("client_mount_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
8256 .set_default(300.0)
8257 .set_description("timeout for mounting CephFS (seconds)"),
8258
8259 Option("client_tick_interval", Option::TYPE_FLOAT, Option::LEVEL_DEV)
8260 .set_default(1.0)
8261 .set_description("seconds between client upkeep ticks"),
8262
8263 Option("client_trace", Option::TYPE_STR, Option::LEVEL_DEV)
8264 .set_default("")
8265 .set_description("file containing trace of client operations"),
8266
8267 Option("client_readahead_min", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
8268 .set_default(128*1024)
8269 .set_description("minimum bytes to readahead in a file"),
8270
8271 Option("client_readahead_max_bytes", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
8272 .set_default(0)
8273 .set_description("maximum bytes to readahead in a file (zero is unlimited)"),
8274
8275 Option("client_readahead_max_periods", Option::TYPE_INT, Option::LEVEL_ADVANCED)
8276 .set_default(4)
8277 .set_description("maximum stripe periods to readahead in a file"),
8278
8279 Option("client_reconnect_stale", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8280 .set_default(false)
8281 .set_description("reconnect when the session becomes stale"),
8282
8283 Option("client_snapdir", Option::TYPE_STR, Option::LEVEL_ADVANCED)
8284 .set_default(".snap")
8285 .set_description("pseudo directory for snapshot access to a directory"),
8286
8287 Option("client_mountpoint", Option::TYPE_STR, Option::LEVEL_ADVANCED)
8288 .set_default("/")
8289 .set_description("default mount-point"),
8290
8291 Option("client_mount_uid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
8292 .set_default(-1)
8293 .set_description("uid to mount as"),
8294
8295 Option("client_mount_gid", Option::TYPE_INT, Option::LEVEL_ADVANCED)
8296 .set_default(-1)
8297 .set_description("gid to mount as"),
8298
8299 /* RADOS client option */
8300 Option("client_notify_timeout", Option::TYPE_INT, Option::LEVEL_DEV)
8301 .set_default(10)
8302 .set_description(""),
8303
8304 /* RADOS client option */
8305 Option("osd_client_watch_timeout", Option::TYPE_INT, Option::LEVEL_DEV)
8306 .set_default(30)
8307 .set_description(""),
8308
8309 Option("client_caps_release_delay", Option::TYPE_INT, Option::LEVEL_DEV)
8310 .set_default(5)
8311 .set_description(""),
8312
8313 Option("client_quota_df", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8314 .set_default(true)
8315 .set_description("show quota usage for statfs (df)"),
8316
8317 Option("client_oc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8318 .set_default(true)
8319 .set_description("enable object caching"),
8320
8321 Option("client_oc_size", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
8322 .set_default(200_M)
8323 .set_description("maximum size of object cache"),
8324
8325 Option("client_oc_max_dirty", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
8326 .set_default(100_M)
8327 .set_description("maximum size of dirty pages in object cache"),
8328
8329 Option("client_oc_target_dirty", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
8330 .set_default(8_M)
8331 .set_description("target size of dirty pages object cache"),
8332
8333 Option("client_oc_max_dirty_age", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
8334 .set_default(5.0)
8335 .set_description("maximum age of dirty pages in object cache (seconds)"),
8336
8337 Option("client_oc_max_objects", Option::TYPE_INT, Option::LEVEL_ADVANCED)
8338 .set_default(1000)
8339 .set_description("maximum number of objects in cache"),
8340
8341 Option("client_debug_getattr_caps", Option::TYPE_BOOL, Option::LEVEL_DEV)
8342 .set_default(false)
8343 .set_description(""),
8344
8345 Option("client_debug_force_sync_read", Option::TYPE_BOOL, Option::LEVEL_DEV)
8346 .set_default(false)
8347 .set_description(""),
8348
8349 Option("client_debug_inject_tick_delay", Option::TYPE_INT, Option::LEVEL_DEV)
8350 .set_default(0)
8351 .set_description(""),
8352
8353 Option("client_max_inline_size", Option::TYPE_SIZE, Option::LEVEL_DEV)
8354 .set_default(4_K)
8355 .set_description(""),
8356
8357 Option("client_inject_release_failure", Option::TYPE_BOOL, Option::LEVEL_DEV)
8358 .set_default(false)
8359 .set_description(""),
8360
8361 Option("client_inject_fixed_oldest_tid", Option::TYPE_BOOL, Option::LEVEL_DEV)
8362 .set_default(false)
8363 .set_description(""),
8364
8365 Option("client_metadata", Option::TYPE_STR, Option::LEVEL_ADVANCED)
8366 .set_default("")
8367 .set_description("metadata key=value comma-delimited pairs appended to session metadata"),
8368
8369 Option("client_acl_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
8370 .set_default("")
8371 .set_description("ACL type to enforce (none or \"posix_acl\")"),
8372
8373 Option("client_permissions", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8374 .set_default(true)
8375 .set_description("client-enforced permission checking"),
8376
8377 Option("client_dirsize_rbytes", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8378 .set_default(true)
8379 .set_description("set the directory size as the number of file bytes recursively used")
8380 .set_long_description("This option enables a CephFS feature that stores the recursive directory size (the bytes used by files in the directory and its descendents) in the st_size field of the stat structure."),
8381
8382 Option("client_force_lazyio", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8383 .set_default(false)
8384 .set_description(""),
8385
8386 // note: the max amount of "in flight" dirty data is roughly (max - target)
8387 Option("fuse_use_invalidate_cb", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8388 .set_default(true)
8389 .set_description("use fuse 2.8+ invalidate callback to keep page cache consistent"),
8390
8391 Option("fuse_disable_pagecache", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8392 .set_default(false)
8393 .set_description("disable page caching in the kernel for this FUSE mount"),
8394
8395 Option("fuse_allow_other", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8396 .set_default(true)
8397 .set_description("pass allow_other to FUSE on mount"),
8398
8399 Option("fuse_default_permissions", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8400 .set_default(false)
8401 .set_description("pass default_permisions to FUSE on mount")
8402 .set_flag(Option::FLAG_STARTUP),
8403
8404 Option("fuse_big_writes", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8405 .set_default(true)
8406 .set_description("big_writes is deprecated in libfuse 3.0.0"),
8407
8408 Option("fuse_max_write", Option::TYPE_SIZE, Option::LEVEL_ADVANCED)
8409 .set_default(0)
8410 .set_description("set the maximum number of bytes in a single write operation")
8411 .set_long_description("Set the maximum number of bytes in a single write operation that may pass atomically through FUSE. The FUSE default is 128kB and may be indicated by setting this option to 0."),
8412
8413 Option("fuse_atomic_o_trunc", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8414 .set_default(true)
8415 .set_description("pass atomic_o_trunc flag to FUSE on mount"),
8416
8417 Option("fuse_debug", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8418 .set_default(false)
8419 .set_flag(Option::FLAG_STARTUP)
8420 .set_flag(Option::FLAG_NO_MON_UPDATE)
8421 .set_description("enable debugging for the libfuse"),
8422
8423 Option("fuse_multithreaded", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8424 .set_default(true)
8425 .set_description("allow parallel processing through FUSE library"),
8426
8427 Option("fuse_require_active_mds", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8428 .set_default(true)
8429 .set_description("require active MDSs in the file system when mounting"),
8430
8431 Option("fuse_syncfs_on_mksnap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8432 .set_default(true)
8433 .set_description("synchronize all local metadata/file changes after snapshot"),
8434
8435 Option("fuse_set_user_groups", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8436 .set_default(true)
8437 .set_description("check for ceph-fuse to consider supplementary groups for permissions"),
8438
8439 Option("client_try_dentry_invalidate", Option::TYPE_BOOL, Option::LEVEL_DEV)
8440 .set_default(false)
8441 .set_description(""),
8442
8443 Option("client_die_on_failed_remount", Option::TYPE_BOOL, Option::LEVEL_DEV)
8444 .set_default(false)
8445 .set_description(""),
8446
8447 Option("client_die_on_failed_dentry_invalidate", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8448 .set_default(true)
8449 .set_description("kill the client when no dentry invalidation options are available")
8450 .set_long_description("The CephFS client requires a mechanism to invalidate dentries in the caller (e.g. the kernel for ceph-fuse) when capabilities must be recalled. If the client cannot do this then the MDS cache cannot shrink which can cause the MDS to fail."),
8451
8452 Option("client_check_pool_perm", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
8453 .set_default(true)
8454 .set_description("confirm access to inode's data pool/namespace described in file layout"),
8455
8456 Option("client_use_faked_inos", Option::TYPE_BOOL, Option::LEVEL_DEV)
8457 .set_default(false)
8458 .set_description(""),
8459
8460 Option("client_fs", Option::TYPE_STR, Option::LEVEL_ADVANCED)
8461 .set_flag(Option::FLAG_STARTUP)
8462 .set_default("")
8463 .set_description("CephFS file system name to mount")
8464 .set_long_description("Use this with ceph-fuse, or with any process "
8465 "that uses libcephfs. Programs using libcephfs may also pass "
8466 "the filesystem name into mount(), which will override this setting. "
8467 "If no filesystem name is given in mount() or this setting, the default "
8468 "filesystem will be mounted (usually the first created)."),
8469
8470 /* Alias for client_fs. Deprecated */
8471 Option("client_mds_namespace", Option::TYPE_STR, Option::LEVEL_DEV)
8472 .set_flag(Option::FLAG_STARTUP)
8473 .set_default(""),
8474
8475 Option("fake_statfs_for_testing", Option::TYPE_INT, Option::LEVEL_DEV)
8476 .set_default(0)
8477 .set_description("Set a value for kb and compute kb_used from total of num_bytes"),
8478
8479 Option("debug_allow_any_pool_priority", Option::TYPE_BOOL, Option::LEVEL_DEV)
8480 .set_default(false)
8481 .set_description("Allow any pool priority to be set to test conversion to new range"),
8482
8483 Option("client_shutdown_timeout", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
8484 .set_flag(Option::FLAG_RUNTIME)
8485 .set_default(30)
8486 .set_min(0)
8487 .set_description("timeout for shutting down CephFS")
8488 .set_long_description("Timeout for shutting down CephFS via unmount or shutdown.")
8489 .add_tag("client")
8490 });
8491 }
8492
8493
8494 std::vector<Option> get_cephfs_shell_options() {
8495 return std::vector<Option>({
8496 Option("allow_ansi", Option::TYPE_STR, Option::LEVEL_BASIC)
8497 .set_default("Terminal")
8498 .set_description("Allow ANSI escape sequences in output. Values: "
8499 "Terminal, Always, Never"),
8500
8501 Option("colors", Option::TYPE_STR, Option::LEVEL_BASIC)
8502 .set_default("Terminal")
8503 .set_description("Colouring CephFS shell input and output. Values: "
8504 "Terminal, Always, Never"),
8505
8506 Option("continuation_prompt", Option::TYPE_STR, Option::LEVEL_BASIC)
8507 .set_default(">")
8508 .set_description("Prompt string when a command continue to second line"),
8509
8510 Option("debug_shell", Option::TYPE_BOOL, Option::LEVEL_BASIC)
8511 .set_default(false)
8512 .set_description("Allow tracebacks on error for CephFS Shell"),
8513
8514 Option("echo", Option::TYPE_BOOL, Option::LEVEL_BASIC)
8515 .set_default(false)
8516 .set_description("Print command issued on prompt before execution"),
8517
8518 Option("editor", Option::TYPE_STR, Option::LEVEL_BASIC)
8519 .set_default("vim")
8520 .set_description("Default text editor for shell"),
8521
8522 Option("feedback_to_output", Option::TYPE_BOOL, Option::LEVEL_BASIC)
8523 .set_default(false)
8524 .set_description("include '|' and '>' in result"),
8525
8526 Option("max_completion_items", Option::TYPE_INT, Option::LEVEL_BASIC)
8527 .set_default(50)
8528 .set_description("Maximum number of items to be displayed by tab "
8529 "completion"),
8530
8531 Option("prompt", Option::TYPE_STR, Option::LEVEL_BASIC)
8532 .set_default("\x1b[01;33mCephFS:~\x1b[96m/\x1b[0m\x1b[01;33m>>>\x1b[00m ")
8533 .set_description("Whether non-essential feedback should be printed."),
8534
8535 Option("quiet", Option::TYPE_BOOL, Option::LEVEL_BASIC)
8536 .set_default(false)
8537 .set_description("Whether non-essential feedback should be printed."),
8538
8539 Option("timing", Option::TYPE_BOOL, Option::LEVEL_BASIC)
8540 .set_default(false)
8541 .set_description("Whether execution time should be reported"),
8542 });
8543 }
8544
8545 static std::vector<Option> build_options()
8546 {
8547 std::vector<Option> result = get_global_options();
8548
8549 auto ingest = [&result](std::vector<Option>&& options, const char* svc) {
8550 for (auto &o : options) {
8551 o.add_service(svc);
8552 result.push_back(std::move(o));
8553 }
8554 };
8555
8556 ingest(get_rgw_options(), "rgw");
8557 ingest(get_rbd_options(), "rbd");
8558 ingest(get_rbd_mirror_options(), "rbd-mirror");
8559 ingest(get_immutable_object_cache_options(), "immutable-objet-cache");
8560 ingest(get_mds_options(), "mds");
8561 ingest(get_mds_client_options(), "mds_client");
8562 ingest(get_cephfs_shell_options(), "cephfs-shell");
8563
8564 return result;
8565 }
8566
8567 const std::vector<Option> ceph_options = build_options();