diff --git a/oam/install_scripts/rsync.sh b/oam/install_scripts/rsync.sh index 7bbe29641..660057582 100755 --- a/oam/install_scripts/rsync.sh +++ b/oam/install_scripts/rsync.sh @@ -30,7 +30,7 @@ set COMMAND "rsync -vopgr -e ssh --exclude=mysql/ --exclude=test/ --exclude=infi # # run command # -set timeout 60 +set timeout 20 send "$COMMAND\n" expect { -re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit -1} @@ -57,25 +57,27 @@ expect { set HOME "$env(HOME)" -set COMMAND "rsync -vopgr -e ssh $HOME/.my.cnf $USERNAME@$SERVER:$HOME/" +if {[file exist $HOME/.my.cnf]} { -# -# run command -# -set timeout 20 -send "$COMMAND\n" -expect { - -re "word: " { send "$PASSWORD\n" } - -re "passphrase" { send "$PASSWORD\n" } - -re "total size" {} abort - -re "failed" { exit 0 } - timeout { exit 0 } -} -expect { - -re "total size" {} abort - -re "failed" { exit 0 } - timeout { exit 0 } -} + set COMMAND "rsync -vopgr -e ssh $HOME/.my.cnf $USERNAME@$SERVER:$HOME/" + # + # run command + # + set timeout 10 + send "$COMMAND\n" + expect { + -re "word: " { send "$PASSWORD\n" } + -re "passphrase" { send "$PASSWORD\n" } + -re "total size" {} abort + -re "failed" { exit 0 } + timeout { exit 0 } + } + expect { + -re "total size" {} abort + -re "failed" { exit 0 } + timeout { exit 0 } + } +} exit 0 diff --git a/oamapps/postConfigure/helpers.cpp b/oamapps/postConfigure/helpers.cpp index 0bce99a7c..07507acf1 100644 --- a/oamapps/postConfigure/helpers.cpp +++ b/oamapps/postConfigure/helpers.cpp @@ -459,7 +459,9 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, std::st { // set for slave repl request // don't do PMs unless PMwithUM flag is set string moduleType = (*pt).DeviceName.substr(0,MAX_MODULE_TYPE_SIZE); - if ( moduleType == "pm" && !pmwithum ) { + + if ( ( moduleType == "pm" && !pmwithum ) && + ( IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM ) ) { pt++; continue; } @@ -678,15 +680,19 @@ void checkMysqlPort( std::string& mysqlPort, Config* sysConfig ) if ( size != 0 ) { if ( noPrompting ) { cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use" << endl; - cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; + cout << "Either use the command line argument of 'port' to enter a different number" << endl; + cout << "or stop the process that is using port '" + mysqlPort + "'" << endl; + cout << "For No-prompt install, exiting" << endl; exit(1); } cout << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on local server" << endl; - + cout << "Either enter a different port to use" << endl; + cout << "or stop the process that is using port '" + mysqlPort + "' and enter '" + mysqlPort + "' to continue" << endl; + while(true) { - prompt = "Enter a different port number > "; + prompt = "Enter port number > "; pcommand = callReadline(prompt.c_str()); if (pcommand) { @@ -756,7 +762,9 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string if ( size != 0 ) { if ( noPrompting ) { cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use" << endl; - cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; + cout << "Either use the command line argument of 'port' to enter a different number" << endl; + cout << "or stop the process that is using port '" + mysqlPort + "'" << endl; + cout << "For No-prompt install, exiting" << endl; exit(1); } else @@ -787,7 +795,9 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string if (WEXITSTATUS(rtnCode) == 0) { if ( noPrompting ) { cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on " << remoteModuleName << endl; - cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; + cout << "Either use the command line argument of 'port' to enter a different number" << endl; + cout << "or stop the process that is using port '" + mysqlPort + "'" << endl; + cout << "For No-prompt install, exiting" << endl; cout << "exiting..." << endl; exit(1); } @@ -805,10 +815,12 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string if ( inUse ) { cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on " << inUseServer << endl; + cout << "Either enter a different port to use" << endl; + cout << "or stop the process that is using port '" + mysqlPort + "' and enter '" + mysqlPort + "' to continue" << endl; while(true) { - prompt = "Enter a different port number > "; + prompt = "Enter a port number > "; pcommand = callReadline(prompt.c_str()); if (pcommand) { diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp index b7def2ac9..623281c6e 100755 --- a/procmgr/processmanager.cpp +++ b/procmgr/processmanager.cpp @@ -5440,12 +5440,11 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str } //delay to give time for ProcMon to start after the config is sent and procmon restarts - log.writeLog(__LINE__, "addModule - sleep 10 - give ProcMon time to CONFIGURE and restart", LOG_TYPE_DEBUG); - sleep(10); + log.writeLog(__LINE__, "addModule - sleep 30 - give ProcMon time to CONFIGURE and restart", LOG_TYPE_DEBUG); + sleep(30); -// sleep(5); -// log.writeLog(__LINE__, "Setup MySQL Replication for new Modules being Added", LOG_TYPE_DEBUG); -// processManager.setMySQLReplication(devicenetworklist, oam::UnassignedName, false, true, password ); + log.writeLog(__LINE__, "Setup MySQL Replication for new Modules being Added", LOG_TYPE_DEBUG); + processManager.setMySQLReplication(devicenetworklist, oam::UnassignedName, false, true, password ); return API_SUCCESS; } diff --git a/procmon/processmonitor.cpp b/procmon/processmonitor.cpp index a4b5711bd..9e484c8c5 100644 --- a/procmon/processmonitor.cpp +++ b/procmon/processmonitor.cpp @@ -1791,7 +1791,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO string masterLogFile = oam::UnassignedName; string masterLogPos = oam::UnassignedName; - if ( (PMwithUM == "n") && (config.moduleType() == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) + if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) && + ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) { ackMsg << (ByteStream::byte) ACK; ackMsg << (ByteStream::byte) MASTERREP; @@ -1864,7 +1865,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO string port; msg >> port; - if ( (PMwithUM == "n") && (config.moduleType() == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) + if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) && + ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) { ackMsg << (ByteStream::byte) ACK; ackMsg << (ByteStream::byte) SLAVEREP; @@ -1911,7 +1913,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO string module; msg >> module; - if ( (PMwithUM == "n") && (config.moduleType() == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) + if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) && + ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) { ackMsg << (ByteStream::byte) ACK; ackMsg << (ByteStream::byte) MASTERDIST; @@ -5008,7 +5011,8 @@ int ProcessMonitor::runMasterRep(std::string& masterLogFile, std::string& master string moduleType = systemModuleTypeConfig.moduletypeconfig[i].ModuleType; - if ( (PMwithUM == "n") && (moduleType == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) + if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) && + ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) continue; HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); @@ -5304,7 +5308,8 @@ int ProcessMonitor::runMasterDist(std::string& password, std::string& slaveModul string moduleType = systemModuleTypeConfig.moduletypeconfig[i].ModuleType; - if ( (PMwithUM == "n") && (moduleType == "pm") && ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) + if ( ( (PMwithUM == "n") && (config.moduleType() == "pm") ) && + ( config.ServerInstallType() != oam::INSTALL_COMBINE_DM_UM_PM) ) continue; DeviceNetworkList::iterator pt = systemModuleTypeConfig.moduletypeconfig[i].ModuleNetworkList.begin();