If we have standby modules and this goes false, or do not have modules
and this goes true, then respawn.
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit
efc29fb3630aaab4e04d99621c40561d38a99c03)
"clog_to_graylog",
"clog_to_graylog_host",
"clog_to_graylog_port",
+ "mgr_standby_modules",
"host",
"fsid",
NULL
changed.count("fsid")) {
_update_log_config();
}
+ if (changed.count("mgr_standby_modules") && !active_mgr) {
+ if (g_conf().get_val<bool>("mgr_standby_modules") != py_module_registry.have_standby_modules()) {
+ dout(1) << "mgr_standby_modules now "
+ << (int)g_conf().get_val<bool>("mgr_standby_modules")
+ << ", standby modules are "
+ << (py_module_registry.have_standby_modules() ? "":"not ")
+ << "active, respawning"
+ << dendl;
+ respawn();
+ }
+ }
}
int MgrStandby::init()
*/
bool handle_mgr_map(const MgrMap &mgr_map_);
+ bool have_standby_modules() const {
+ return !!standby_modules;
+ }
+
void init();
void upgrade_config(