You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-10-31 18:30:33 +03:00
MCOL-770
This commit is contained in:
@@ -552,6 +552,72 @@ static void startMgrProcessThread()
|
||||
log.writeLog(__LINE__, "EXCEPTION ERROR on getSystemConfig: Caught unknown exception!", LOG_TYPE_ERROR);
|
||||
}
|
||||
|
||||
//get Distributed Install
|
||||
string DistributedInstall = "y";
|
||||
|
||||
try
|
||||
{
|
||||
oam.getSystemConfig("DistributedInstall", DistributedInstall);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
log.writeLog(__LINE__, "addModule - ERROR: get DistributedInstall", LOG_TYPE_ERROR);
|
||||
}
|
||||
|
||||
//send out moduleName to remote nodes on non-distrubuted install
|
||||
if ( DistributedInstall == "n" )
|
||||
{
|
||||
int status = API_SUCCESS;
|
||||
int k = 0;
|
||||
for( ; k < 1200 ; k++ )
|
||||
{
|
||||
if ( startsystemthreadStop ) {
|
||||
processManager.setSystemState(oam::MAN_OFFLINE);
|
||||
|
||||
// exit thread
|
||||
log.writeLog(__LINE__, "startMgrProcessThread Exit with a stop system flag", LOG_TYPE_DEBUG);
|
||||
pthread_exit(0);
|
||||
}
|
||||
|
||||
status = API_SUCCESS;
|
||||
for( unsigned int i = 0 ; i < systemmoduletypeconfig.moduletypeconfig.size(); i++)
|
||||
{
|
||||
int moduleCount = systemmoduletypeconfig.moduletypeconfig[i].ModuleCount;
|
||||
if( moduleCount == 0)
|
||||
continue;
|
||||
|
||||
DeviceNetworkList::iterator pt = systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.begin();
|
||||
for ( ; pt != systemmoduletypeconfig.moduletypeconfig[i].ModuleNetworkList.end(); pt++)
|
||||
{
|
||||
string moduleName = (*pt).DeviceName;
|
||||
if ( (*pt).DisableState == oam::MANDISABLEDSTATE ||
|
||||
(*pt).DisableState == oam::AUTODISABLEDSTATE )
|
||||
continue;
|
||||
|
||||
int ret = processManager.configureModule(moduleName);
|
||||
if ( ret != API_SUCCESS )
|
||||
status = ret;
|
||||
}
|
||||
}
|
||||
|
||||
//get out of loop if all modules updated
|
||||
if( status == API_SUCCESS )
|
||||
break;
|
||||
|
||||
//retry after sleeping for a bit
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
if ( k == 1200 || status == API_FAILURE) {
|
||||
// system didn't successfull restart
|
||||
processManager.setSystemState(oam::FAILED);
|
||||
// exit thread
|
||||
log.writeLog(__LINE__, "startMgrProcessThread Exit with a failure, not all ProcMons running", LOG_TYPE_CRITICAL);
|
||||
log.writeLog(__LINE__, "startMgrProcessThread Exit - failure", LOG_TYPE_DEBUG);
|
||||
pthread_exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
//wait until all modules are up after a system reboot
|
||||
int i = 0;
|
||||
for( ; i < 100 ; i++ )
|
||||
|
||||
Reference in New Issue
Block a user