warn when [SATELLITE] section is set on a satellite node
A satellite (SATELLITE_OF set) returns early from Reflector::initialize() before initSatelliteServer() runs, so any [SATELLITE] block is silently ignored. Child satellites then get connection-refused with nothing in the parent's log explaining why. Emit a warn at startup so the misconfig surfaces immediately.
This commit is contained in:
1 parent
edd188b457
commit
8f00196821
1 file changed
+9
@@ -521,6 +521,15 @@ bool Reflector::initialize(Async::Config &cfg)
|
||||
!satellite_of.empty())
|
||||
{
|
||||
m_is_satellite = true;
|
||||
std::string sat_listen_port_unused;
|
||||
if (cfg.getValue("SATELLITE", "LISTEN_PORT", sat_listen_port_unused))
|
||||
{
|
||||
geulog::warn("core",
|
||||
"[SATELLITE] section is ignored on a satellite node "
|
||||
"(SATELLITE_OF is set). Satellites are leaf nodes and cannot "
|
||||
"accept child satellites; remove the [SATELLITE] block or "
|
||||
"unset SATELLITE_OF.");
|
||||
}
|
||||
m_satellite_client = new SatelliteClient(this, cfg);
|
||||
if (!m_satellite_client->initialize())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user