.add_service("mgr")
.set_description("Filesystem path to manager modules."),
+ Option("mgr_standby_modules", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(true)
+ .set_description("Start modules in standby (redirect) mode when mgr is standby")
+ .set_long_description(
+ "By default, the standby modules will answer incoming requests with a "
+ "HTTP redirect to the active manager, allowing users to point their browser at any "
+ "mgr node and find their way to an active mgr. However, this mode is problematic "
+ "when using a load balancer because (1) the redirect locations are usually private "
+ "IPs and (2) the load balancer can't identify which mgr is the right one to send "
+ "traffic to. If a load balancer is being used, set this to false."),
+
Option("mgr_disabled_modules", Option::TYPE_STR, Option::LEVEL_ADVANCED)
#ifdef MGR_DISABLED_MODULES
.set_default(MGR_DISABLED_MODULES)
if (map.active_gid != 0 && map.active_name != g_conf()->name.get_id()) {
// I am the standby and someone else is active, start modules
// in standby mode to do redirects if needed
- if (!py_module_registry.is_standby_running()) {
+ if (!py_module_registry.is_standby_running() &&
+ g_conf().get_val<bool>("mgr_standby_modules")) {
py_module_registry.standby_start(monc, finisher);
}
}