diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index d1244d3ca..9c7354483 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -1368,7 +1368,8 @@ namespace oam void Oam::getSystemStatus(SystemStatus& systemstatus, bool systemStatusOnly) { - checkSystemRunning("getSystemStatus"); + if (!checkSystemRunning()) + return; #ifdef _MSC_VER // TODO: Remove when we create OAM for Windows @@ -2136,8 +2137,8 @@ namespace oam void Oam::getProcessStatus(SystemProcessStatus& systemprocessstatus, string port) { - checkSystemRunning("getProcessStatus"); - + if (!checkSystemRunning()) + exceptionControl("getProcessStatus", API_FAILURE); ProcessStatus processstatus; systemprocessstatus.processstatus.clear(); @@ -2236,7 +2237,8 @@ namespace oam return; #endif - checkSystemRunning("getProcessStatus"); + if (!checkSystemRunning()) + exceptionControl("getProcessStatus", API_FAILURE); for ( int i = 0 ; i < 5 ; i ++) { @@ -2331,8 +2333,8 @@ namespace oam void Oam::setProcessStatus(const std::string process, const std::string module, const int state, pid_t PID) { - checkSystemRunning("setProcessStatus"); - + if (!checkSystemRunning()) + exceptionControl("setProcessStatus", API_FAILURE); //send and wait for ack and resend if not received //retry 5 time max for ( int i=0; i < 5 ; i++) @@ -2848,7 +2850,8 @@ namespace oam exceptionControl("getMyProcessStatus", API_FAILURE); } - checkSystemRunning("getMyProcessStatus"); + if (!checkSystemRunning()) + exceptionControl("getMyProcessStatus", API_FAILURE); for ( int i = 0 ; i < 5 ; i ++) { @@ -4865,7 +4868,8 @@ namespace oam ********************************************************************/ bool Oam::switchParentOAMModule(std::string moduleName, GRACEFUL_FLAG gracefulflag) { - checkSystemRunning("switchParentOAMModule"); + if (!checkSystemRunning()) + exceptionControl("switchParentOAMModule", API_FAILURE); int returnStatus; // We assume that moduleName is a valid pm @@ -6308,7 +6312,8 @@ namespace oam exceptionControl("sysConfig->write", API_FAILURE); } - checkSystemRunning("addDbroot"); + if (!checkSystemRunning()) + exceptionControl("addDbroot", API_FAILURE); //get updated Columnstore.xml distributed distributeConfigFile("system"); @@ -6345,11 +6350,9 @@ namespace oam * ****************************************************************************/ - void Oam::distributeFstabUpdates(std::string entry, std::string toPM) + void Oam::distributeFstabUpdates(std::string entry, std::string toPM) { - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!checkSystemRunning()) return; ACK_FLAG ackflag = oam::ACK_YES; @@ -8772,7 +8775,7 @@ namespace oam GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string argument1, const std::string argument2, int timeout) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_SUCCESS; //default @@ -8873,7 +8876,7 @@ namespace oam int Oam::sendMsgToProcMgr2(messageqcpp::ByteStream::byte requestType, DeviceNetworkList devicenetworklist, GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string password, const std::string mysqlpw) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_TIMEOUT; //default @@ -8987,7 +8990,7 @@ namespace oam int Oam::sendMsgToProcMgr3(messageqcpp::ByteStream::byte requestType, AlarmList& alarmlist, const std::string date) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_SUCCESS; //default @@ -9088,7 +9091,7 @@ namespace oam GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string argument1, const std::string argument2, int timeout) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_STILL_WORKING; @@ -9274,7 +9277,7 @@ namespace oam void Oam::sendStatusUpdate(ByteStream obs, ByteStream::byte returnRequestType) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return; for ( int i = 0 ; i < 5 ; i ++) @@ -9650,8 +9653,10 @@ namespace oam return returnStatus; } - bool Oam::checkSystemRunning(const char* function) + bool Oam::checkSystemRunning() { + // string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; + // system(cmd.c_str()); struct stat st; if (stat("/var/lock/subsys/columnstore", &st) == 0) { @@ -9668,13 +9673,6 @@ namespace oam return true; } } - ostringstream os; - os << function << " system is not running: " << strerror(errno); - writeLog(os.str(), LOG_TYPE_ERROR ); - if (strlen(function)) - { - throw runtime_error(os.str()); - } return false; } } //namespace oam diff --git a/oam/oamcpp/liboamcpp.h b/oam/oamcpp/liboamcpp.h index b1ed7ebae..883123aa4 100644 --- a/oam/oamcpp/liboamcpp.h +++ b/oam/oamcpp/liboamcpp.h @@ -2449,6 +2449,8 @@ namespace oam */ void writeLog(const std::string logContent, const logging::LOG_TYPE logType = logging::LOG_TYPE_INFO); + bool checkSystemRunning(); + private: int sendMsgToProcMgr3(messageqcpp::ByteStream::byte requestType, snmpmanager::AlarmList& alarmlist, const std::string date); @@ -2482,8 +2484,6 @@ namespace oam */ void sendStatusUpdate(messageqcpp::ByteStream obs, messageqcpp::ByteStream::byte returnRequestType); - bool checkSystemRunning(const char* function); - std::string CalpontConfigFile; std::string AlarmConfigFile; std::string ProcessConfigFile; diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index 69ccac917..2786ad472 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -503,7 +503,7 @@ int processCommand(string* arguments) CC_SUSPEND_ANSWER suspendAnswer = CANCEL; bool bNeedsConfirm = true; string password; - + string cmd; // get command info from Command config file CmdID = -1; @@ -1999,7 +1999,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; + cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) { cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl; @@ -2007,7 +2007,7 @@ int processCommand(string* arguments) } else { - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); } } @@ -2017,7 +2017,7 @@ int processCommand(string* arguments) if ( gracefulTemp == FORCEFUL ) { - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); cout << endl << " Successful shutdown of System (stopped local columnstore service) " << endl << endl; } @@ -2025,7 +2025,7 @@ int processCommand(string* arguments) if (Failed.find("Connection refused") != string::npos) { cout << endl << "**** shutdownSystem Error : ProcessManager not Active, stopping columnstore service" << endl; - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); cout << endl << " Successful stop of local columnstore service " << endl << endl; } @@ -2044,7 +2044,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) { cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl; @@ -2071,9 +2071,7 @@ int processCommand(string* arguments) // this would be used after a shutdownSystem command // if columnstore service is up, send message to ProcMgr to start system (which starts all processes) - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { cout << "startSystem command, 'columnstore' service is down, sending command to" << endl; cout << "start the 'columnstore' service on all modules" << endl << endl; @@ -2142,7 +2140,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) { cout << endl << "ERROR: Restart MariaDB Columnstore Service failure, check /tmp/cc-restart.pdsh. exit..." << endl; @@ -2289,9 +2287,7 @@ int processCommand(string* arguments) // this would be used after a shutdownSystem command // if columnstore service is up, send message to ProcMgr to start system (which starts all processes) - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { if (bNeedsConfirm) { @@ -2363,7 +2359,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) { cout << endl << "ERROR: Restart MariaDB Columnstore Service failue, check /tmp/cc-restart.pdsh. exit..." << endl; @@ -2457,7 +2453,7 @@ int processCommand(string* arguments) //just kick off local server cout << " System being restarted, please wait..."; cout.flush(); - string cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1"; + cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1"; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) { cout << endl << "error with running 'columnstore start' on local module " << endl; @@ -2712,7 +2708,7 @@ int processCommand(string* arguments) cout << endl << "Monitor for System Alarms" << endl; cout << " Enter control-C to return to command line" << endl << endl; - string cmd = "tail -n 0 -f " + snmpmanager::ALARM_FILE; + cmd = "tail -n 0 -f " + snmpmanager::ALARM_FILE; system(cmd.c_str()); } break; @@ -3287,9 +3283,7 @@ int processCommand(string* arguments) } //check the system status / service status and only allow command when System is MAN_OFFLINE - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (oam.checkSystemRunning()) { SystemStatus systemstatus; try { @@ -3764,9 +3758,7 @@ int processCommand(string* arguments) } //check the system status / service status and only allow command when System is MAN_OFFLINE - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { cout << endl << "**** assignDbrootPmConfig Failed, System is down. Needs to be running" << endl; break; @@ -6584,7 +6576,7 @@ int processCommand(string* arguments) oam.startModule(devicenetworklist, ackTemp); //reload DBRM with new configuration, needs to be done here after startModule - string cmd = startup::StartUp::installDir() + "/bin/dbrmctl reload > /dev/null 2>&1"; + cmd = startup::StartUp::installDir() + "/bin/dbrmctl reload > /dev/null 2>&1"; system(cmd.c_str()); sleep(15); @@ -6643,6 +6635,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) ACK_FLAG ackTemp = ACK_YES; CC_SUSPEND_ANSWER suspendAnswer = WAIT; bool bNeedsConfirm = true; + string cmd; switch( CommandID ) { @@ -6875,7 +6868,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) //run remote command script HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); - string cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ; + cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) { cout << "Failed with running remote_command.sh" << endl; @@ -6979,7 +6972,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); string ipAddr = (*pt1).IPAddr; //run remote command script - string cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ; + cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) cout << "Failed with running remote_command.sh" << endl; diff --git a/oamapps/postConfigure/amazonInstaller.cpp b/oamapps/postConfigure/amazonInstaller.cpp index 617af94e4..a40069759 100644 --- a/oamapps/postConfigure/amazonInstaller.cpp +++ b/oamapps/postConfigure/amazonInstaller.cpp @@ -184,8 +184,8 @@ int main(int argc, char *argv[]) { if( string("-h") == argv[i] || string("--help") == argv[i]) { cout << endl; - cout << "This is the Amazon InfiniDB AMI System Configuration and Installation tool." << endl; - cout << "It will Configure and startup an Amazon InfiniDB System." << endl << endl; + cout << "This is the Amazon columnstore AMI System Configuration and Installation tool." << endl; + cout << "It will Configure and startup an Amazon columnstore System." << endl << endl; cout << "It will read the system configuration settings from /root/amazonConfig.xml." << endl; cout << "Or user can provide a different configuration file with the -c option." << endl; cout << "Or if /root/amazonConfig.xml doesn't exist, then user will be prompted for settings." << endl; @@ -194,8 +194,8 @@ int main(int argc, char *argv[]) cout << " -h Help" << endl; cout << " -c system config file, default is '/root/amazonConfig.xml'" << endl; cout << " -l logfile for postConfigure output to /root/postConfigure.log" << endl; - cout << " -v InfiniDB version" << endl; - cout << " -pc postConfigure failure System Cleanup, used to run System Cleanup if InfiniDB fails to install" << endl; + cout << " -v columnstore version" << endl; + cout << " -pc postConfigure failure System Cleanup, used to run System Cleanup if columnstore fails to install" << endl; cout << " -d Delete Cluster, used to delete Instances and Volumes on a shutdowned system" << endl; cout << " Require argument, include name of local Amazon Configure File '-c' option" << endl; cout << " -s Stop Cluster, used to stop Instances on a shutdowned system" << endl; @@ -223,7 +223,7 @@ int main(int argc, char *argv[]) SystemSoftware systemsoftware; oam.getSystemSoftware(systemsoftware); - cout << endl << "InfiniDB Version: " << systemsoftware.Version << "-" << systemsoftware.Release << endl; + cout << endl << "columnstore Version: " << systemsoftware.Version << "-" << systemsoftware.Release << endl; exit (0); } else if( string("-pc") == argv[i] ) { @@ -246,13 +246,11 @@ int main(int argc, char *argv[]) } } - //check if InfiniDB is up and running - string cmd = installDir + "/bin/infinidb status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "InfiniDB is running") ) { - cout << endl << "InfiniDB is running, can't run AmazonInstaller while InfiniDB is running. Exiting.." << endl; + //check if columnstore is up and running + if (oam.checkSystemRunning()) { + cout << endl << "columnstore is running, can't run AmazonInstaller while columnstore is running. Exiting.." << endl; exit (0); - } + } if ( systemCleanup || systemStop ) { @@ -430,21 +428,19 @@ int main(int argc, char *argv[]) } cout << endl; - cout << "This is the Amazon InfiniDB AMI System Configuration and Installation tool." << endl; - cout << "It will Configure and startup an Amazon InfiniDB System." << endl; + cout << "This is the Amazon columnstore AMI System Configuration and Installation tool." << endl; + cout << "It will Configure and startup an Amazon columnstore System." << endl; - //check if InfiniDB is up and running - cmd = installDir + "/bin/infinidb status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "InfiniDB is running") ) { - cout << "InfiniDB is running, can't run amazonInstaller while InfiniDB is running. Exiting.." << endl; + //check if columnstore is up and running + if (oam.checkSystemRunning()) { + cout << "columnstore is running, can't run amazonInstaller while columnstore is running. Exiting.." << endl; exit (0); } //backup current Columnstore.xml string configFile = installDir + "/etc/Columnstore.xml"; string saveFile = installDir + "/etc/Columnstore.xml.save"; - cmd = "rm -f " + saveFile; + string cmd = "rm -f " + saveFile; system(cmd.c_str()); cmd = "cp " + configFile + " " + saveFile; system(cmd.c_str()); @@ -573,7 +569,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1039,7 +1035,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting AmazonRegion from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting AmazonRegion from the columnstore System Configuration file" << endl; exit(1); } } @@ -1062,7 +1058,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1271,7 +1267,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1296,7 +1292,7 @@ int main(int argc, char *argv[]) SystemSoftware systemsoftware; oam.getSystemSoftware(systemsoftware); - cout << "InfiniDB Version = " << systemsoftware.Version << "-" << systemsoftware.Release << endl; + cout << "columnstore Version = " << systemsoftware.Version << "-" << systemsoftware.Release << endl; cout << "System Type = " << systemType << endl; if ( subnetID != oam::UnassignedName ) { @@ -1392,7 +1388,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } } @@ -1404,7 +1400,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } } @@ -1415,7 +1411,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting UMSecurityGroup from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting UMSecurityGroup from the columnstore System Configuration file" << endl; exit(1); } @@ -1425,7 +1421,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting InstanceType from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting InstanceType from the columnstore System Configuration file" << endl; exit(1); } @@ -1441,7 +1437,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting InstanceType from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting InstanceType from the columnstore System Configuration file" << endl; exit(1); } @@ -1465,7 +1461,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } @@ -1497,7 +1493,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1565,7 +1561,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1852,7 +1848,7 @@ int main(int argc, char *argv[]) cout << endl; } - cout << endl << "===== InfiniDB Configuration Setup and Installation =====" << endl << endl; + cout << endl << "===== columnstore Configuration Setup and Installation =====" << endl << endl; if ( systemType == "combined" ) { cout << "----- Combined System Type - Setup and Install Calpont-MySQL Packages -----" << endl << endl; @@ -1882,7 +1878,7 @@ int main(int argc, char *argv[]) // update /root/Columnstore.xml // - cout << "----- Updating InfiniDB Configuration File (Columnstore.xml) -----" << endl << endl; + cout << "----- Updating columnstore Configuration File (Columnstore.xml) -----" << endl << endl; //setup for multi-server install try { @@ -1910,7 +1906,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting AmazonElasticIPCount in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting AmazonElasticIPCount in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1931,7 +1927,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1946,7 +1942,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot Count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot Count in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1959,7 +1955,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot Count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot Count in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -1980,7 +1976,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Host Name in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Host Name in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1990,7 +1986,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting IP address in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting IP address in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -2011,7 +2007,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Host Name in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Host Name in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2021,7 +2017,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting IP address in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting IP address in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2032,7 +2028,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting dbroot count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting dbroot count in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2053,7 +2049,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot ID in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot ID in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -2068,7 +2064,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting UMStorageType in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting UMStorageType in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2089,7 +2085,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2104,7 +2100,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRootStorageType in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRootStorageType in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2139,7 +2135,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2161,7 +2157,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2246,7 +2242,7 @@ void snmpAppCheck() cout << endl << "===== Setup the Network Management System (NMS) Server Configuration =====" << endl << endl; - cout << "This would be used to receive SNMP Traps from InfiniDB, like a Network Control Center" << endl; + cout << "This would be used to receive SNMP Traps from columnstore, like a Network Control Center" << endl; cout << "Default to 0.0.0.0 to not enable snmptrap forwarding" << endl << endl; prompt1 = "Enter IP Address(es) of NMS Server (0.0.0.0) > "; pcommand1 = readline(prompt1.c_str()); @@ -2863,7 +2859,7 @@ void cleanupSystem(bool terminate) if ( systemType == "combined" ) { cout << "----- Combined System Type Uninstall Calpont-MySQL Packages -----" << endl << endl; - system("rpm -e infinidb-mysql infinidb-storage-engine"); + system("rpm -e infinidb-mysql infinidb-storage-engine"); } cout << endl << "Cleanup finished, exiting" << endl << endl; diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index e669745d2..2c5db22f4 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -214,7 +214,7 @@ int main(int argc, char *argv[]) bool startOfflinePrompt = false; noPrompting = false; string password; - + string cmd; // struct sysinfo myinfo; // hidden options @@ -425,9 +425,7 @@ int main(int argc, char *argv[]) } //check if MariaDB Columnstore is up and running - string cmd = installDir + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) { + if (oam.checkSystemRunning()) { cout << "MariaDB Columnstore is running, can't run postConfigure while MariaDB Columnstore is running. Exiting.." << endl; exit (0); }