diff --git a/dbcon/mysql/install_calpont_mysql.sh b/dbcon/mysql/install_calpont_mysql.sh index acf8cefee..44b3a6d9e 100755 --- a/dbcon/mysql/install_calpont_mysql.sh +++ b/dbcon/mysql/install_calpont_mysql.sh @@ -29,7 +29,6 @@ df=$installdir/mysql/my.cnf $installdir/mysql/bin/mysql --defaults-file=$df --force --user=root $pwprompt mysql 2>/tmp/mysql_install.log <>/tmp/mysql_install.log <unassigned 1 3 - 30 // 2.5 minutes + 6 // 2.5 minutes @@ -251,7 +251,7 @@ 0.0.0.0 128M 10 - /tmp/infinidb_tmp_files + /tmp/columnstore_tmp_files $INSTALLDIR 10 120 diff --git a/oam/etc/Calpont.xml.singleserver b/oam/etc/Calpont.xml.singleserver index 82261c80a..65895bf22 100644 --- a/oam/etc/Calpont.xml.singleserver +++ b/oam/etc/Calpont.xml.singleserver @@ -236,7 +236,7 @@ 0.0.0.0 128M 10 - /tmp/infinidb_tmp_files + /tmp/columnstore_tmp_files $INSTALLDIR 10 3 diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index ed406345f..7f15c6c68 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -4657,7 +4657,7 @@ namespace oam { buf = line; - string::size_type pos = buf.find("Offending RSA key",0); + string::size_type pos = buf.find("Offending",0); if (pos != string::npos) { // line ID pos = buf.find(":",0); diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index 1b67b11ee..4511c876a 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -2327,7 +2327,7 @@ int processCommand(string* arguments) else { //just kick off local server - cout << " System being started, please wait..."; + cout << endl << " System being started, please wait..."; cout.flush(); cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1"; int rtnCode = system(cmd.c_str()); @@ -2349,7 +2349,7 @@ int processCommand(string* arguments) try { - cout << " System being started, please wait..."; + cout << endl << " System being started, please wait..."; cout.flush(); oam.startSystem(ackTemp); if ( waitForActive() ) @@ -6835,9 +6835,13 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm); - // confirm request - if (confirmPrompt("This command restarts the processing of an application on a Module within the MariaDB Columnstore System")) - break; + if (arguments[3] != "y") + { + // confirm request + if (confirmPrompt("This command restarts the processing of an application on a Module within the MariaDB Columnstore System")) + break; + } + try { diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index a0aaed24c..121a2cd09 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -1651,7 +1651,7 @@ int main(int argc, char *argv[]) newModuleHostName = moduleHostName; if (amazonInstall) { if ( moduleHostName == oam::UnassignedName && - newModuleName == "pm1" ) + newModuleName == "pm1" && nicID == 1) { //get local instance name (pm1) string localInstance = oam.getEC2LocalInstance(); @@ -1721,7 +1721,17 @@ int main(int argc, char *argv[]) } } else + { + if ( moduleHostName == oam::UnassignedName && + newModuleName == "pm1" && nicID == 1) + { + char hostname[128]; + gethostname(hostname, sizeof hostname); + moduleHostName = hostname; + } + prompt = "Enter Nic Interface #" + oam.itoa(nicID) + " Host Name (" + moduleHostName + ") > "; + } if ( prompt != "" ) { diff --git a/oamapps/serverMonitor/cpuMonitor.cpp b/oamapps/serverMonitor/cpuMonitor.cpp index cab683b9c..95d17e19e 100644 --- a/oamapps/serverMonitor/cpuMonitor.cpp +++ b/oamapps/serverMonitor/cpuMonitor.cpp @@ -479,9 +479,9 @@ void ServerMonitor::getCPUdata() { pcl.clear(); - system("top -b -n1 | head -12 | awk '{print $9,$12}' | tail -5 > /tmp/infinidb_tmp_files/processCpu"); + system("top -b -n1 | head -12 | awk '{print $9,$12}' | tail -5 > /tmp/columnstore_tmp_files/processCpu"); - ifstream oldFile1 ("/tmp/infinidb_tmp_files/processCpu"); + ifstream oldFile1 ("/tmp/columnstore_tmp_files/processCpu"); // read top 5 users int i = 0; @@ -503,9 +503,9 @@ void ServerMonitor::getCPUdata() // // get and check Total CPU usage // - system("top -b -n 6 -d 1 | awk '{print $5}' | grep %id > /tmp/infinidb_tmp_files/systemCpu"); + system("top -b -n 6 -d 1 | awk '{print $5}' | grep %id > /tmp/columnstore_tmp_files/systemCpu"); - ifstream oldFile ("/tmp/infinidb_tmp_files/systemCpu"); + ifstream oldFile ("/tmp/columnstore_tmp_files/systemCpu"); float systemIdle = 0; // skip first line in file, and average the next 5 entries which contains idle times diff --git a/oamapps/serverMonitor/memoryMonitor.cpp b/oamapps/serverMonitor/memoryMonitor.cpp index 95877d03e..5b5d8d31f 100644 --- a/oamapps/serverMonitor/memoryMonitor.cpp +++ b/oamapps/serverMonitor/memoryMonitor.cpp @@ -427,9 +427,9 @@ void ServerMonitor::outputProcMemory(bool log) // get top 5 Memory users by process // - system("ps -e -orss=1,args= | sort -b -k1,1n |tail -n 5 | awk '{print $1,$2}' > /tmp/infinidb_tmp_files/processMem"); + system("ps -e -orss=1,args= | sort -b -k1,1n |tail -n 5 | awk '{print $1,$2}' > /tmp/columnstore_tmp_files/processMem"); - ifstream oldFile ("/tmp/infinidb_tmp_files/processMem"); + ifstream oldFile ("/tmp/columnstore_tmp_files/processMem"); string process; long long memory; diff --git a/procmgr/main.cpp b/procmgr/main.cpp index c4364cde7..c07576dae 100644 --- a/procmgr/main.cpp +++ b/procmgr/main.cpp @@ -1383,12 +1383,12 @@ void pingDeviceThread() //restart module processes int retry = 0; - int ModuleProcMonWaitCount = 30; + int ModuleProcMonWaitCount = 6; try{ oam.getSystemConfig("ModuleProcMonWaitCount", ModuleProcMonWaitCount); } catch(...) { - ModuleProcMonWaitCount = 30; + ModuleProcMonWaitCount = 6; } for ( ; retry < ModuleProcMonWaitCount ; retry ++ ) @@ -1609,9 +1609,12 @@ void pingDeviceThread() break; case oam::DOWN: - // if disabled or initial state, skip - if (opState == oam::AUTO_DISABLED || - opState == oam::INITIAL) + // if initial state, skip + if (opState == oam::INITIAL) + break; + + // if disabled and not amazon, skip + if (opState == oam::AUTO_DISABLED && !amazon) break; log.writeLog(__LINE__, "module failed to respond to pings: " + moduleName, LOG_TYPE_WARNING); @@ -1702,59 +1705,6 @@ void pingDeviceThread() // return values = 'ip address' for running or rebooting, stopped or terminated string currentIPAddr = oam.getEC2InstanceIpAddress(hostName); - if (currentIPAddr == "stopped") - { // start instance - log.writeLog(__LINE__, "Instance in stopped state, try starting it: " + hostName, LOG_TYPE_DEBUG); - - int retryCount = 6; // 1 minutes - if( moduleName.find("pm") == 0 ) - { - if ( PMInstanceType == "m2.4xlarge" ) - retryCount = 15; // 2.5 minutes - } - else - { - if( moduleName.find("um") == 0 ) - if ( UMInstanceType == "m2.4xlarge" ) - retryCount = 15; // 2.5 minutes - } - - int retry = 0; - for ( ; retry < retryCount ; retry++ ) - { - if ( oam.startEC2Instance(hostName) ) - { - log.writeLog(__LINE__, "Instance started, sleep for 30 seconds to allow it to fully come up: " + hostName, LOG_TYPE_DEBUG); - - //delay then get new IP Address - sleep(30); - string currentIPAddr = oam.getEC2InstanceIpAddress(hostName); - if (currentIPAddr == "stopped" || currentIPAddr == "terminated") { - log.writeLog(__LINE__, "Instance failed to start (no ip-address), retry: " + hostName, LOG_TYPE_DEBUG); - } - else - { - // update the Calpont.xml with the new IP Address - string cmd = "sed -i s/" + ipAddr + "/" + currentIPAddr + "/g " + startup::StartUp::installDir() + "/etc/Calpont.xml"; - system(cmd.c_str()); - break; - } - } - else - { - log.writeLog(__LINE__, "Instance failed to start, retry: " + hostName, LOG_TYPE_DEBUG); - - sleep(10); - } - } - - if ( retry >= retryCount ) - { - log.writeLog(__LINE__, "Instance failed to start, restart a new instance: " + hostName, LOG_TYPE_DEBUG); - currentIPAddr = "terminated"; - } - } - if ( currentIPAddr == "terminated") { //check if down module was Standby OAM, if so find another one diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp index 78715db2e..97f83fd43 100644 --- a/procmgr/processmanager.cpp +++ b/procmgr/processmanager.cpp @@ -4602,8 +4602,8 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str system(cmd.c_str()); if (!oam.checkLogStatus("/tmp/login_test.log", "README")) { //check for RSA KEY ISSUE and fix - if (oam.checkLogStatus("/tmp/login_test.log", "Offending RSA key")) { - log.writeLog(__LINE__, "addModule - login failed, RSA key issue, try fixing: " + moduleName, LOG_TYPE_DEBUG); + if (oam.checkLogStatus("/tmp/login_test.log", "Offending")) { + log.writeLog(__LINE__, "addModule - login failed, Offending key issue, try fixing: " + moduleName, LOG_TYPE_DEBUG); string file = "/tmp/login_test.log"; oam.fixRSAkey(file); }