From: Matan Breizman Date: Thu, 23 Nov 2023 15:15:58 +0000 (+0000) Subject: crimson/osd: update osd_beacon_report_interval on conf change X-Git-Tag: v19.0.0~4^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a58b2e63b7f12c54101314abb8d29d4f862b119;p=ceph.git crimson/osd: update osd_beacon_report_interval on conf change Signed-off-by: Matan Breizman --- diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index 1b574abd8fa3..f3648c6df277 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -868,6 +868,25 @@ void OSD::handle_authentication(const EntityName& name, } } +const char** OSD::get_tracked_conf_keys() const +{ + static const char* KEYS[] = { + "osd_beacon_report_interval", + nullptr + }; + return KEYS; +} + +void OSD::handle_conf_change( + const crimson::common::ConfigProxy& conf, + const std::set &changed) +{ + if (changed.count("osd_beacon_report_interval")) { + beacon_timer.rearm_periodic( + std::chrono::seconds(conf->osd_beacon_report_interval)); + } +} + void OSD::update_stats() { osd_stat_seq++; diff --git a/src/crimson/osd/osd.h b/src/crimson/osd/osd.h index 8125e89fbaf1..134376ad947e 100644 --- a/src/crimson/osd/osd.h +++ b/src/crimson/osd/osd.h @@ -61,7 +61,8 @@ class PG; class OSD final : public crimson::net::Dispatcher, private crimson::common::AuthHandler, - private crimson::mgr::WithStats { + private crimson::mgr::WithStats, + public md_config_obs_t { const int whoami; const uint32_t nonce; seastar::abort_source& abort_source; @@ -126,6 +127,10 @@ class OSD final : public crimson::net::Dispatcher, std::unique_ptr heartbeat; seastar::timer tick_timer; + const char** get_tracked_conf_keys() const final; + void handle_conf_change(const ConfigProxy& conf, + const std::set &changed) final; + // admin-socket seastar::lw_shared_ptr asok;