diff --git a/thorlcr/slave/thslavemain.cpp b/thorlcr/slave/thslavemain.cpp index dccf3e0d100..e9569f5dcaf 100644 --- a/thorlcr/slave/thslavemain.cpp +++ b/thorlcr/slave/thslavemain.cpp @@ -380,6 +380,9 @@ int main( int argc, const char *argv[] ) globals.setown(loadConfiguration(globals, argv, "thor", "THOR", nullptr, nullptr, nullptr, false)); #endif + // NB: the thor configuration is serialized from the manager and only available after the RegisterSelf + // Until that point, only properties on the command line are available. + const char *master = globals->queryProp("@master"); if (!master) usage(); @@ -411,10 +414,6 @@ int main( int argc, const char *argv[] ) slfEp.port = queryMyNode()->endpoint().port; setMachinePortBase(slfEp.port); - setSlaveAffinity(globals->getPropInt("@slaveprocessnum")); - - if (globals->getPropBool("@MPChannelReconnect")) - getMPServer()->setOpt(mpsopt_channelreopen, "true"); #ifdef USE_MP_LOG startLogMsgParentReceiver(); LOG(MCdebugProgress, thorJob, "MPServer started on port %d", getFixedPort(TPORT_mp)); @@ -430,6 +429,11 @@ int main( int argc, const char *argv[] ) if (!slaveLogHandler) slaveLogHandler = startSlaveLog(); + setSlaveAffinity(globals->getPropInt("@slaveprocessnum")); + + if (globals->getPropBool("@MPChannelReconnect")) + getMPServer()->setOpt(mpsopt_channelreopen, "true"); + if (getExpertOptBool("slaveDaliClient")) enableThorSlaveAsDaliClient();