mirror of
https://github.com/ceph/ceph
synced 2025-01-21 02:31:19 +00:00
config: define config vars once in config_opts.h
Rather than defining configuration variables twice, define them once in config_opts.h. This makes it easier to work with them. Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
This commit is contained in:
parent
18e5be3c46
commit
a052c2e450
@ -67,45 +67,6 @@ struct ceph_file_layout g_default_file_layout = {
|
||||
#define _STR(x) #x
|
||||
#define STRINGIFY(x) _STR(x)
|
||||
|
||||
#define TYCHECK(x, ty) STATIC_ASSERT(sizeof(((struct md_config_t *)0)->x) == sizeof(ty))
|
||||
|
||||
#define OPTION_OPT_STR(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, std::string), \
|
||||
OPT_STR, offsetof(struct md_config_t, name), def_val, 0, 0 }
|
||||
|
||||
#define OPTION_OPT_ADDR(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, entity_addr_t), \
|
||||
OPT_ADDR, offsetof(struct md_config_t, name), def_val, 0, 0 }
|
||||
|
||||
#define OPTION_OPT_LONGLONG(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, long long), \
|
||||
OPT_LONGLONG, offsetof(struct md_config_t, name), 0, def_val, 0 }
|
||||
|
||||
#define OPTION_OPT_INT(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, int), \
|
||||
OPT_INT, offsetof(struct md_config_t, name), 0, def_val, 0 }
|
||||
|
||||
#define OPTION_OPT_BOOL(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, bool), \
|
||||
OPT_BOOL, offsetof(struct md_config_t, name), 0, def_val, 0 }
|
||||
|
||||
#define OPTION_OPT_U32(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, uint32_t), \
|
||||
OPT_U32, offsetof(struct md_config_t, name), 0, def_val, 0 }
|
||||
|
||||
#define OPTION_OPT_U64(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, uint64_t), \
|
||||
OPT_U64, offsetof(struct md_config_t, name), 0, def_val, 0 }
|
||||
|
||||
#define OPTION_OPT_DOUBLE(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, double), \
|
||||
OPT_DOUBLE, offsetof(struct md_config_t, name), 0, 0, def_val }
|
||||
|
||||
#define OPTION_OPT_FLOAT(name, def_val) \
|
||||
{ STRINGIFY(name) + TYCHECK(name, float), \
|
||||
OPT_FLOAT, offsetof(struct md_config_t, name), 0, 0, def_val }
|
||||
|
||||
#define OPTION(name, type, def_val) OPTION_##type(name, def_val)
|
||||
|
||||
void *config_option::conf_ptr(md_config_t *conf) const
|
||||
{
|
||||
@ -119,329 +80,11 @@ const void *config_option::conf_ptr(const md_config_t *conf) const
|
||||
return v;
|
||||
}
|
||||
|
||||
/* All options must appear here, or else they won't be initialized
|
||||
* when md_config_t is created. */
|
||||
struct config_option config_optionsp[] = {
|
||||
OPTION(host, OPT_STR, "localhost"),
|
||||
OPTION(public_addr, OPT_ADDR, NULL),
|
||||
OPTION(cluster_addr, OPT_ADDR, NULL),
|
||||
OPTION(num_client, OPT_INT, 1),
|
||||
OPTION(monmap, OPT_STR, 0),
|
||||
OPTION(mon_host, OPT_STR, 0),
|
||||
OPTION(daemonize, OPT_BOOL, false),
|
||||
OPTION(admin_socket, OPT_STR, ""),
|
||||
OPTION(log_file, OPT_STR, 0),
|
||||
OPTION(log_sym_dir, OPT_STR, 0),
|
||||
OPTION(log_sym_history, OPT_INT, 10),
|
||||
OPTION(log_to_stderr, OPT_INT, LOG_TO_STDERR_ALL),
|
||||
OPTION(log_to_syslog, OPT_BOOL, false),
|
||||
OPTION(log_per_instance, OPT_BOOL, false),
|
||||
OPTION(clog_to_monitors, OPT_BOOL, true),
|
||||
OPTION(clog_to_syslog, OPT_BOOL, false),
|
||||
OPTION(pid_file, OPT_STR, 0),
|
||||
OPTION(chdir, OPT_STR, "/"),
|
||||
OPTION(max_open_files, OPT_LONGLONG, 0),
|
||||
OPTION(debug, OPT_INT, 0),
|
||||
OPTION(debug_lockdep, OPT_INT, 0),
|
||||
OPTION(debug_context, OPT_INT, 0),
|
||||
OPTION(debug_mds, OPT_INT, 1),
|
||||
OPTION(debug_mds_balancer, OPT_INT, 1),
|
||||
OPTION(debug_mds_locker, OPT_INT, 1),
|
||||
OPTION(debug_mds_log, OPT_INT, 1),
|
||||
OPTION(debug_mds_log_expire, OPT_INT, 1),
|
||||
OPTION(debug_mds_migrator, OPT_INT, 1),
|
||||
OPTION(debug_buffer, OPT_INT, 0),
|
||||
OPTION(debug_timer, OPT_INT, 0),
|
||||
OPTION(debug_filer, OPT_INT, 0),
|
||||
OPTION(debug_objecter, OPT_INT, 0),
|
||||
OPTION(debug_rados, OPT_INT, 0),
|
||||
OPTION(debug_rbd, OPT_INT, 0),
|
||||
OPTION(debug_journaler, OPT_INT, 0),
|
||||
OPTION(debug_objectcacher, OPT_INT, 0),
|
||||
OPTION(debug_client, OPT_INT, 0),
|
||||
OPTION(debug_osd, OPT_INT, 0),
|
||||
OPTION(debug_filestore, OPT_INT, 1),
|
||||
OPTION(debug_journal, OPT_INT, 1),
|
||||
OPTION(debug_bdev, OPT_INT, 1), // block device
|
||||
OPTION(debug_ms, OPT_INT, 0),
|
||||
OPTION(debug_mon, OPT_INT, 1),
|
||||
OPTION(debug_monc, OPT_INT, 0),
|
||||
OPTION(debug_paxos, OPT_INT, 0),
|
||||
OPTION(debug_tp, OPT_INT, 0),
|
||||
OPTION(debug_auth, OPT_INT, 1),
|
||||
OPTION(debug_finisher, OPT_INT, 1),
|
||||
OPTION(debug_heartbeatmap, OPT_INT, 1),
|
||||
OPTION(key, OPT_STR, 0),
|
||||
OPTION(keyfile, OPT_STR, 0),
|
||||
OPTION(keyring, OPT_STR, "/etc/ceph/keyring,/etc/ceph/keyring.bin"),
|
||||
OPTION(heartbeat_interval, OPT_INT, 5),
|
||||
OPTION(heartbeat_file, OPT_STR, NULL),
|
||||
OPTION(ms_tcp_nodelay, OPT_BOOL, true),
|
||||
OPTION(ms_initial_backoff, OPT_DOUBLE, .2),
|
||||
OPTION(ms_max_backoff, OPT_DOUBLE, 15.0),
|
||||
OPTION(ms_nocrc, OPT_BOOL, false),
|
||||
OPTION(ms_die_on_bad_msg, OPT_BOOL, false),
|
||||
OPTION(ms_dispatch_throttle_bytes, OPT_U64, 100 << 20),
|
||||
OPTION(ms_bind_ipv6, OPT_BOOL, false),
|
||||
OPTION(ms_rwthread_stack_bytes, OPT_U64, 1024 << 10),
|
||||
OPTION(ms_tcp_read_timeout, OPT_U64, 900),
|
||||
OPTION(ms_inject_socket_failures, OPT_U64, 0),
|
||||
OPTION(mon_data, OPT_STR, 0),
|
||||
OPTION(mon_tick_interval, OPT_INT, 5),
|
||||
OPTION(mon_subscribe_interval, OPT_DOUBLE, 300),
|
||||
OPTION(mon_osd_auto_mark_in, OPT_BOOL, true), // automatically mark new osds 'in'
|
||||
OPTION(mon_osd_down_out_interval, OPT_INT, 300), // seconds
|
||||
OPTION(mon_lease, OPT_FLOAT, 5), // lease interval
|
||||
OPTION(mon_lease_renew_interval, OPT_FLOAT, 3), // on leader, to renew the lease
|
||||
OPTION(mon_lease_ack_timeout, OPT_FLOAT, 10.0), // on leader, if lease isn't acked by all peons
|
||||
OPTION(mon_clock_drift_allowed, OPT_FLOAT, .010), // allowed clock drift between monitors
|
||||
OPTION(mon_clock_drift_warn_backoff, OPT_FLOAT, 5), // exponential backoff for clock drift warnings
|
||||
OPTION(mon_accept_timeout, OPT_FLOAT, 10.0), // on leader, if paxos update isn't accepted
|
||||
OPTION(mon_pg_create_interval, OPT_FLOAT, 30.0), // no more than every 30s
|
||||
OPTION(mon_osd_full_ratio, OPT_INT, 95), // what % full makes an OSD "full"
|
||||
OPTION(mon_osd_nearfull_ratio, OPT_INT, 85), // what % full makes an OSD near full
|
||||
OPTION(mon_globalid_prealloc, OPT_INT, 100), // how many globalids to prealloc
|
||||
OPTION(mon_osd_report_timeout, OPT_INT, 900), // grace period before declaring unresponsive OSDs dead
|
||||
OPTION(mon_force_standby_active, OPT_BOOL, true), // should mons force standby-replay mds to be active
|
||||
OPTION(paxos_propose_interval, OPT_DOUBLE, 1.0), // gather updates for this long before proposing a map update
|
||||
OPTION(paxos_min_wait, OPT_DOUBLE, 0.05), // min time to gather updates for after period of inactivity
|
||||
OPTION(paxos_observer_timeout, OPT_DOUBLE, 5*60), // gather updates for this long before proposing a map update
|
||||
OPTION(clock_offset, OPT_DOUBLE, 0), // how much to offset the system clock in Clock.cc
|
||||
OPTION(auth_supported, OPT_STR, "none"),
|
||||
OPTION(auth_mon_ticket_ttl, OPT_DOUBLE, 60*60*12),
|
||||
OPTION(auth_service_ticket_ttl, OPT_DOUBLE, 60*60),
|
||||
OPTION(mon_client_hunt_interval, OPT_DOUBLE, 3.0), // try new mon every N seconds until we connect
|
||||
OPTION(mon_client_ping_interval, OPT_DOUBLE, 10.0), // ping every N seconds
|
||||
OPTION(client_cache_size, OPT_INT, 16384),
|
||||
OPTION(client_cache_mid, OPT_FLOAT, .75),
|
||||
OPTION(client_cache_stat_ttl, OPT_INT, 0), // seconds until cached stat results become invalid
|
||||
OPTION(client_cache_readdir_ttl, OPT_INT, 1), // 1 second only
|
||||
OPTION(client_use_random_mds, OPT_BOOL, false),
|
||||
OPTION(client_mount_timeout, OPT_DOUBLE, 30.0),
|
||||
OPTION(client_unmount_timeout, OPT_DOUBLE, 10.0),
|
||||
OPTION(client_tick_interval, OPT_DOUBLE, 1.0),
|
||||
OPTION(client_trace, OPT_STR, 0),
|
||||
OPTION(client_readahead_min, OPT_LONGLONG, 128*1024), // readahead at _least_ this much.
|
||||
OPTION(client_readahead_max_bytes, OPT_LONGLONG, 0), //8 * 1024*1024,
|
||||
OPTION(client_readahead_max_periods, OPT_LONGLONG, 4), // as multiple of file layout period (object size * num stripes)
|
||||
OPTION(client_snapdir, OPT_STR, ".snap"),
|
||||
OPTION(client_mountpoint, OPT_STR, "/"),
|
||||
OPTION(client_notify_timeout, OPT_INT, 10), // in seconds
|
||||
OPTION(client_oc, OPT_BOOL, true),
|
||||
OPTION(client_oc_size, OPT_INT, 1024*1024* 200), // MB * n
|
||||
OPTION(client_oc_max_dirty, OPT_INT, 1024*1024* 100), // MB * n (dirty OR tx.. bigish)
|
||||
OPTION(client_oc_target_dirty, OPT_INT, 1024*1024* 8), // target dirty (keep this smallish)
|
||||
// note: the max amount of "in flight" dirty data is roughly (max - target)
|
||||
OPTION(client_oc_max_sync_write, OPT_U64, 128*1024), // sync writes >= this use wrlock
|
||||
OPTION(fuse_use_invalidate_cb, OPT_BOOL, false), // use fuse 2.8+ invalidate callback to keep page cache consistent
|
||||
OPTION(objecter_tick_interval, OPT_DOUBLE, 5.0),
|
||||
OPTION(objecter_mon_retry_interval, OPT_DOUBLE, 5.0),
|
||||
OPTION(objecter_timeout, OPT_DOUBLE, 10.0), // before we ask for a map
|
||||
OPTION(objecter_inflight_op_bytes, OPT_U64, 1024*1024*100), //max in-flight data (both directions)
|
||||
OPTION(journaler_allow_split_entries, OPT_BOOL, true),
|
||||
OPTION(journaler_write_head_interval, OPT_INT, 15),
|
||||
OPTION(journaler_prefetch_periods, OPT_INT, 10), // * journal object size
|
||||
OPTION(journaler_prezero_periods, OPT_INT, 5), // * journal object size
|
||||
OPTION(journaler_batch_interval, OPT_DOUBLE, .001), // seconds.. max add'l latency we artificially incur
|
||||
OPTION(journaler_batch_max, OPT_U64, 0), // max bytes we'll delay flushing; disable, for now....
|
||||
OPTION(mds_max_file_size, OPT_U64, 1ULL << 40),
|
||||
OPTION(mds_cache_size, OPT_INT, 100000),
|
||||
OPTION(mds_cache_mid, OPT_FLOAT, .7),
|
||||
OPTION(mds_mem_max, OPT_INT, 1048576), // KB
|
||||
OPTION(mds_dir_commit_ratio, OPT_FLOAT, .5),
|
||||
OPTION(mds_dir_max_commit_size, OPT_INT, 90), // MB
|
||||
OPTION(mds_decay_halflife, OPT_FLOAT, 5),
|
||||
OPTION(mds_beacon_interval, OPT_FLOAT, 4),
|
||||
OPTION(mds_beacon_grace, OPT_FLOAT, 15),
|
||||
OPTION(mds_blacklist_interval, OPT_FLOAT, 24.0*60.0), // how long to blacklist failed nodes
|
||||
OPTION(mds_session_timeout, OPT_FLOAT, 60), // cap bits and leases time out if client idle
|
||||
OPTION(mds_session_autoclose, OPT_FLOAT, 300), // autoclose idle session
|
||||
OPTION(mds_reconnect_timeout, OPT_FLOAT, 45), // seconds to wait for clients during mds restart
|
||||
// make it (mds_session_timeout - mds_beacon_grace)
|
||||
OPTION(mds_tick_interval, OPT_FLOAT, 5),
|
||||
OPTION(mds_dirstat_min_interval, OPT_FLOAT, 1), // try to avoid propagating more often than this
|
||||
OPTION(mds_scatter_nudge_interval, OPT_FLOAT, 5), // how quickly dirstat changes propagate up the hierarchy
|
||||
OPTION(mds_client_prealloc_inos, OPT_INT, 1000),
|
||||
OPTION(mds_early_reply, OPT_BOOL, true),
|
||||
OPTION(mds_use_tmap, OPT_BOOL, true), // use trivialmap for dir updates
|
||||
OPTION(mds_default_dir_hash, OPT_INT, CEPH_STR_HASH_RJENKINS),
|
||||
OPTION(mds_log, OPT_BOOL, true),
|
||||
OPTION(mds_log_skip_corrupt_events, OPT_BOOL, false),
|
||||
OPTION(mds_log_max_events, OPT_INT, -1),
|
||||
OPTION(mds_log_max_segments, OPT_INT, 30), // segment size defined by FileLayout, above
|
||||
OPTION(mds_log_max_expiring, OPT_INT, 20),
|
||||
OPTION(mds_log_eopen_size, OPT_INT, 100), // # open inodes per log entry
|
||||
OPTION(mds_bal_sample_interval, OPT_FLOAT, 3.0), // every 5 seconds
|
||||
OPTION(mds_bal_replicate_threshold, OPT_FLOAT, 8000),
|
||||
OPTION(mds_bal_unreplicate_threshold, OPT_FLOAT, 0),
|
||||
OPTION(mds_bal_frag, OPT_BOOL, false),
|
||||
OPTION(mds_bal_split_size, OPT_INT, 10000),
|
||||
OPTION(mds_bal_split_rd, OPT_FLOAT, 25000),
|
||||
OPTION(mds_bal_split_wr, OPT_FLOAT, 10000),
|
||||
OPTION(mds_bal_split_bits, OPT_INT, 3),
|
||||
OPTION(mds_bal_merge_size, OPT_INT, 50),
|
||||
OPTION(mds_bal_merge_rd, OPT_FLOAT, 1000),
|
||||
OPTION(mds_bal_merge_wr, OPT_FLOAT, 1000),
|
||||
OPTION(mds_bal_interval, OPT_INT, 10), // seconds
|
||||
OPTION(mds_bal_fragment_interval, OPT_INT, 5), // seconds
|
||||
OPTION(mds_bal_idle_threshold, OPT_FLOAT, 0),
|
||||
OPTION(mds_bal_max, OPT_INT, -1),
|
||||
OPTION(mds_bal_max_until, OPT_INT, -1),
|
||||
OPTION(mds_bal_mode, OPT_INT, 0),
|
||||
OPTION(mds_bal_min_rebalance, OPT_FLOAT, .1), // must be this much above average before we export anything
|
||||
OPTION(mds_bal_min_start, OPT_FLOAT, .2), // if we need less than this, we don't do anything
|
||||
OPTION(mds_bal_need_min, OPT_FLOAT, .8), // take within this range of what we need
|
||||
OPTION(mds_bal_need_max, OPT_FLOAT, 1.2),
|
||||
OPTION(mds_bal_midchunk, OPT_FLOAT, .3), // any sub bigger than this taken in full
|
||||
OPTION(mds_bal_minchunk, OPT_FLOAT, .001), // never take anything smaller than this
|
||||
OPTION(mds_bal_target_removal_min, OPT_INT, 5), // min balance iterations before old target is removed
|
||||
OPTION(mds_bal_target_removal_max, OPT_INT, 10), // max balance iterations before old target is removed
|
||||
OPTION(mds_replay_interval, OPT_FLOAT, 1.0), // time to wait before starting replay again
|
||||
OPTION(mds_shutdown_check, OPT_INT, 0),
|
||||
OPTION(mds_thrash_exports, OPT_INT, 0),
|
||||
OPTION(mds_thrash_fragments, OPT_INT, 0),
|
||||
OPTION(mds_dump_cache_on_map, OPT_BOOL, false),
|
||||
OPTION(mds_dump_cache_after_rejoin, OPT_BOOL, false),
|
||||
OPTION(mds_verify_scatter, OPT_BOOL, false),
|
||||
OPTION(mds_debug_scatterstat, OPT_BOOL, false),
|
||||
OPTION(mds_debug_frag, OPT_BOOL, false),
|
||||
OPTION(mds_debug_auth_pins, OPT_BOOL, false),
|
||||
OPTION(mds_debug_subtrees, OPT_BOOL, false),
|
||||
OPTION(mds_kill_mdstable_at, OPT_INT, 0),
|
||||
OPTION(mds_kill_export_at, OPT_INT, 0),
|
||||
OPTION(mds_kill_import_at, OPT_INT, 0),
|
||||
OPTION(mds_kill_link_at, OPT_INT, 0),
|
||||
OPTION(mds_kill_rename_at, OPT_INT, 0),
|
||||
OPTION(mds_wipe_sessions, OPT_BOOL, 0),
|
||||
OPTION(mds_wipe_ino_prealloc, OPT_BOOL, 0),
|
||||
OPTION(mds_skip_ino, OPT_INT, 0),
|
||||
OPTION(max_mds, OPT_INT, 1),
|
||||
OPTION(mds_standby_for_name, OPT_STR, 0),
|
||||
OPTION(mds_standby_for_rank, OPT_INT, -1),
|
||||
OPTION(mds_standby_replay, OPT_BOOL, false),
|
||||
OPTION(osd_data, OPT_STR, 0),
|
||||
OPTION(osd_journal, OPT_STR, 0),
|
||||
OPTION(osd_journal_size, OPT_INT, 0), // in mb
|
||||
OPTION(osd_max_write_size, OPT_INT, 90),
|
||||
OPTION(osd_balance_reads, OPT_BOOL, false),
|
||||
OPTION(osd_shed_reads, OPT_INT, false), // forward from primary to replica
|
||||
OPTION(osd_shed_reads_min_latency, OPT_DOUBLE, .01), // min local latency
|
||||
OPTION(osd_shed_reads_min_latency_diff, OPT_DOUBLE, .01), // min latency difference
|
||||
OPTION(osd_shed_reads_min_latency_ratio, OPT_DOUBLE, 1.5), // 1.2 == 20% higher than peer
|
||||
OPTION(osd_client_message_size_cap, OPT_U64, 500*1024L*1024L), // default to 200MB client data allowed in-memory
|
||||
OPTION(osd_stat_refresh_interval, OPT_DOUBLE, .5),
|
||||
OPTION(osd_pg_bits, OPT_INT, 6), // bits per osd
|
||||
OPTION(osd_pgp_bits, OPT_INT, 6), // bits per osd
|
||||
OPTION(osd_lpg_bits, OPT_INT, 2), // bits per osd
|
||||
OPTION(osd_pg_layout, OPT_INT, CEPH_PG_LAYOUT_CRUSH),
|
||||
OPTION(osd_min_rep, OPT_INT, 1),
|
||||
OPTION(osd_max_rep, OPT_INT, 10),
|
||||
OPTION(osd_min_raid_width, OPT_INT, 3),
|
||||
OPTION(osd_max_raid_width, OPT_INT, 2),
|
||||
OPTION(osd_pool_default_crush_rule, OPT_INT, 0),
|
||||
OPTION(osd_pool_default_size, OPT_INT, 2),
|
||||
OPTION(osd_pool_default_pg_num, OPT_INT, 8),
|
||||
OPTION(osd_pool_default_pgp_num, OPT_INT, 8),
|
||||
OPTION(osd_op_threads, OPT_INT, 2), // 0 == no threading
|
||||
OPTION(osd_max_opq, OPT_INT, 10),
|
||||
OPTION(osd_disk_threads, OPT_INT, 1),
|
||||
OPTION(osd_recovery_threads, OPT_INT, 1),
|
||||
OPTION(osd_op_thread_timeout, OPT_INT, 30),
|
||||
OPTION(osd_backlog_thread_timeout, OPT_INT, 60*60*1),
|
||||
OPTION(osd_recovery_thread_timeout, OPT_INT, 30),
|
||||
OPTION(osd_snap_trim_thread_timeout, OPT_INT, 60*60*1),
|
||||
OPTION(osd_scrub_thread_timeout, OPT_INT, 60),
|
||||
OPTION(osd_scrub_finalize_thread_timeout, OPT_INT, 60*10),
|
||||
OPTION(osd_remove_thread_timeout, OPT_INT, 60*60),
|
||||
OPTION(osd_age, OPT_FLOAT, .8),
|
||||
OPTION(osd_age_time, OPT_INT, 0),
|
||||
OPTION(osd_heartbeat_interval, OPT_INT, 1),
|
||||
OPTION(osd_mon_heartbeat_interval, OPT_INT, 30), // if no peers, ping monitor
|
||||
OPTION(osd_heartbeat_grace, OPT_INT, 20),
|
||||
OPTION(osd_mon_report_interval_max, OPT_INT, 120),
|
||||
OPTION(osd_mon_report_interval_min, OPT_INT, 5), // pg stats, failures, up_thru, boot.
|
||||
OPTION(osd_min_down_reporters, OPT_INT, 1), // number of OSDs who need to report a down OSD for it to count
|
||||
OPTION(osd_min_down_reports, OPT_INT, 3), // number of times a down OSD must be reported for it to count
|
||||
OPTION(osd_replay_window, OPT_INT, 45),
|
||||
OPTION(osd_preserve_trimmed_log, OPT_BOOL, true),
|
||||
OPTION(osd_auto_mark_unfound_lost, OPT_BOOL, false),
|
||||
OPTION(osd_recovery_delay_start, OPT_FLOAT, 15),
|
||||
OPTION(osd_recovery_max_active, OPT_INT, 5),
|
||||
OPTION(osd_recovery_max_chunk, OPT_U64, 1<<20), // max size of push chunk
|
||||
OPTION(osd_recovery_forget_lost_objects, OPT_BOOL, false), // off for now
|
||||
OPTION(osd_max_scrubs, OPT_INT, 1),
|
||||
OPTION(osd_scrub_load_threshold, OPT_FLOAT, 0.5),
|
||||
OPTION(osd_scrub_min_interval, OPT_FLOAT, 300),
|
||||
OPTION(osd_scrub_max_interval, OPT_FLOAT, 60*60*24), // once a day
|
||||
OPTION(osd_auto_weight, OPT_BOOL, false),
|
||||
OPTION(osd_class_error_timeout, OPT_DOUBLE, 60.0), // seconds
|
||||
OPTION(osd_class_timeout, OPT_DOUBLE, 60*60.0), // seconds
|
||||
OPTION(osd_class_dir, OPT_STR, "/usr/lib/rados-classes"),
|
||||
OPTION(osd_check_for_log_corruption, OPT_BOOL, false),
|
||||
OPTION(osd_use_stale_snap, OPT_BOOL, false),
|
||||
OPTION(osd_rollback_to_cluster_snap, OPT_STR, 0),
|
||||
OPTION(osd_max_notify_timeout, OPT_U32, 30), // max notify timeout in seconds
|
||||
OPTION(filestore, OPT_BOOL, false),
|
||||
OPTION(filestore_max_sync_interval, OPT_DOUBLE, 5), // seconds
|
||||
OPTION(filestore_min_sync_interval, OPT_DOUBLE, .01), // seconds
|
||||
OPTION(filestore_fake_attrs, OPT_BOOL, false),
|
||||
OPTION(filestore_fake_collections, OPT_BOOL, false),
|
||||
OPTION(filestore_dev, OPT_STR, 0),
|
||||
OPTION(filestore_btrfs_trans, OPT_BOOL, false),
|
||||
OPTION(filestore_btrfs_snap, OPT_BOOL, true),
|
||||
OPTION(filestore_btrfs_clone_range, OPT_BOOL, true),
|
||||
OPTION(filestore_fsync_flushes_journal_data, OPT_BOOL, false),
|
||||
OPTION(filestore_fiemap, OPT_BOOL, true), // (try to) use fiemap
|
||||
OPTION(filestore_flusher, OPT_BOOL, true),
|
||||
OPTION(filestore_flusher_max_fds, OPT_INT, 512),
|
||||
OPTION(filestore_sync_flush, OPT_BOOL, false),
|
||||
OPTION(filestore_journal_parallel, OPT_BOOL, false),
|
||||
OPTION(filestore_journal_writeahead, OPT_BOOL, false),
|
||||
OPTION(filestore_journal_trailing, OPT_BOOL, false),
|
||||
OPTION(filestore_queue_max_ops, OPT_INT, 500),
|
||||
OPTION(filestore_queue_max_bytes, OPT_INT, 100 << 20),
|
||||
OPTION(filestore_queue_committing_max_ops, OPT_INT, 500), // this is ON TOP of filestore_queue_max_*
|
||||
OPTION(filestore_queue_committing_max_bytes, OPT_INT, 100 << 20), // "
|
||||
OPTION(filestore_op_threads, OPT_INT, 2),
|
||||
OPTION(filestore_op_thread_timeout, OPT_INT, 60),
|
||||
OPTION(filestore_op_thread_suicide_timeout, OPT_INT, 180),
|
||||
OPTION(filestore_commit_timeout, OPT_FLOAT, 600),
|
||||
OPTION(filestore_fiemap_threshold, OPT_INT, 4096),
|
||||
OPTION(filestore_merge_threshold, OPT_INT, 10),
|
||||
OPTION(filestore_split_multiple, OPT_INT, 2),
|
||||
OPTION(filestore_update_collections, OPT_BOOL, false),
|
||||
OPTION(journal_dio, OPT_BOOL, true),
|
||||
OPTION(journal_block_align, OPT_BOOL, true),
|
||||
OPTION(journal_max_write_bytes, OPT_INT, 10 << 20),
|
||||
OPTION(journal_max_write_entries, OPT_INT, 100),
|
||||
OPTION(journal_queue_max_ops, OPT_INT, 500),
|
||||
OPTION(journal_queue_max_bytes, OPT_INT, 100 << 20),
|
||||
OPTION(journal_align_min_size, OPT_INT, 64 << 10), // align data payloads >= this.
|
||||
OPTION(bdev_lock, OPT_BOOL, true),
|
||||
OPTION(bdev_iothreads, OPT_INT, 1), // number of ios to queue with kernel
|
||||
OPTION(bdev_idle_kick_after_ms, OPT_INT, 100), // ms
|
||||
OPTION(bdev_el_fw_max_ms, OPT_INT, 10000), // restart elevator at least once every 1000 ms
|
||||
OPTION(bdev_el_bw_max_ms, OPT_INT, 3000), // restart elevator at least once every 300 ms
|
||||
OPTION(bdev_el_bidir, OPT_BOOL, false), // bidirectional elevator?
|
||||
OPTION(bdev_iov_max, OPT_INT, 512), // max # iov's to collect into a single readv()/writev() call
|
||||
OPTION(bdev_debug_check_io_overlap, OPT_BOOL, true), // [DEBUG] check for any pending io overlaps
|
||||
OPTION(bdev_fake_mb, OPT_INT, 0),
|
||||
OPTION(bdev_fake_max_mb, OPT_INT, 0),
|
||||
OPTION(rgw_log, OPT_INT, 20), // log level for the Rados gateway
|
||||
OPTION(rgw_cache_enabled, OPT_BOOL, false), // rgw cache enabled
|
||||
OPTION(rgw_cache_lru_size, OPT_INT, 10000), // num of entries in rgw cache
|
||||
OPTION(rgw_socket_path, OPT_STR, NULL), // path to unix domain socket, if not specified, rgw will not run as external fcgi
|
||||
OPTION(rgw_op_thread_timeout, OPT_INT, 10*60),
|
||||
OPTION(rgw_op_thread_suicide_timeout, OPT_INT, 60*60),
|
||||
OPTION(rgw_thread_pool_size, OPT_INT, 100),
|
||||
OPTION(rgw_maintenance_tick_interval, OPT_DOUBLE, 10.0),
|
||||
OPTION(rgw_pools_preallocate_max, OPT_INT, 100),
|
||||
OPTION(rgw_pools_preallocate_threshold, OPT_INT, 70),
|
||||
OPTION(rgw_log_nonexistent_bucket, OPT_BOOL, false),
|
||||
OPTION(rbd_writeback_window, OPT_INT, 0 /*8 << 20*/), // rbd writeback window size, bytes
|
||||
|
||||
// see config.h
|
||||
OPTION(internal_safe_to_start_threads, OPT_BOOL, false),
|
||||
#define OPTION(name, type, def_val) \
|
||||
{ STRINGIFY(name), type, offsetof(struct md_config_t, name) },
|
||||
#include "common/config_opts.h"
|
||||
#undef OPTION
|
||||
};
|
||||
|
||||
const int NUM_CONFIG_OPTIONS = sizeof(config_optionsp) / sizeof(config_option);
|
||||
@ -468,13 +111,12 @@ bool ceph_resolve_file_search(const std::string& filename_list,
|
||||
|
||||
md_config_t::
|
||||
md_config_t()
|
||||
: lock("md_config_t", true)
|
||||
:
|
||||
#define OPTION(name, type, def_val) name(def_val),
|
||||
#include "common/config_opts.h"
|
||||
#undef OPTION
|
||||
lock("md_config_t", true)
|
||||
{
|
||||
for (int i = 0; i < NUM_CONFIG_OPTIONS; i++) {
|
||||
config_option *opt = config_optionsp + i;
|
||||
set_val_from_default(opt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
md_config_t::
|
||||
@ -592,8 +234,9 @@ void md_config_t::parse_env()
|
||||
Mutex::Locker l(lock);
|
||||
if (internal_safe_to_start_threads)
|
||||
return;
|
||||
if (getenv("CEPH_KEYRING"))
|
||||
keyring = getenv("CEPH_KEYRING");
|
||||
if (getenv("CEPH_KEYRING")) {
|
||||
set_val_or_die("keyring", getenv("CEPH_KEYRING"));
|
||||
}
|
||||
}
|
||||
|
||||
int md_config_t::
|
||||
@ -967,72 +610,6 @@ get_val_from_conf_file(const std::vector <std::string> §ions,
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
void md_config_t::
|
||||
set_val_from_default(const config_option *opt)
|
||||
{
|
||||
Mutex::Locker l(lock);
|
||||
// set_val_from_default can't fail! Unless the programmer screwed up, and
|
||||
// in that case we'll abort.
|
||||
// Anyway, we know that this function changed something.
|
||||
changed.insert(opt->name);
|
||||
|
||||
switch (opt->type) {
|
||||
case OPT_INT:
|
||||
*(int*)opt->conf_ptr(this) = opt->def_longlong;
|
||||
break;
|
||||
case OPT_LONGLONG:
|
||||
*(long long*)opt->conf_ptr(this) = opt->def_longlong;
|
||||
break;
|
||||
case OPT_STR: {
|
||||
std::string *str = (std::string *)opt->conf_ptr(this);
|
||||
*str = opt->def_str ? opt->def_str : "";
|
||||
if (expand_meta(*str)) {
|
||||
// We currently don't allow metavariables in default values at the moment.
|
||||
// This restriction will probably be eased soon.
|
||||
ostringstream oss;
|
||||
oss << "found metavariables in the default value for '"
|
||||
<< opt->name << "'. " << "metavariables cannot be "
|
||||
<< "used in default values.";
|
||||
assert(oss.str().c_str() == 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OPT_FLOAT:
|
||||
*(float *)opt->conf_ptr(this) = (float)opt->def_double;
|
||||
break;
|
||||
case OPT_DOUBLE:
|
||||
*(double *)opt->conf_ptr(this) = opt->def_double;
|
||||
break;
|
||||
case OPT_BOOL:
|
||||
*(bool *)opt->conf_ptr(this) = (bool)opt->def_longlong;
|
||||
break;
|
||||
case OPT_U32:
|
||||
*(uint32_t *)opt->conf_ptr(this) = (uint32_t)opt->def_longlong;
|
||||
break;
|
||||
case OPT_U64:
|
||||
*(uint64_t *)opt->conf_ptr(this) = (uint64_t)opt->def_longlong;
|
||||
break;
|
||||
case OPT_ADDR: {
|
||||
if (!opt->def_str) {
|
||||
// entity_addr_t has a default constructor, so we don't need to
|
||||
// do anything here.
|
||||
break;
|
||||
}
|
||||
entity_addr_t *addr = (entity_addr_t*)opt->conf_ptr(this);
|
||||
if (!addr->parse(opt->def_str)) {
|
||||
ostringstream oss;
|
||||
oss << "Default value for " << opt->name << " cannot be parsed."
|
||||
<< std::endl;
|
||||
assert(oss.str() == 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
assert("unreachable" == 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int md_config_t::
|
||||
set_val_impl(const char *val, const config_option *opt)
|
||||
{
|
||||
|
@ -142,9 +142,6 @@ private:
|
||||
int parse_config_files_impl(const std::list<std::string> &conf_files,
|
||||
std::deque<std::string> *parse_errors);
|
||||
|
||||
// Private function for setting a default for a config option
|
||||
void set_val_from_default(const config_option *opt);
|
||||
|
||||
int set_val_impl(const char *val, const config_option *opt);
|
||||
int set_val_raw(const char *val, const config_option *opt);
|
||||
|
||||
@ -155,430 +152,38 @@ private:
|
||||
// The configuration file we read, or NULL if we haven't read one.
|
||||
ConfFile cf;
|
||||
|
||||
obs_map_t observers;
|
||||
changed_set_t changed;
|
||||
|
||||
public:
|
||||
EntityName name;
|
||||
#define OPTION_OPT_INT(name) int name;
|
||||
#define OPTION_OPT_LONGLONG(name) long long name;
|
||||
#define OPTION_OPT_STR(name) std::string name;
|
||||
#define OPTION_OPT_DOUBLE(name) double name;
|
||||
#define OPTION_OPT_FLOAT(name) float name;
|
||||
#define OPTION_OPT_BOOL(name) bool name;
|
||||
#define OPTION_OPT_ADDR(name) entity_addr_t name;
|
||||
#define OPTION_OPT_U32(name) uint32_t name;
|
||||
#define OPTION_OPT_U64(name) uint64_t name;
|
||||
#define OPTION(name, ty, init) OPTION_##ty(name)
|
||||
#include "common/config_opts.h"
|
||||
#undef OPTION_OPT_INT
|
||||
#undef OPTION_OPT_LONGLONG
|
||||
#undef OPTION_OPT_STR
|
||||
#undef OPTION_OPT_DOUBLE
|
||||
#undef OPTION_OPT_FLOAT
|
||||
#undef OPTION_OPT_BOOL
|
||||
#undef OPTION_OPT_ADDR
|
||||
#undef OPTION_OPT_U32
|
||||
#undef OPTION_OPT_U64
|
||||
#undef OPTION
|
||||
|
||||
/** A lock that protects the md_config_t internals. It is
|
||||
* recursive, for simplicity.
|
||||
* It is best if this lock comes first in the lock hierarchy. We will
|
||||
* hold this lock when calling configuration observers. */
|
||||
mutable Mutex lock;
|
||||
|
||||
obs_map_t observers;
|
||||
changed_set_t changed;
|
||||
|
||||
public:
|
||||
std::string host;
|
||||
|
||||
int num_client;
|
||||
|
||||
std::string monmap;
|
||||
std::string mon_host;
|
||||
bool daemonize;
|
||||
|
||||
std::string admin_socket;
|
||||
|
||||
std::string log_file;
|
||||
std::string log_sym_dir;
|
||||
int log_sym_history;
|
||||
|
||||
int log_to_stderr;
|
||||
|
||||
bool log_to_syslog;
|
||||
bool log_per_instance;
|
||||
|
||||
bool clog_to_monitors;
|
||||
bool clog_to_syslog;
|
||||
|
||||
std::string pid_file;
|
||||
|
||||
std::string chdir;
|
||||
|
||||
long long max_open_files;
|
||||
|
||||
int debug;
|
||||
int debug_lockdep;
|
||||
int debug_context;
|
||||
int debug_mds;
|
||||
int debug_mds_balancer;
|
||||
int debug_mds_locker;
|
||||
int debug_mds_log;
|
||||
int debug_mds_log_expire;
|
||||
int debug_mds_migrator;
|
||||
int debug_buffer;
|
||||
int debug_timer;
|
||||
int debug_filer;
|
||||
int debug_objecter;
|
||||
int debug_rados;
|
||||
int debug_rbd;
|
||||
int debug_journaler;
|
||||
int debug_objectcacher;
|
||||
int debug_client;
|
||||
int debug_osd;
|
||||
int debug_filestore;
|
||||
int debug_journal;
|
||||
int debug_bdev;
|
||||
int debug_ms;
|
||||
int debug_mon;
|
||||
int debug_monc;
|
||||
int debug_paxos;
|
||||
int debug_tp;
|
||||
int debug_auth;
|
||||
int debug_finisher;
|
||||
int debug_heartbeatmap;
|
||||
|
||||
// auth
|
||||
std::string key;
|
||||
std::string keyfile;
|
||||
std::string keyring;
|
||||
|
||||
// heartbeat
|
||||
int heartbeat_interval; // seconds
|
||||
std::string heartbeat_file;
|
||||
|
||||
// messenger
|
||||
|
||||
/*bool tcp_skip_rank0;
|
||||
bool tcp_overlay_clients;
|
||||
bool tcp_log;
|
||||
bool tcp_serial_marshall;
|
||||
bool tcp_serial_out;
|
||||
bool tcp_multi_out;
|
||||
bool tcp_multi_dispatch;
|
||||
*/
|
||||
entity_addr_t public_addr;
|
||||
entity_addr_t cluster_addr;
|
||||
|
||||
bool ms_tcp_nodelay;
|
||||
double ms_initial_backoff;
|
||||
double ms_max_backoff;
|
||||
bool ms_nocrc;
|
||||
bool ms_die_on_bad_msg;
|
||||
uint64_t ms_dispatch_throttle_bytes;
|
||||
bool ms_bind_ipv6;
|
||||
uint64_t ms_rwthread_stack_bytes;
|
||||
uint64_t ms_tcp_read_timeout;
|
||||
uint64_t ms_inject_socket_failures;
|
||||
|
||||
// mon
|
||||
std::string mon_data;
|
||||
int mon_tick_interval;
|
||||
double mon_subscribe_interval;
|
||||
bool mon_osd_auto_mark_in;
|
||||
int mon_osd_down_out_interval;
|
||||
float mon_lease;
|
||||
float mon_lease_renew_interval;
|
||||
float mon_clock_drift_allowed;
|
||||
float mon_clock_drift_warn_backoff;
|
||||
float mon_lease_ack_timeout;
|
||||
float mon_accept_timeout;
|
||||
float mon_pg_create_interval;
|
||||
int mon_osd_full_ratio;
|
||||
int mon_osd_nearfull_ratio;
|
||||
int mon_globalid_prealloc;
|
||||
int mon_osd_report_timeout;
|
||||
|
||||
bool mon_force_standby_active;
|
||||
|
||||
double paxos_propose_interval;
|
||||
double paxos_min_wait;
|
||||
double paxos_observer_timeout;
|
||||
|
||||
double clock_offset;
|
||||
|
||||
// auth
|
||||
std::string auth_supported;
|
||||
double auth_mon_ticket_ttl;
|
||||
double auth_service_ticket_ttl;
|
||||
EntityName name;
|
||||
|
||||
double mon_client_hunt_interval;
|
||||
double mon_client_ping_interval;
|
||||
|
||||
// client
|
||||
int client_cache_size;
|
||||
float client_cache_mid;
|
||||
int client_cache_stat_ttl;
|
||||
int client_cache_readdir_ttl;
|
||||
bool client_use_random_mds; // debug flag
|
||||
double client_mount_timeout;
|
||||
double client_unmount_timeout;
|
||||
double client_tick_interval;
|
||||
std::string client_trace;
|
||||
long long client_readahead_min;
|
||||
long long client_readahead_max_bytes;
|
||||
long long client_readahead_max_periods;
|
||||
std::string client_snapdir;
|
||||
std::string client_mountpoint;
|
||||
|
||||
// objectcacher
|
||||
bool client_oc;
|
||||
int client_oc_size;
|
||||
int client_oc_max_dirty;
|
||||
int client_oc_target_dirty;
|
||||
uint64_t client_oc_max_sync_write;
|
||||
|
||||
int client_notify_timeout;
|
||||
|
||||
// fuse
|
||||
bool fuse_use_invalidate_cb;
|
||||
|
||||
// objecter
|
||||
double objecter_mon_retry_interval;
|
||||
double objecter_tick_interval;
|
||||
double objecter_timeout;
|
||||
uint64_t objecter_inflight_op_bytes;
|
||||
|
||||
// journaler
|
||||
bool journaler_allow_split_entries;
|
||||
int journaler_write_head_interval;
|
||||
int journaler_prefetch_periods;
|
||||
int journaler_prezero_periods;
|
||||
double journaler_batch_interval;
|
||||
uint64_t journaler_batch_max;
|
||||
|
||||
// mds
|
||||
uint64_t mds_max_file_size;
|
||||
int mds_cache_size;
|
||||
float mds_cache_mid;
|
||||
int mds_mem_max;
|
||||
float mds_dir_commit_ratio;
|
||||
int mds_dir_max_commit_size;
|
||||
|
||||
float mds_decay_halflife;
|
||||
|
||||
float mds_beacon_interval;
|
||||
float mds_beacon_grace;
|
||||
float mds_blacklist_interval;
|
||||
|
||||
float mds_session_timeout;
|
||||
float mds_session_autoclose;
|
||||
float mds_reconnect_timeout;
|
||||
|
||||
float mds_tick_interval;
|
||||
float mds_dirstat_min_interval;
|
||||
float mds_scatter_nudge_interval;
|
||||
|
||||
int mds_client_prealloc_inos;
|
||||
bool mds_early_reply;
|
||||
|
||||
bool mds_use_tmap;
|
||||
|
||||
int mds_default_dir_hash;
|
||||
|
||||
bool mds_log;
|
||||
bool mds_log_skip_corrupt_events;
|
||||
int mds_log_max_events;
|
||||
int mds_log_max_segments;
|
||||
int mds_log_max_expiring;
|
||||
int mds_log_eopen_size;
|
||||
|
||||
float mds_bal_sample_interval;
|
||||
float mds_bal_replicate_threshold;
|
||||
float mds_bal_unreplicate_threshold;
|
||||
bool mds_bal_frag;
|
||||
int mds_bal_split_size;
|
||||
float mds_bal_split_rd;
|
||||
float mds_bal_split_wr;
|
||||
int mds_bal_split_bits;
|
||||
int mds_bal_merge_size;
|
||||
float mds_bal_merge_rd;
|
||||
float mds_bal_merge_wr;
|
||||
int mds_bal_interval;
|
||||
int mds_bal_fragment_interval;
|
||||
float mds_bal_idle_threshold;
|
||||
int mds_bal_max;
|
||||
int mds_bal_max_until;
|
||||
|
||||
int mds_bal_mode;
|
||||
float mds_bal_min_rebalance;
|
||||
float mds_bal_min_start;
|
||||
float mds_bal_need_min;
|
||||
float mds_bal_need_max;
|
||||
float mds_bal_midchunk;
|
||||
float mds_bal_minchunk;
|
||||
|
||||
int mds_bal_target_removal_min;
|
||||
int mds_bal_target_removal_max;
|
||||
|
||||
float mds_replay_interval;
|
||||
|
||||
int mds_shutdown_check;
|
||||
|
||||
int mds_thrash_exports;
|
||||
int mds_thrash_fragments;
|
||||
bool mds_dump_cache_on_map;
|
||||
bool mds_dump_cache_after_rejoin;
|
||||
|
||||
// set these to non-zero to specify kill points
|
||||
bool mds_verify_scatter;
|
||||
bool mds_debug_scatterstat;
|
||||
bool mds_debug_frag;
|
||||
bool mds_debug_auth_pins;
|
||||
bool mds_debug_subtrees;
|
||||
int mds_kill_mdstable_at;
|
||||
int mds_kill_export_at;
|
||||
int mds_kill_import_at;
|
||||
int mds_kill_link_at;
|
||||
int mds_kill_rename_at;
|
||||
|
||||
bool mds_wipe_sessions;
|
||||
bool mds_wipe_ino_prealloc;
|
||||
int mds_skip_ino;
|
||||
int max_mds;
|
||||
|
||||
int mds_standby_for_rank;
|
||||
std::string mds_standby_for_name;
|
||||
bool mds_standby_replay;
|
||||
|
||||
// osd
|
||||
std::string osd_data;
|
||||
std::string osd_journal;
|
||||
int osd_journal_size; // in mb
|
||||
int osd_max_write_size; // in MB
|
||||
bool osd_balance_reads;
|
||||
|
||||
int osd_shed_reads;
|
||||
double osd_shed_reads_min_latency;
|
||||
double osd_shed_reads_min_latency_diff;
|
||||
double osd_shed_reads_min_latency_ratio;
|
||||
|
||||
uint64_t osd_client_message_size_cap;
|
||||
|
||||
double osd_stat_refresh_interval;
|
||||
|
||||
int osd_pg_bits;
|
||||
int osd_pgp_bits;
|
||||
int osd_lpg_bits;
|
||||
int osd_pg_layout;
|
||||
int osd_min_rep;
|
||||
int osd_max_rep;
|
||||
int osd_min_raid_width;
|
||||
int osd_max_raid_width;
|
||||
|
||||
int osd_pool_default_crush_rule;
|
||||
int osd_pool_default_size;
|
||||
int osd_pool_default_pg_num;
|
||||
int osd_pool_default_pgp_num;
|
||||
|
||||
int osd_op_threads;
|
||||
int osd_max_opq;
|
||||
int osd_disk_threads;
|
||||
int osd_recovery_threads;
|
||||
|
||||
int osd_op_thread_timeout;
|
||||
int osd_backlog_thread_timeout;
|
||||
int osd_recovery_thread_timeout;
|
||||
int osd_snap_trim_thread_timeout;
|
||||
int osd_scrub_thread_timeout;
|
||||
int osd_scrub_finalize_thread_timeout;
|
||||
int osd_remove_thread_timeout;
|
||||
|
||||
float osd_age;
|
||||
int osd_age_time;
|
||||
int osd_heartbeat_interval;
|
||||
int osd_mon_heartbeat_interval;
|
||||
int osd_heartbeat_grace;
|
||||
int osd_mon_report_interval_max;
|
||||
int osd_mon_report_interval_min;
|
||||
int osd_min_down_reporters;
|
||||
int osd_min_down_reports;
|
||||
int osd_replay_window;
|
||||
bool osd_preserve_trimmed_log;
|
||||
bool osd_auto_mark_unfound_lost;
|
||||
|
||||
float osd_recovery_delay_start;
|
||||
int osd_recovery_max_active;
|
||||
uint64_t osd_recovery_max_chunk;
|
||||
|
||||
bool osd_recovery_forget_lost_objects;
|
||||
|
||||
bool osd_auto_weight;
|
||||
|
||||
double osd_class_error_timeout;
|
||||
double osd_class_timeout;
|
||||
std::string osd_class_dir;
|
||||
|
||||
int osd_max_scrubs;
|
||||
float osd_scrub_load_threshold;
|
||||
float osd_scrub_min_interval;
|
||||
float osd_scrub_max_interval;
|
||||
|
||||
bool osd_check_for_log_corruption; // bleh
|
||||
|
||||
bool osd_use_stale_snap;
|
||||
std::string osd_rollback_to_cluster_snap;
|
||||
|
||||
uint32_t osd_max_notify_timeout;
|
||||
|
||||
// filestore
|
||||
bool filestore;
|
||||
double filestore_max_sync_interval;
|
||||
double filestore_min_sync_interval;
|
||||
bool filestore_fake_attrs;
|
||||
bool filestore_fake_collections;
|
||||
std::string filestore_dev;
|
||||
bool filestore_btrfs_trans;
|
||||
bool filestore_btrfs_snap;
|
||||
bool filestore_btrfs_clone_range;
|
||||
bool filestore_fsync_flushes_journal_data;
|
||||
bool filestore_fiemap;
|
||||
bool filestore_flusher;
|
||||
int filestore_flusher_max_fds;
|
||||
bool filestore_sync_flush;
|
||||
bool filestore_journal_parallel;
|
||||
bool filestore_journal_writeahead;
|
||||
bool filestore_journal_trailing;
|
||||
int filestore_queue_max_ops;
|
||||
int filestore_queue_max_bytes;
|
||||
int filestore_queue_committing_max_ops;
|
||||
int filestore_queue_committing_max_bytes;
|
||||
int filestore_op_threads;
|
||||
int filestore_op_thread_timeout;
|
||||
int filestore_op_thread_suicide_timeout;
|
||||
float filestore_commit_timeout;
|
||||
int filestore_fiemap_threshold;
|
||||
int filestore_merge_threshold;
|
||||
int filestore_split_multiple;
|
||||
bool filestore_update_collections;
|
||||
|
||||
// journal
|
||||
bool journal_dio;
|
||||
bool journal_block_align;
|
||||
int journal_max_write_bytes;
|
||||
int journal_max_write_entries;
|
||||
int journal_queue_max_ops;
|
||||
int journal_queue_max_bytes;
|
||||
int journal_align_min_size;
|
||||
|
||||
// block device
|
||||
bool bdev_lock;
|
||||
int bdev_iothreads;
|
||||
int bdev_idle_kick_after_ms;
|
||||
int bdev_el_fw_max_ms;
|
||||
int bdev_el_bw_max_ms;
|
||||
bool bdev_el_bidir;
|
||||
int bdev_iov_max;
|
||||
bool bdev_debug_check_io_overlap;
|
||||
int bdev_fake_mb;
|
||||
int bdev_fake_max_mb;
|
||||
|
||||
// rgw
|
||||
int rgw_log;
|
||||
bool rgw_cache_enabled;
|
||||
int rgw_cache_lru_size;
|
||||
string rgw_socket_path;
|
||||
int rgw_op_thread_timeout;
|
||||
int rgw_op_thread_suicide_timeout;
|
||||
int rgw_thread_pool_size;
|
||||
double rgw_maintenance_tick_interval;
|
||||
int rgw_pools_preallocate_max;
|
||||
int rgw_pools_preallocate_threshold;
|
||||
bool rgw_log_nonexistent_bucket;
|
||||
|
||||
// rbd
|
||||
int rbd_writeback_window;
|
||||
|
||||
// This will be set to true when it is safe to start threads.
|
||||
// Once it is true, it will never change.
|
||||
bool internal_safe_to_start_threads;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@ -594,10 +199,6 @@ struct config_option {
|
||||
opt_type_t type;
|
||||
size_t md_conf_off;
|
||||
|
||||
const char *def_str;
|
||||
long long def_longlong;
|
||||
double def_double;
|
||||
|
||||
// Given a configuration, return a pointer to this option inside
|
||||
// that configuration.
|
||||
void *conf_ptr(md_config_t *conf) const;
|
||||
|
336
src/common/config_opts.h
Normal file
336
src/common/config_opts.h
Normal file
@ -0,0 +1,336 @@
|
||||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
||||
// vim: ts=8 sw=2 smarttab
|
||||
/*
|
||||
* Ceph - scalable distributed file system
|
||||
*
|
||||
* Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software
|
||||
* Foundation. See file COPYING.
|
||||
*
|
||||
*/
|
||||
|
||||
/* note: no header guard */
|
||||
OPTION(host, OPT_STR, "localhost")
|
||||
OPTION(public_addr, OPT_ADDR, entity_addr_t())
|
||||
OPTION(cluster_addr, OPT_ADDR, entity_addr_t())
|
||||
OPTION(num_client, OPT_INT, 1)
|
||||
OPTION(monmap, OPT_STR, "")
|
||||
OPTION(mon_host, OPT_STR, "")
|
||||
OPTION(daemonize, OPT_BOOL, false)
|
||||
OPTION(admin_socket, OPT_STR, "")
|
||||
OPTION(log_file, OPT_STR, "")
|
||||
OPTION(log_sym_dir, OPT_STR, "")
|
||||
OPTION(log_sym_history, OPT_INT, 10)
|
||||
OPTION(log_to_stderr, OPT_INT, LOG_TO_STDERR_ALL)
|
||||
OPTION(log_to_syslog, OPT_BOOL, false)
|
||||
OPTION(log_per_instance, OPT_BOOL, false)
|
||||
OPTION(clog_to_monitors, OPT_BOOL, true)
|
||||
OPTION(clog_to_syslog, OPT_BOOL, false)
|
||||
OPTION(pid_file, OPT_STR, "")
|
||||
OPTION(chdir, OPT_STR, "/")
|
||||
OPTION(max_open_files, OPT_LONGLONG, 0)
|
||||
OPTION(debug, OPT_INT, 0)
|
||||
OPTION(debug_lockdep, OPT_INT, 0)
|
||||
OPTION(debug_context, OPT_INT, 0)
|
||||
OPTION(debug_mds, OPT_INT, 1)
|
||||
OPTION(debug_mds_balancer, OPT_INT, 1)
|
||||
OPTION(debug_mds_locker, OPT_INT, 1)
|
||||
OPTION(debug_mds_log, OPT_INT, 1)
|
||||
OPTION(debug_mds_log_expire, OPT_INT, 1)
|
||||
OPTION(debug_mds_migrator, OPT_INT, 1)
|
||||
OPTION(debug_buffer, OPT_INT, 0)
|
||||
OPTION(debug_timer, OPT_INT, 0)
|
||||
OPTION(debug_filer, OPT_INT, 0)
|
||||
OPTION(debug_objecter, OPT_INT, 0)
|
||||
OPTION(debug_rados, OPT_INT, 0)
|
||||
OPTION(debug_rbd, OPT_INT, 0)
|
||||
OPTION(debug_journaler, OPT_INT, 0)
|
||||
OPTION(debug_objectcacher, OPT_INT, 0)
|
||||
OPTION(debug_client, OPT_INT, 0)
|
||||
OPTION(debug_osd, OPT_INT, 0)
|
||||
OPTION(debug_filestore, OPT_INT, 1)
|
||||
OPTION(debug_journal, OPT_INT, 1)
|
||||
OPTION(debug_bdev, OPT_INT, 1) // block device
|
||||
OPTION(debug_ms, OPT_INT, 0)
|
||||
OPTION(debug_mon, OPT_INT, 1)
|
||||
OPTION(debug_monc, OPT_INT, 0)
|
||||
OPTION(debug_paxos, OPT_INT, 0)
|
||||
OPTION(debug_tp, OPT_INT, 0)
|
||||
OPTION(debug_auth, OPT_INT, 1)
|
||||
OPTION(debug_finisher, OPT_INT, 1)
|
||||
OPTION(debug_heartbeatmap, OPT_INT, 1)
|
||||
OPTION(key, OPT_STR, "")
|
||||
OPTION(keyfile, OPT_STR, "")
|
||||
OPTION(keyring, OPT_STR, "/etc/ceph/keyring,/etc/ceph/keyring.bin")
|
||||
OPTION(heartbeat_interval, OPT_INT, 5)
|
||||
OPTION(heartbeat_file, OPT_STR, "")
|
||||
OPTION(ms_tcp_nodelay, OPT_BOOL, true)
|
||||
OPTION(ms_initial_backoff, OPT_DOUBLE, .2)
|
||||
OPTION(ms_max_backoff, OPT_DOUBLE, 15.0)
|
||||
OPTION(ms_nocrc, OPT_BOOL, false)
|
||||
OPTION(ms_die_on_bad_msg, OPT_BOOL, false)
|
||||
OPTION(ms_dispatch_throttle_bytes, OPT_U64, 100 << 20)
|
||||
OPTION(ms_bind_ipv6, OPT_BOOL, false)
|
||||
OPTION(ms_rwthread_stack_bytes, OPT_U64, 1024 << 10)
|
||||
OPTION(ms_tcp_read_timeout, OPT_U64, 900)
|
||||
OPTION(ms_inject_socket_failures, OPT_U64, 0)
|
||||
OPTION(mon_data, OPT_STR, "")
|
||||
OPTION(mon_tick_interval, OPT_INT, 5)
|
||||
OPTION(mon_subscribe_interval, OPT_DOUBLE, 300)
|
||||
OPTION(mon_osd_auto_mark_in, OPT_BOOL, true) // automatically mark new osds 'in'
|
||||
OPTION(mon_osd_down_out_interval, OPT_INT, 300) // seconds
|
||||
OPTION(mon_lease, OPT_FLOAT, 5) // lease interval
|
||||
OPTION(mon_lease_renew_interval, OPT_FLOAT, 3) // on leader, to renew the lease
|
||||
OPTION(mon_lease_ack_timeout, OPT_FLOAT, 10.0) // on leader, if lease isn't acked by all peons
|
||||
OPTION(mon_clock_drift_allowed, OPT_FLOAT, .010) // allowed clock drift between monitors
|
||||
OPTION(mon_clock_drift_warn_backoff, OPT_FLOAT, 5) // exponential backoff for clock drift warnings
|
||||
OPTION(mon_accept_timeout, OPT_FLOAT, 10.0) // on leader, if paxos update isn't accepted
|
||||
OPTION(mon_pg_create_interval, OPT_FLOAT, 30.0) // no more than every 30s
|
||||
OPTION(mon_osd_full_ratio, OPT_INT, 95) // what % full makes an OSD "full"
|
||||
OPTION(mon_osd_nearfull_ratio, OPT_INT, 85) // what % full makes an OSD near full
|
||||
OPTION(mon_globalid_prealloc, OPT_INT, 100) // how many globalids to prealloc
|
||||
OPTION(mon_osd_report_timeout, OPT_INT, 900) // grace period before declaring unresponsive OSDs dead
|
||||
OPTION(mon_force_standby_active, OPT_BOOL, true) // should mons force standby-replay mds to be active
|
||||
OPTION(paxos_propose_interval, OPT_DOUBLE, 1.0) // gather updates for this long before proposing a map update
|
||||
OPTION(paxos_min_wait, OPT_DOUBLE, 0.05) // min time to gather updates for after period of inactivity
|
||||
OPTION(paxos_observer_timeout, OPT_DOUBLE, 5*60) // gather updates for this long before proposing a map update
|
||||
OPTION(clock_offset, OPT_DOUBLE, 0) // how much to offset the system clock in Clock.cc
|
||||
OPTION(auth_supported, OPT_STR, "none")
|
||||
OPTION(auth_mon_ticket_ttl, OPT_DOUBLE, 60*60*12)
|
||||
OPTION(auth_service_ticket_ttl, OPT_DOUBLE, 60*60)
|
||||
OPTION(mon_client_hunt_interval, OPT_DOUBLE, 3.0) // try new mon every N seconds until we connect
|
||||
OPTION(mon_client_ping_interval, OPT_DOUBLE, 10.0) // ping every N seconds
|
||||
OPTION(client_cache_size, OPT_INT, 16384)
|
||||
OPTION(client_cache_mid, OPT_FLOAT, .75)
|
||||
OPTION(client_cache_stat_ttl, OPT_INT, 0) // seconds until cached stat results become invalid
|
||||
OPTION(client_cache_readdir_ttl, OPT_INT, 1) // 1 second only
|
||||
OPTION(client_use_random_mds, OPT_BOOL, false)
|
||||
OPTION(client_mount_timeout, OPT_DOUBLE, 30.0)
|
||||
OPTION(client_unmount_timeout, OPT_DOUBLE, 10.0)
|
||||
OPTION(client_tick_interval, OPT_DOUBLE, 1.0)
|
||||
OPTION(client_trace, OPT_STR, "")
|
||||
OPTION(client_readahead_min, OPT_LONGLONG, 128*1024) // readahead at _least_ this much.
|
||||
OPTION(client_readahead_max_bytes, OPT_LONGLONG, 0) //8 * 1024*1024
|
||||
OPTION(client_readahead_max_periods, OPT_LONGLONG, 4) // as multiple of file layout period (object size * num stripes)
|
||||
OPTION(client_snapdir, OPT_STR, ".snap")
|
||||
OPTION(client_mountpoint, OPT_STR, "/")
|
||||
OPTION(client_notify_timeout, OPT_INT, 10) // in seconds
|
||||
OPTION(client_oc, OPT_BOOL, true)
|
||||
OPTION(client_oc_size, OPT_INT, 1024*1024* 200) // MB * n
|
||||
OPTION(client_oc_max_dirty, OPT_INT, 1024*1024* 100) // MB * n (dirty OR tx.. bigish)
|
||||
OPTION(client_oc_target_dirty, OPT_INT, 1024*1024* 8) // target dirty (keep this smallish)
|
||||
// note: the max amount of "in flight" dirty data is roughly (max - target)
|
||||
OPTION(client_oc_max_sync_write, OPT_U64, 128*1024) // sync writes >= this use wrlock
|
||||
OPTION(fuse_use_invalidate_cb, OPT_BOOL, false) // use fuse 2.8+ invalidate callback to keep page cache consistent
|
||||
OPTION(objecter_tick_interval, OPT_DOUBLE, 5.0)
|
||||
OPTION(objecter_mon_retry_interval, OPT_DOUBLE, 5.0)
|
||||
OPTION(objecter_timeout, OPT_DOUBLE, 10.0) // before we ask for a map
|
||||
OPTION(objecter_inflight_op_bytes, OPT_U64, 1024*1024*100) //max in-flight data (both directions)
|
||||
OPTION(journaler_allow_split_entries, OPT_BOOL, true)
|
||||
OPTION(journaler_write_head_interval, OPT_INT, 15)
|
||||
OPTION(journaler_prefetch_periods, OPT_INT, 10) // * journal object size
|
||||
OPTION(journaler_prezero_periods, OPT_INT, 5) // * journal object size
|
||||
OPTION(journaler_batch_interval, OPT_DOUBLE, .001) // seconds.. max add'l latency we artificially incur
|
||||
OPTION(journaler_batch_max, OPT_U64, 0) // max bytes we'll delay flushing; disable, for now....
|
||||
OPTION(mds_max_file_size, OPT_U64, 1ULL << 40)
|
||||
OPTION(mds_cache_size, OPT_INT, 100000)
|
||||
OPTION(mds_cache_mid, OPT_FLOAT, .7)
|
||||
OPTION(mds_mem_max, OPT_INT, 1048576) // KB
|
||||
OPTION(mds_dir_commit_ratio, OPT_FLOAT, .5)
|
||||
OPTION(mds_dir_max_commit_size, OPT_INT, 90) // MB
|
||||
OPTION(mds_decay_halflife, OPT_FLOAT, 5)
|
||||
OPTION(mds_beacon_interval, OPT_FLOAT, 4)
|
||||
OPTION(mds_beacon_grace, OPT_FLOAT, 15)
|
||||
OPTION(mds_blacklist_interval, OPT_FLOAT, 24.0*60.0) // how long to blacklist failed nodes
|
||||
OPTION(mds_session_timeout, OPT_FLOAT, 60) // cap bits and leases time out if client idle
|
||||
OPTION(mds_session_autoclose, OPT_FLOAT, 300) // autoclose idle session
|
||||
OPTION(mds_reconnect_timeout, OPT_FLOAT, 45) // seconds to wait for clients during mds restart
|
||||
// make it (mds_session_timeout - mds_beacon_grace)
|
||||
OPTION(mds_tick_interval, OPT_FLOAT, 5)
|
||||
OPTION(mds_dirstat_min_interval, OPT_FLOAT, 1) // try to avoid propagating more often than this
|
||||
OPTION(mds_scatter_nudge_interval, OPT_FLOAT, 5) // how quickly dirstat changes propagate up the hierarchy
|
||||
OPTION(mds_client_prealloc_inos, OPT_INT, 1000)
|
||||
OPTION(mds_early_reply, OPT_BOOL, true)
|
||||
OPTION(mds_use_tmap, OPT_BOOL, true) // use trivialmap for dir updates
|
||||
OPTION(mds_default_dir_hash, OPT_INT, CEPH_STR_HASH_RJENKINS)
|
||||
OPTION(mds_log, OPT_BOOL, true)
|
||||
OPTION(mds_log_skip_corrupt_events, OPT_BOOL, false)
|
||||
OPTION(mds_log_max_events, OPT_INT, -1)
|
||||
OPTION(mds_log_max_segments, OPT_INT, 30) // segment size defined by FileLayout, above
|
||||
OPTION(mds_log_max_expiring, OPT_INT, 20)
|
||||
OPTION(mds_log_eopen_size, OPT_INT, 100) // # open inodes per log entry
|
||||
OPTION(mds_bal_sample_interval, OPT_FLOAT, 3.0) // every 5 seconds
|
||||
OPTION(mds_bal_replicate_threshold, OPT_FLOAT, 8000)
|
||||
OPTION(mds_bal_unreplicate_threshold, OPT_FLOAT, 0)
|
||||
OPTION(mds_bal_frag, OPT_BOOL, false)
|
||||
OPTION(mds_bal_split_size, OPT_INT, 10000)
|
||||
OPTION(mds_bal_split_rd, OPT_FLOAT, 25000)
|
||||
OPTION(mds_bal_split_wr, OPT_FLOAT, 10000)
|
||||
OPTION(mds_bal_split_bits, OPT_INT, 3)
|
||||
OPTION(mds_bal_merge_size, OPT_INT, 50)
|
||||
OPTION(mds_bal_merge_rd, OPT_FLOAT, 1000)
|
||||
OPTION(mds_bal_merge_wr, OPT_FLOAT, 1000)
|
||||
OPTION(mds_bal_interval, OPT_INT, 10) // seconds
|
||||
OPTION(mds_bal_fragment_interval, OPT_INT, 5) // seconds
|
||||
OPTION(mds_bal_idle_threshold, OPT_FLOAT, 0)
|
||||
OPTION(mds_bal_max, OPT_INT, -1)
|
||||
OPTION(mds_bal_max_until, OPT_INT, -1)
|
||||
OPTION(mds_bal_mode, OPT_INT, 0)
|
||||
OPTION(mds_bal_min_rebalance, OPT_FLOAT, .1) // must be this much above average before we export anything
|
||||
OPTION(mds_bal_min_start, OPT_FLOAT, .2) // if we need less than this, we don't do anything
|
||||
OPTION(mds_bal_need_min, OPT_FLOAT, .8) // take within this range of what we need
|
||||
OPTION(mds_bal_need_max, OPT_FLOAT, 1.2)
|
||||
OPTION(mds_bal_midchunk, OPT_FLOAT, .3) // any sub bigger than this taken in full
|
||||
OPTION(mds_bal_minchunk, OPT_FLOAT, .001) // never take anything smaller than this
|
||||
OPTION(mds_bal_target_removal_min, OPT_INT, 5) // min balance iterations before old target is removed
|
||||
OPTION(mds_bal_target_removal_max, OPT_INT, 10) // max balance iterations before old target is removed
|
||||
OPTION(mds_replay_interval, OPT_FLOAT, 1.0) // time to wait before starting replay again
|
||||
OPTION(mds_shutdown_check, OPT_INT, 0)
|
||||
OPTION(mds_thrash_exports, OPT_INT, 0)
|
||||
OPTION(mds_thrash_fragments, OPT_INT, 0)
|
||||
OPTION(mds_dump_cache_on_map, OPT_BOOL, false)
|
||||
OPTION(mds_dump_cache_after_rejoin, OPT_BOOL, false)
|
||||
OPTION(mds_verify_scatter, OPT_BOOL, false)
|
||||
OPTION(mds_debug_scatterstat, OPT_BOOL, false)
|
||||
OPTION(mds_debug_frag, OPT_BOOL, false)
|
||||
OPTION(mds_debug_auth_pins, OPT_BOOL, false)
|
||||
OPTION(mds_debug_subtrees, OPT_BOOL, false)
|
||||
OPTION(mds_kill_mdstable_at, OPT_INT, 0)
|
||||
OPTION(mds_kill_export_at, OPT_INT, 0)
|
||||
OPTION(mds_kill_import_at, OPT_INT, 0)
|
||||
OPTION(mds_kill_link_at, OPT_INT, 0)
|
||||
OPTION(mds_kill_rename_at, OPT_INT, 0)
|
||||
OPTION(mds_wipe_sessions, OPT_BOOL, 0)
|
||||
OPTION(mds_wipe_ino_prealloc, OPT_BOOL, 0)
|
||||
OPTION(mds_skip_ino, OPT_INT, 0)
|
||||
OPTION(max_mds, OPT_INT, 1)
|
||||
OPTION(mds_standby_for_name, OPT_STR, "")
|
||||
OPTION(mds_standby_for_rank, OPT_INT, -1)
|
||||
OPTION(mds_standby_replay, OPT_BOOL, false)
|
||||
OPTION(osd_data, OPT_STR, "")
|
||||
OPTION(osd_journal, OPT_STR, "")
|
||||
OPTION(osd_journal_size, OPT_INT, 0) // in mb
|
||||
OPTION(osd_max_write_size, OPT_INT, 90)
|
||||
OPTION(osd_balance_reads, OPT_BOOL, false)
|
||||
OPTION(osd_shed_reads, OPT_INT, false) // forward from primary to replica
|
||||
OPTION(osd_shed_reads_min_latency, OPT_DOUBLE, .01) // min local latency
|
||||
OPTION(osd_shed_reads_min_latency_diff, OPT_DOUBLE, .01) // min latency difference
|
||||
OPTION(osd_shed_reads_min_latency_ratio, OPT_DOUBLE, 1.5) // 1.2 == 20% higher than peer
|
||||
OPTION(osd_client_message_size_cap, OPT_U64, 500*1024L*1024L) // default to 200MB client data allowed in-memory
|
||||
OPTION(osd_stat_refresh_interval, OPT_DOUBLE, .5)
|
||||
OPTION(osd_pg_bits, OPT_INT, 6) // bits per osd
|
||||
OPTION(osd_pgp_bits, OPT_INT, 6) // bits per osd
|
||||
OPTION(osd_lpg_bits, OPT_INT, 2) // bits per osd
|
||||
OPTION(osd_pg_layout, OPT_INT, CEPH_PG_LAYOUT_CRUSH)
|
||||
OPTION(osd_min_rep, OPT_INT, 1)
|
||||
OPTION(osd_max_rep, OPT_INT, 10)
|
||||
OPTION(osd_min_raid_width, OPT_INT, 3)
|
||||
OPTION(osd_max_raid_width, OPT_INT, 2)
|
||||
OPTION(osd_pool_default_crush_rule, OPT_INT, 0)
|
||||
OPTION(osd_pool_default_size, OPT_INT, 2)
|
||||
OPTION(osd_pool_default_pg_num, OPT_INT, 8)
|
||||
OPTION(osd_pool_default_pgp_num, OPT_INT, 8)
|
||||
OPTION(osd_op_threads, OPT_INT, 2) // 0 == no threading
|
||||
OPTION(osd_max_opq, OPT_INT, 10)
|
||||
OPTION(osd_disk_threads, OPT_INT, 1)
|
||||
OPTION(osd_recovery_threads, OPT_INT, 1)
|
||||
OPTION(osd_op_thread_timeout, OPT_INT, 30)
|
||||
OPTION(osd_backlog_thread_timeout, OPT_INT, 60*60*1)
|
||||
OPTION(osd_recovery_thread_timeout, OPT_INT, 30)
|
||||
OPTION(osd_snap_trim_thread_timeout, OPT_INT, 60*60*1)
|
||||
OPTION(osd_scrub_thread_timeout, OPT_INT, 60)
|
||||
OPTION(osd_scrub_finalize_thread_timeout, OPT_INT, 60*10)
|
||||
OPTION(osd_remove_thread_timeout, OPT_INT, 60*60)
|
||||
OPTION(osd_age, OPT_FLOAT, .8)
|
||||
OPTION(osd_age_time, OPT_INT, 0)
|
||||
OPTION(osd_heartbeat_interval, OPT_INT, 1)
|
||||
OPTION(osd_mon_heartbeat_interval, OPT_INT, 30) // if no peers, ping monitor
|
||||
OPTION(osd_heartbeat_grace, OPT_INT, 20)
|
||||
OPTION(osd_mon_report_interval_max, OPT_INT, 120)
|
||||
OPTION(osd_mon_report_interval_min, OPT_INT, 5) // pg stats, failures, up_thru, boot.
|
||||
OPTION(osd_min_down_reporters, OPT_INT, 1) // number of OSDs who need to report a down OSD for it to count
|
||||
OPTION(osd_min_down_reports, OPT_INT, 3) // number of times a down OSD must be reported for it to count
|
||||
OPTION(osd_replay_window, OPT_INT, 45)
|
||||
OPTION(osd_preserve_trimmed_log, OPT_BOOL, true)
|
||||
OPTION(osd_auto_mark_unfound_lost, OPT_BOOL, false)
|
||||
OPTION(osd_recovery_delay_start, OPT_FLOAT, 15)
|
||||
OPTION(osd_recovery_max_active, OPT_INT, 5)
|
||||
OPTION(osd_recovery_max_chunk, OPT_U64, 1<<20) // max size of push chunk
|
||||
OPTION(osd_recovery_forget_lost_objects, OPT_BOOL, false) // off for now
|
||||
OPTION(osd_max_scrubs, OPT_INT, 1)
|
||||
OPTION(osd_scrub_load_threshold, OPT_FLOAT, 0.5)
|
||||
OPTION(osd_scrub_min_interval, OPT_FLOAT, 300)
|
||||
OPTION(osd_scrub_max_interval, OPT_FLOAT, 60*60*24) // once a day
|
||||
OPTION(osd_auto_weight, OPT_BOOL, false)
|
||||
OPTION(osd_class_error_timeout, OPT_DOUBLE, 60.0) // seconds
|
||||
OPTION(osd_class_timeout, OPT_DOUBLE, 60*60.0) // seconds
|
||||
OPTION(osd_class_dir, OPT_STR, "/usr/lib/rados-classes")
|
||||
OPTION(osd_check_for_log_corruption, OPT_BOOL, false)
|
||||
OPTION(osd_use_stale_snap, OPT_BOOL, false)
|
||||
OPTION(osd_rollback_to_cluster_snap, OPT_STR, "")
|
||||
OPTION(osd_max_notify_timeout, OPT_U32, 30) // max notify timeout in seconds
|
||||
OPTION(filestore, OPT_BOOL, false)
|
||||
OPTION(filestore_max_sync_interval, OPT_DOUBLE, 5) // seconds
|
||||
OPTION(filestore_min_sync_interval, OPT_DOUBLE, .01) // seconds
|
||||
OPTION(filestore_fake_attrs, OPT_BOOL, false)
|
||||
OPTION(filestore_fake_collections, OPT_BOOL, false)
|
||||
OPTION(filestore_dev, OPT_STR, "")
|
||||
OPTION(filestore_btrfs_trans, OPT_BOOL, false)
|
||||
OPTION(filestore_btrfs_snap, OPT_BOOL, true)
|
||||
OPTION(filestore_btrfs_clone_range, OPT_BOOL, true)
|
||||
OPTION(filestore_fsync_flushes_journal_data, OPT_BOOL, false)
|
||||
OPTION(filestore_fiemap, OPT_BOOL, true) // (try to) use fiemap
|
||||
OPTION(filestore_flusher, OPT_BOOL, true)
|
||||
OPTION(filestore_flusher_max_fds, OPT_INT, 512)
|
||||
OPTION(filestore_sync_flush, OPT_BOOL, false)
|
||||
OPTION(filestore_journal_parallel, OPT_BOOL, false)
|
||||
OPTION(filestore_journal_writeahead, OPT_BOOL, false)
|
||||
OPTION(filestore_journal_trailing, OPT_BOOL, false)
|
||||
OPTION(filestore_queue_max_ops, OPT_INT, 500)
|
||||
OPTION(filestore_queue_max_bytes, OPT_INT, 100 << 20)
|
||||
OPTION(filestore_queue_committing_max_ops, OPT_INT, 500) // this is ON TOP of filestore_queue_max_*
|
||||
OPTION(filestore_queue_committing_max_bytes, OPT_INT, 100 << 20) // "
|
||||
OPTION(filestore_op_threads, OPT_INT, 2)
|
||||
OPTION(filestore_op_thread_timeout, OPT_INT, 60)
|
||||
OPTION(filestore_op_thread_suicide_timeout, OPT_INT, 180)
|
||||
OPTION(filestore_commit_timeout, OPT_FLOAT, 600)
|
||||
OPTION(filestore_fiemap_threshold, OPT_INT, 4096)
|
||||
OPTION(filestore_merge_threshold, OPT_INT, 10)
|
||||
OPTION(filestore_split_multiple, OPT_INT, 2)
|
||||
OPTION(filestore_update_collections, OPT_BOOL, false)
|
||||
OPTION(journal_dio, OPT_BOOL, true)
|
||||
OPTION(journal_block_align, OPT_BOOL, true)
|
||||
OPTION(journal_max_write_bytes, OPT_INT, 10 << 20)
|
||||
OPTION(journal_max_write_entries, OPT_INT, 100)
|
||||
OPTION(journal_queue_max_ops, OPT_INT, 500)
|
||||
OPTION(journal_queue_max_bytes, OPT_INT, 100 << 20)
|
||||
OPTION(journal_align_min_size, OPT_INT, 64 << 10) // align data payloads >= this.
|
||||
OPTION(bdev_lock, OPT_BOOL, true)
|
||||
OPTION(bdev_iothreads, OPT_INT, 1) // number of ios to queue with kernel
|
||||
OPTION(bdev_idle_kick_after_ms, OPT_INT, 100) // ms
|
||||
OPTION(bdev_el_fw_max_ms, OPT_INT, 10000) // restart elevator at least once every 1000 ms
|
||||
OPTION(bdev_el_bw_max_ms, OPT_INT, 3000) // restart elevator at least once every 300 ms
|
||||
OPTION(bdev_el_bidir, OPT_BOOL, false) // bidirectional elevator?
|
||||
OPTION(bdev_iov_max, OPT_INT, 512) // max # iov's to collect into a single readv()/writev() call
|
||||
OPTION(bdev_debug_check_io_overlap, OPT_BOOL, true) // [DEBUG] check for any pending io overlaps
|
||||
OPTION(bdev_fake_mb, OPT_INT, 0)
|
||||
OPTION(bdev_fake_max_mb, OPT_INT, 0)
|
||||
OPTION(rgw_log, OPT_INT, 20) // log level for the Rados gateway
|
||||
OPTION(rgw_cache_enabled, OPT_BOOL, false) // rgw cache enabled
|
||||
OPTION(rgw_cache_lru_size, OPT_INT, 10000) // num of entries in rgw cache
|
||||
OPTION(rgw_socket_path, OPT_STR, "") // path to unix domain socket, if not specified, rgw will not run as external fcgi
|
||||
OPTION(rgw_op_thread_timeout, OPT_INT, 10*60)
|
||||
OPTION(rgw_op_thread_suicide_timeout, OPT_INT, 60*60)
|
||||
OPTION(rgw_thread_pool_size, OPT_INT, 100)
|
||||
OPTION(rgw_maintenance_tick_interval, OPT_DOUBLE, 10.0)
|
||||
OPTION(rgw_pools_preallocate_max, OPT_INT, 100)
|
||||
OPTION(rgw_pools_preallocate_threshold, OPT_INT, 70)
|
||||
OPTION(rgw_log_nonexistent_bucket, OPT_BOOL, false)
|
||||
OPTION(rbd_writeback_window, OPT_INT, 0 /*8 << 20*/) // rbd writeback window size, bytes
|
||||
|
||||
// This will be set to true when it is safe to start threads.
|
||||
// Once it is true, it will never change.
|
||||
OPTION(internal_safe_to_start_threads, OPT_BOOL, false)
|
Loading…
Reference in New Issue
Block a user