diff --git a/oam/install_scripts/module_installer.sh b/oam/install_scripts/module_installer.sh index ed3a55e36..0e116a597 100755 --- a/oam/install_scripts/module_installer.sh +++ b/oam/install_scripts/module_installer.sh @@ -84,8 +84,8 @@ test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/po mid=`module_id` #if um, cloud, separate system type, external um storage, then setup mount -if [ $module = "um" ]; then - if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then +if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then + if [ $module = "um" ]; then systemtype=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall` if [ $systemtype = "1" ]; then umstoragetype=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMStorageType` @@ -97,14 +97,14 @@ if [ $module = "um" ]; then sudo chown $user:$user -R $COLUMNSTORE_INSTALL_DIR/mysql > /dev/null 2>&1 fi fi - - #setup rc.local - RCFILE=/etc/rc.d/rc.local + fi - if [ $user != "root" ]; then - echo "uncomment runuser in rc.local, amazon AMI" - sudo sed -i -e 's/#runuser/runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1 - fi + #setup rc.local for amazon + RCFILE=/etc/rc.d/rc.local + + if [ $user != "root" ]; then + echo "uncomment runuser in rc.local, amazon AMI" + sudo sed -i -e 's/#runuser/runuser/g' /etc/rc.d/rc.local >/dev/null 2>&1 fi fi diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index 14b601cfb..a8a9bfd3d 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -9396,9 +9396,6 @@ int Oam::checkGlusterLog(std::string logFile, std::string& msg) ******************************************************************************************/ std::string Oam::getMySQLPassword() { - - return oam::UnassignedName; - string mysqlUser = "root"; string USER = "root"; @@ -9422,7 +9419,7 @@ std::string Oam::getMySQLPassword() if (!file) { writeLog("getMySQLPassword: doesn't exist: " + fileName, LOG_TYPE_DEBUG); - exceptionControl("getMySQLPassword", API_FILE_OPEN_ERROR); + return oam::UnassignedName; } char line[400]; diff --git a/oamapps/columnstoreSupport/columnstoreSupport.cpp b/oamapps/columnstoreSupport/columnstoreSupport.cpp index 0232cd9c6..05fe17445 100644 --- a/oamapps/columnstoreSupport/columnstoreSupport.cpp +++ b/oamapps/columnstoreSupport/columnstoreSupport.cpp @@ -305,6 +305,19 @@ void reportThread(string reporttype) cmd = installDir + "/bin/mcsadmin getSystemInfo >> " + outputFile; system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '******************** System Directories ********************' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo '################# mcsadmin getSystemDirectories ################# ' >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; + system(cmd.c_str()); + cmd = installDir + "/bin/mcsadmin getSystemDirectories >> " + outputFile; + system(cmd.c_str()); + cmd = "echo ' ' >> " + outputFile; system(cmd.c_str()); cmd = "echo '******************** System Configuration File ********************' >> " + outputFile; diff --git a/oamapps/postConfigure/helpers.cpp b/oamapps/postConfigure/helpers.cpp index 0392979ee..1a7941f1f 100644 --- a/oamapps/postConfigure/helpers.cpp +++ b/oamapps/postConfigure/helpers.cpp @@ -39,7 +39,6 @@ using namespace installer; #include "installdir.h" -extern string mysqlpw; string pwprompt = " "; string masterLogFile = oam::UnassignedName; @@ -347,7 +346,6 @@ int sendUpgradeRequest(int IserverTypeInstall, bool pmwithum) ByteStream::byte requestID = RUNUPGRADE; msg << requestID; - msg << mysqlpw; int returnStatus = oam::API_SUCCESS; @@ -385,7 +383,7 @@ int sendUpgradeRequest(int IserverTypeInstall, bool pmwithum) { string tmpDir = startup::StartUp::tmpDir(); - cout << "ERROR: Error return in running the MariDB Columnstore Upgrade, check " + tmpDir + "/upgrade*.logs on " << (*pt).DeviceName << endl; + cout << "ERROR: Error return in running the MariDB Columnstore Upgrade, check " + tmpDir + "/mysql_upgrade.log on " << (*pt).DeviceName << endl; return returnStatus; } } diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index 550741bbe..da3977257 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -200,7 +200,6 @@ string tmpDir; string HOME = "/root"; string SUDO = ""; extern string pwprompt; -string mysqlpw = oam::UnassignedName; extern const char* pcommand; extern string prompt; diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp index 3fe88d1b2..3203c67b2 100644 --- a/procmgr/processmanager.cpp +++ b/procmgr/processmanager.cpp @@ -1502,6 +1502,15 @@ void processMSG(messageqcpp::IOSocket* cfIos) cmd = "touch " + startup::StartUp::installDir() + "/local/moveDbrootTransactionLog"; system(cmd.c_str()); + //clear shared memory + cmd = startup::StartUp::installDir() + "/bin/clearShm > /dev/null 2>&1"; + int rtnCode = system(cmd.c_str()); + + if (WEXITSTATUS(rtnCode) != 1) + log.writeLog(__LINE__, "Successfully ran DBRM clearShm", LOG_TYPE_DEBUG); + else + log.writeLog(__LINE__, "Error running DBRM clearShm", LOG_TYPE_ERROR); + // now do local module processManager.shutdownModule(config.moduleName(), graceful, manualFlag); diff --git a/procmon/processmonitor.cpp b/procmon/processmonitor.cpp index c423c7d63..2f6a5ab9d 100644 --- a/procmon/processmonitor.cpp +++ b/procmon/processmonitor.cpp @@ -1714,11 +1714,8 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO { log.writeLog(__LINE__, "MSG RECEIVED: Run upgrade script "); - string mysqlpw; - msg >> mysqlpw; - // run upgrade script - int ret = runUpgrade(mysqlpw); + int ret = runUpgrade(); ackMsg << (ByteStream::byte) ACK; ackMsg << (ByteStream::byte) RUNUPGRADE; @@ -6583,15 +6580,17 @@ int ProcessMonitor::glusterUnassign(std::string dbrootID) * purpose: run upgrade script * ******************************************************************************************/ -int ProcessMonitor::runUpgrade(std::string mysqlpw) +int ProcessMonitor::runUpgrade() { Oam oam; string tmpLog = tmpLogDir + "/mysql_upgrade.log"; - string passwordOption = " --password=" + mysqlpw; - if ( mysqlpw == oam::UnassignedName ) - passwordOption = ""; + string mysqlpw = oam.getMySQLPassword(); + + string passwordOption = passwordOption = ""; + if ( mysqlpw != oam::UnassignedName ) + passwordOption = " --password=" + mysqlpw; for ( int i = 0 ; i < 10 ; i++ ) { diff --git a/procmon/processmonitor.h b/procmon/processmonitor.h index 67c30f0a7..e8c458006 100644 --- a/procmon/processmonitor.h +++ b/procmon/processmonitor.h @@ -493,7 +493,7 @@ public: /** *@brief run upgrade script */ - int runUpgrade(std::string mysqlpw); + int runUpgrade(); /** *@brief change my.cnf