OPTION(mon_max_osd, OPT_INT)
OPTION(mon_probe_timeout, OPT_DOUBLE)
OPTION(mon_client_bytes, OPT_U64) // client msg data allowed in memory (in bytes)
-OPTION(mon_mgr_proxy_client_bytes_ratio, OPT_FLOAT) // ratio of mon_client_bytes that can be consumed by proxied mgr commands before we error out to client
OPTION(mon_log_max_summary, OPT_U64)
OPTION(mon_daemon_bytes, OPT_U64) // mds, osd message memory cap (in bytes)
OPTION(mon_max_log_entries_per_event, OPT_INT)
OPTION(mgr_connect_retry_interval, OPT_DOUBLE)
OPTION(mgr_service_beacon_grace, OPT_DOUBLE)
-OPTION(mon_mgr_digest_period, OPT_INT) // How frequently to send digests
-OPTION(mon_mgr_beacon_grace, OPT_INT) // How long to wait to failover
-OPTION(mon_mgr_inactive_grace, OPT_INT) // How long before health WARN -> ERR
-OPTION(mon_mgr_mkfs_grace, OPT_INT) // How long before we complain about MGR_DOWN
OPTION(rgw_crypt_require_ssl, OPT_BOOL) // requests including encryption key headers must be sent over ssl
OPTION(rgw_crypt_default_encryption_key, OPT_STR) // base64 encoded key for encryption of rgw objects
OPTION(rgw_crypt_s3_kms_encryption_keys, OPT_STR) // extra keys that may be used for aws:kms
.set_description(""),
Option("mon_mgr_proxy_client_bytes_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
- .set_default(.3),
+ .set_default(.3)
+ .set_description("ratio of mon_client_bytes that can be consumed by "
+ "proxied mgr commands before we error out to client"),
Option("mon_log_max_summary", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
.set_default(50)
void MgrMonitor::create_initial()
{
- boost::tokenizer<> tok(g_conf->mgr_initial_modules);
+ // Take a local copy of initial_modules for tokenizer to iterate over.
+ auto initial_modules = g_conf->get_val<std::string>("mgr_initial_modules");
+ boost::tokenizer<> tok(initial_modules);
for (auto& m : tok) {
pending_map.modules.insert(m);
}
// no OSDs are ever created.
if (ever_had_active_mgr ||
(mon->osdmon()->osdmap.get_num_osds() > 0 &&
- now > mon->monmap->created + g_conf->mon_mgr_mkfs_grace)) {
+ now > mon->monmap->created + g_conf->get_val<int64_t>("mon_mgr_mkfs_grace"))) {
health_status_t level = HEALTH_WARN;
if (first_seen_inactive != utime_t() &&
- now - first_seen_inactive > g_conf->mon_mgr_inactive_grace) {
+ now - first_seen_inactive > g_conf->get_val<int64_t>("mon_mgr_inactive_grace")) {
level = HEALTH_ERR;
}
return level;
}
digest_event = mon->timer.add_event_after(
- g_conf->mon_mgr_digest_period,
+ g_conf->get_val<int64_t>("mon_mgr_digest_period"),
new C_MonContext(mon, [this](int) {
send_digests();
}));
return;
const auto now = ceph::coarse_mono_clock::now();
- const auto cutoff = now - std::chrono::seconds(g_conf->mon_mgr_beacon_grace);
+ const auto cutoff = now - std::chrono::seconds(g_conf->get_val<int64_t>("mon_mgr_beacon_grace"));
// Populate any missing beacons (i.e. no beacon since MgrMonitor
// instantiation) with the current time, so that they will
if (promote_standby()) {
dout(4) << "Promoted standby " << pending_map.active_gid << dendl;
mon->clog->info() << "Activating manager daemon "
- << pending_map.active_name;
+ << pending_map.active_name;
propose = true;
}
}
if (!pending_map.available &&
!ever_had_active_mgr &&
should_warn_about_mgr_down() != HEALTH_OK) {
- dout(10) << " exceeded mon_mgr_mkfs_grace " << g_conf->mon_mgr_mkfs_grace
- << " seconds" << dendl;
+ dout(10) << " exceeded mon_mgr_mkfs_grace "
+ << g_conf->get_val<int64_t>("mon_mgr_mkfs_grace")
+ << " seconds" << dendl;
propose = true;
}
osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS) {
const auto& hdr = m->get_header();
uint64_t size = hdr.front_len + hdr.middle_len + hdr.data_len;
- uint64_t max =
- g_conf->mon_client_bytes * g_conf->mon_mgr_proxy_client_bytes_ratio;
+ uint64_t max = g_conf->get_val<uint64_t>("mon_client_bytes")
+ * g_conf->get_val<double>("mon_mgr_proxy_client_bytes_ratio");
if (mgr_proxy_bytes + size > max) {
dout(10) << __func__ << " current mgr proxy bytes " << mgr_proxy_bytes
<< " + " << size << " > max " << max << dendl;