1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00
This commit is contained in:
David Hill
2018-09-27 15:59:57 -05:00
parent cd848bfc85
commit c86b569c97
8 changed files with 90 additions and 72 deletions

View File

@ -94,7 +94,7 @@ throw runtime_error("CALPONT_INTERNAL_ERROR"); \
#if CSC_DEBUG #if CSC_DEBUG
namespace namespace
{ {
string tmpDir = startup::StartUp::installDir() + "csc.log"; string tmpDir = startup::StartUp::tmpDir() + "/csc.log";
std::ofstream csclog(tmpDir, std::ios::app); std::ofstream csclog(tmpDir, std::ios::app);
} }
#define DEBUG csclog #define DEBUG csclog

View File

@ -170,7 +170,7 @@ rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
#get temp base directory #get temp base directory
tmpDir="/tmp" tmpDir="/tmp"
if [ $user != "root" ]; then if [ $user != "root" ]; then
tmpDir=$HOME"./tmp" tmpDir=$HOME"/.tmp"
mkdir $tmpDir >/dev/null 2>&1 mkdir $tmpDir >/dev/null 2>&1
else else
#get columnstore temp file directory name #get columnstore temp file directory name
@ -264,12 +264,17 @@ else
chown $user:$user $installdir/etc/Columnstore.xml chown $user:$user $installdir/etc/Columnstore.xml
echo "" cat <<EOD
echo "NOTE: For non-root install, you will need to run the following command as root user to"
echo " setup the MariaDB ColumnStore System Logging" NOTE: For non-root install, you will need to run the following commands as root user to
echo "" setup the MariaDB ColumnStore System Logging
echo " $installdir/bin/syslogSetup.sh --installdir=$installdir --user=$user install"
echo "" export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$installdir/bin/syslogSetup.sh --installdir=$installdir --user=$user install
EOD
fi fi
#determine lock file directory #determine lock file directory
@ -315,14 +320,14 @@ The next steps are:
If installing on a pm1 node: If installing on a pm1 node:
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$installdir/bin/postConfigure -i $installdir $installdir/bin/postConfigure -i $installdir
If installing on a non-pm1 using the non-distributed option: If installing on a non-pm1 using the non-distributed option:
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$installdir/bin/columnstore start $installdir/bin/columnstore start
EOD EOD
@ -361,29 +366,29 @@ If you are intending to install MariaDB Columnstore over Hadoop, the next steps
If installing on a pm1 node: If installing on a pm1 node:
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
. $installdir/bin/setenv-hdfs-20 . $installdir/bin/setenv-hdfs-20
$installdir/bin/postConfigure -i $installdir $installdir/bin/postConfigure -i $installdir
If installing on a non-pm1 using the non-distributed option: If installing on a non-pm1 using the non-distributed option:
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$installdir/bin/columnstore start $installdir/bin/columnstore start
If you are intending to install MariaDB Columnstore without Hadoop, the next steps are: If you are intending to install MariaDB Columnstore without Hadoop, the next steps are:
If installing on a pm1 node: If installing on a pm1 node:
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$installdir/bin/postConfigure -i $installdir $installdir/bin/postConfigure -i $installdir
If installing on a non-pm1 using the non-distributed option: If installing on a non-pm1 using the non-distributed option:
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$installdir/bin/columnstore start $installdir/bin/columnstore start
EOD EOD
@ -427,8 +432,8 @@ If you are intending to install MariaDB Columnstore over Hadoop, the next steps
If installing on a pm1 node: If installing on a pm1 node:
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib:$libpath export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
. $installdir/bin/setenv-hdfs-12 . $installdir/bin/setenv-hdfs-12
$installdir/bin/postConfigure -i $installdir $installdir/bin/postConfigure -i $installdir
@ -436,8 +441,8 @@ If you are intending to install MariaDB Columnstore without Hadoop, the next ste
If installing on a pm1 node: If installing on a pm1 node:
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
. $installdir/bin/setenv-hdfs-12 . $installdir/bin/setenv-hdfs-12
$installdir/bin/postConfigure -i $installdir $installdir/bin/postConfigure -i $installdir

View File

@ -34,9 +34,12 @@ done
$installdir/bin/columnstore stop > /dev/null 2>&1 $installdir/bin/columnstore stop > /dev/null 2>&1
$installdir/myql/columnstore-Mysql stop > /dev/null 2>&1 $installdir/myql/columnstore-Mysql stop > /dev/null 2>&1
export COLUMNSTORE_INSTALL_DIR=$installdir if [ $user != "root" ]; then
export COLUMNSTORE_INSTALL_DIR=$installdir
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib
fi
cloud=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation Cloud` cloud=`$installdir/bin/getConfig Installation Cloud`
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
if test -f /etc/fstab ; then if test -f /etc/fstab ; then
sed -i '/Columnstore\/data/d' /etc/fstab > /dev/null 2>&1 sed -i '/Columnstore\/data/d' /etc/fstab > /dev/null 2>&1
@ -76,13 +79,13 @@ $installdir/bin/clearShm > /dev/null 2>&1
tmpDir=`$installdir/bin/getConfig SystemConfig SystemTempFileDir` tmpDir=`$installdir/bin/getConfig SystemConfig SystemTempFileDir`
# delete tmp files # delete tmp files
rm -rf $tmpDir rm -rf $tmpDir/*
rm -f $installdir/local/*.columnstore rm -f $installdir/local/*.columnstore
rm -rf $installdir/local/etc/ rm -rf $installdir/local/etc/
rm -f $installdir/data/bulk${tmpDir}job/* >/dev/null 2>&1 rm -f $installdir/data/bulk${tmpDir}job/* >/dev/null 2>&1
rm -f $installdir/local/moveDbrootTransactionLog rm -f $installdir/local/moveDbrootTransactionLog
lockdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory` lockdir=`$installdir/bin/getConfig Installation LockFileDirectory`
rm -f $lockdir/columnstore rm -f $lockdir/columnstore
rm -f $lockdir/mysql-Columnstore rm -f $lockdir/mysql-Columnstore
@ -138,13 +141,18 @@ if [ $user = "root" ]; then
ldconfig ldconfig
else else
rm -f /etc/default/columnstore rm -f /etc/default/columnstore
echo "" cat <<EOD
echo "NOTE: For non-root install, you will need to run the following command as root user to"
echo " uninstall the MariaDB ColumnStore System Logging" NOTE: For non-root install, you will need to run the following commands as root user to
echo "" uninstall the MariaDB ColumnStore System Logging
echo " $installdir/bin/syslogSetup.sh --installdir=$installdir --user=$user uninstall"
echo "" export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$installdir/bin/syslogSetup.sh --installdir=$installdir --user=$user uninstall
EOD
fi fi

View File

@ -10,7 +10,7 @@ sopt="5"
topt="0" topt="0"
lopt="/tmp/columnstore_tmp_files" lopt="/tmp/columnstore_tmp_files"
while getopts "vs:t:h:l" flag; do while getopts "vs:t:l:h" flag; do
case $flag in case $flag in
v) vflg=1 v) vflg=1
;; ;;
@ -29,7 +29,7 @@ while getopts "vs:t:h:l" flag; do
esac esac
done done
shift $((OPTIND)) shift $((OPTIND-1))
exename="$@" exename="$@"

View File

@ -166,7 +166,8 @@ if [ ! -z "$syslog_conf" ] ; then
if [ "$syslog_conf" == /etc/rsyslog.d/columnstore.conf ] || if [ "$syslog_conf" == /etc/rsyslog.d/columnstore.conf ] ||
[ "$syslog_conf" == /etc/rsyslog.d/49-columnstore.conf ]; then [ "$syslog_conf" == /etc/rsyslog.d/49-columnstore.conf ]; then
i=1
else
rm -f ${syslog_conf}.columnstoreSave rm -f ${syslog_conf}.columnstoreSave
cp ${syslog_conf} ${syslog_conf}.columnstoreSave >/dev/null 2>&1 cp ${syslog_conf} ${syslog_conf}.columnstoreSave >/dev/null 2>&1
sed -i '/# MariaDB/,$d' ${syslog_conf}.columnstoreSave > /dev/null 2>&1 sed -i '/# MariaDB/,$d' ${syslog_conf}.columnstoreSave > /dev/null 2>&1

View File

@ -68,6 +68,7 @@ bool rootUser = true;
string HOME = "/root"; string HOME = "/root";
string SingleServerInstall; string SingleServerInstall;
string tmpDir; string tmpDir;
string installDir;
bool repeatStop; bool repeatStop;
@ -189,7 +190,10 @@ int main(int argc, char* argv[])
string ccHistoryFile = HOME + "/.cc_history"; string ccHistoryFile = HOME + "/.cc_history";
string cf = startup::StartUp::installDir() + "/etc/" + ConsoleCmdsFile; tmpDir = startup::StartUp::tmpDir();
installDir = startup::StartUp::installDir();
string cf = installDir + "/etc/" + ConsoleCmdsFile;
fConfig = Config::makeConfig(cf); fConfig = Config::makeConfig(cf);
// setupSignalHandlers(); // setupSignalHandlers();
@ -236,8 +240,6 @@ int main(int argc, char* argv[])
if (user != 0) if (user != 0)
rootUser = false; rootUser = false;
tmpDir = startup::StartUp::tmpDir();
// create/open command log file if not created // create/open command log file if not created
logFile.open(DEFAULT_LOG_FILE.c_str(), ios::app); logFile.open(DEFAULT_LOG_FILE.c_str(), ios::app);
@ -2600,7 +2602,7 @@ int processCommand(string* arguments)
{ {
string logFile = tmpDir + "/cc-stop.pdsh"; string logFile = tmpDir + "/cc-stop.pdsh";
cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > " + logFile + " 2>&1"; cmd = "pdsh -a '/" + installDir + "/bin/columnstore stop' > " + logFile + " 2>&1";
system(cmd.c_str()); system(cmd.c_str());
if (oam.checkLogStatus(logFile, "exit") ) if (oam.checkLogStatus(logFile, "exit") )
@ -2610,7 +2612,7 @@ int processCommand(string* arguments)
} }
else else
{ {
cmd = startup::StartUp::installDir() + "/bin/columnstore stop > " + tmpDir + "/status.log"; cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/status.log";
system(cmd.c_str()); system(cmd.c_str());
} }
} }
@ -2620,7 +2622,7 @@ int processCommand(string* arguments)
if ( gracefulTemp == FORCEFUL ) if ( gracefulTemp == FORCEFUL )
{ {
cmd = startup::StartUp::installDir() + "/bin/columnstore stop > " + tmpDir + "/status.log"; cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/status.log";
system(cmd.c_str()); system(cmd.c_str());
cout << endl << " Successful shutdown of System (stopped local columnstore service) " << endl << endl; cout << endl << " Successful shutdown of System (stopped local columnstore service) " << endl << endl;
} }
@ -2628,7 +2630,7 @@ int processCommand(string* arguments)
if (Failed.find("Connection refused") != string::npos) if (Failed.find("Connection refused") != string::npos)
{ {
cout << endl << "**** shutdownSystem Error : ProcessManager not Active, stopping columnstore service" << endl; cout << endl << "**** shutdownSystem Error : ProcessManager not Active, stopping columnstore service" << endl;
cmd = startup::StartUp::installDir() + "/bin/columnstore stop > " + tmpDir + "/status.log"; cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/status.log";
system(cmd.c_str()); system(cmd.c_str());
cout << endl << " Successful stop of local columnstore service " << endl << endl; cout << endl << " Successful stop of local columnstore service " << endl << endl;
} }
@ -2650,7 +2652,7 @@ int processCommand(string* arguments)
if ( DBRootStorageType == "hdfs") if ( DBRootStorageType == "hdfs")
{ {
string logFile = tmpDir + "cc-stop.pdsh"; string logFile = tmpDir + "cc-stop.pdsh";
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > " + logFile + " 2>&1"; cmd = "pdsh -a '" + installDir + "/bin/columnstore stop' > " + logFile + " 2>&1";
system(cmd.c_str()); system(cmd.c_str());
if (oam.checkLogStatus(logFile, "exit") ) if (oam.checkLogStatus(logFile, "exit") )
@ -2757,7 +2759,7 @@ int processCommand(string* arguments)
if ( DBRootStorageType == "hdfs") if ( DBRootStorageType == "hdfs")
{ {
string logFile = tmpDir + "/cc-restart.pdsh"; string logFile = tmpDir + "/cc-restart.pdsh";
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > " + logFile + " 2>&1"; cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > " + logFile + " 2>&1";
system(cmd.c_str()); system(cmd.c_str());
if (oam.checkLogStatus(logFile, "exit") ) if (oam.checkLogStatus(logFile, "exit") )
@ -2794,7 +2796,7 @@ int processCommand(string* arguments)
if ( modulename == localModule ) if ( modulename == localModule )
{ {
cmd = startup::StartUp::installDir() + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1"; cmd = installDir + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1";
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0) if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0)
@ -2812,7 +2814,7 @@ int processCommand(string* arguments)
for ( ; pt1 != (*pt).hostConfigList.end() ; pt1++) for ( ; pt1 != (*pt).hostConfigList.end() ; pt1++)
{ {
//run remote command script //run remote command script
cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " '" + startup::StartUp::installDir() + "/bin/columnstore restart' 0"; cmd = installDir + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " '" + installDir + "/bin/columnstore restart' 0";
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) < 0) if (WEXITSTATUS(rtnCode) < 0)
@ -2821,7 +2823,7 @@ int processCommand(string* arguments)
cout << endl << "**** startSystem Failed" << endl; cout << endl << "**** startSystem Failed" << endl;
// stop local columnstore service // stop local columnstore service
cmd = startup::StartUp::installDir() + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1"; cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1";
system(cmd.c_str()); system(cmd.c_str());
FAILED = true; FAILED = true;
@ -2835,7 +2837,7 @@ int processCommand(string* arguments)
cout << endl << "**** startSystem Failed" << endl; cout << endl << "**** startSystem Failed" << endl;
// stop local columnstore service // stop local columnstore service
cmd = startup::StartUp::installDir() + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1"; cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1";
system(cmd.c_str()); system(cmd.c_str());
FAILED = true; FAILED = true;
@ -2861,7 +2863,7 @@ int processCommand(string* arguments)
//just kick off local server //just kick off local server
cout << endl << " System being started, please wait..."; cout << endl << " System being started, please wait...";
cout.flush(); cout.flush();
cmd = startup::StartUp::installDir() + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1"; cmd = installDir + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1";
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0) if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0)
@ -2999,7 +3001,7 @@ int processCommand(string* arguments)
if ( DBRootStorageType == "hdfs") if ( DBRootStorageType == "hdfs")
{ {
string logFile = tmpDir + "/cc-restart.pdsh"; string logFile = tmpDir + "/cc-restart.pdsh";
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > " + logFile + " 2>&1"; cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > " + logFile + " 2>&1";
system(cmd.c_str()); system(cmd.c_str());
if (oam.checkLogStatus(logFile, "exit") ) if (oam.checkLogStatus(logFile, "exit") )
@ -3042,7 +3044,7 @@ int processCommand(string* arguments)
for ( ; pt1 != (*pt).hostConfigList.end() ; pt1++) for ( ; pt1 != (*pt).hostConfigList.end() ; pt1++)
{ {
//run remote command script //run remote command script
cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " '" + startup::StartUp::installDir() + "/bin/columnstore restart' 0"; cmd = installDir + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " '" + installDir + "/bin/columnstore restart' 0";
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
@ -3052,7 +3054,7 @@ int processCommand(string* arguments)
cout << endl << "**** restartSystem Failed" << endl; cout << endl << "**** restartSystem Failed" << endl;
// stop local columnstore service // stop local columnstore service
cmd = startup::StartUp::installDir() + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1"; cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1";
system(cmd.c_str()); system(cmd.c_str());
FAILED = true; FAILED = true;
@ -3067,7 +3069,7 @@ int processCommand(string* arguments)
FAILED = true; FAILED = true;
// stop local columnstore service // stop local columnstore service
cmd = startup::StartUp::installDir() + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1"; cmd = installDir + "/bin/columnstore stop > " + tmpDir + "/stop.log 2>&1";
system(cmd.c_str()); system(cmd.c_str());
break; break;
@ -3083,7 +3085,7 @@ int processCommand(string* arguments)
break; break;
//RESTART LOCAL HOST //RESTART LOCAL HOST
cmd = startup::StartUp::installDir() + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1"; cmd = installDir + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1";
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0) if (geteuid() == 0 && WEXITSTATUS(rtnCode) != 0)
@ -3103,7 +3105,7 @@ int processCommand(string* arguments)
//just kick off local server //just kick off local server
cout << " System being restarted, please wait..."; cout << " System being restarted, please wait...";
cout.flush(); cout.flush();
cmd = startup::StartUp::installDir() + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1"; cmd = installDir + "/bin/columnstore restart > " + tmpDir + "/start.log 2>&1";
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) if (WEXITSTATUS(rtnCode) != 0)
@ -4926,10 +4928,10 @@ int processCommand(string* arguments)
case 39: // getSystemDirectories case 39: // getSystemDirectories
{ {
cout << endl << "System Installation and Temporary Logging Directories" << endl << endl; cout << endl << "System Installation and Temporary File Directories" << endl << endl;
cout << "System Installation Directory = " << startup::StartUp::installDir() << endl; cout << "System Installation Directory = " << installDir << endl;
cout << "System Temporary Logging Directory = " << tmpDir << endl << endl; cout << "System Temporary File Directory = " << tmpDir << endl << endl;
} }
break; break;
@ -6148,13 +6150,13 @@ int processCommand(string* arguments)
++it) ++it)
{ {
string deviceName = *it; string deviceName = *it;
string entry = deviceName + " " + startup::StartUp::installDir() + "/gluster/brick" + oam.itoa(brickID) + " " + deviceType + " defaults 1 2"; string entry = deviceName + " " + installDir + "/gluster/brick" + oam.itoa(brickID) + " " + deviceType + " defaults 1 2";
//send update pm //send update pm
oam.distributeFstabUpdates(entry, moduleName); oam.distributeFstabUpdates(entry, moduleName);
} }
} }
string command = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*hostConfigIter).IPAddr + " " + password + " 'mkdir -p " + startup::StartUp::installDir() + "/gluster/brick" + oam.itoa(brickID) + "'"; string command = installDir + "/bin/remote_command.sh " + (*hostConfigIter).IPAddr + " " + password + " 'mkdir -p " + installDir + "/gluster/brick" + oam.itoa(brickID) + "'";
system(command.c_str()); system(command.c_str());
brickID++; brickID++;
} }
@ -7866,7 +7868,7 @@ int processCommand(string* arguments)
oam.startModule(devicenetworklist, ackTemp); oam.startModule(devicenetworklist, ackTemp);
//reload DBRM with new configuration, needs to be done here after startModule //reload DBRM with new configuration, needs to be done here after startModule
cmd = startup::StartUp::installDir() + "/bin/dbrmctl reload > /dev/null 2>&1"; cmd = installDir + "/bin/dbrmctl reload > /dev/null 2>&1";
system(cmd.c_str()); system(cmd.c_str());
sleep(15); sleep(15);
@ -8182,7 +8184,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
//run remote command script //run remote command script
HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); HostConfigList::iterator pt1 = (*pt).hostConfigList.begin();
cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ; cmd = installDir + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ;
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) if (WEXITSTATUS(rtnCode) != 0)
@ -8301,7 +8303,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); HostConfigList::iterator pt1 = (*pt).hostConfigList.begin();
string ipAddr = (*pt1).IPAddr; string ipAddr = (*pt1).IPAddr;
//run remote command script //run remote command script
cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ; cmd = installDir + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ;
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) if (WEXITSTATUS(rtnCode) != 0)
@ -9427,7 +9429,7 @@ void printModuleDisk(ModuleDisk moduledisk)
cout << "Mount Point Total Blocks Used Blocks Usage %" << endl; cout << "Mount Point Total Blocks Used Blocks Usage %" << endl;
cout << "----------------------------- ------------ ------------ -------" << endl; cout << "----------------------------- ------------ ------------ -------" << endl;
string etcdir = startup::StartUp::installDir() + "/etc"; string etcdir = installDir + "/etc";
for ( unsigned int i = 0 ; i < moduledisk.diskusage.size(); i++) for ( unsigned int i = 0 ; i < moduledisk.diskusage.size(); i++)
{ {
@ -9468,7 +9470,7 @@ void printModuleDisk(ModuleDisk moduledisk)
void printModuleResources(TopProcessCpuUsers topprocesscpuusers, ModuleCpu modulecpu, TopProcessMemoryUsers topprocessmemoryusers, ModuleMemory modulememory, ModuleDisk moduledisk) void printModuleResources(TopProcessCpuUsers topprocesscpuusers, ModuleCpu modulecpu, TopProcessMemoryUsers topprocessmemoryusers, ModuleMemory modulememory, ModuleDisk moduledisk)
{ {
Oam oam; Oam oam;
string etcdir = startup::StartUp::installDir() + "/etc"; string etcdir = installDir + "/etc";
cout << endl << "Module '" + topprocesscpuusers.ModuleName + "' Resource Usage" << endl << endl; cout << endl << "Module '" + topprocesscpuusers.ModuleName + "' Resource Usage" << endl << endl;

View File

@ -3621,7 +3621,7 @@ int main(int argc, char* argv[])
if ( remote_installer_debug == "1" ) if ( remote_installer_debug == "1" )
{ {
logfile = tmpDir; logfile = tmpDir + "/";
logfile += remoteModuleName + "_" + EEPackageType + "_install.log"; logfile += remoteModuleName + "_" + EEPackageType + "_install.log";
debug_logfile = " > " + logfile; debug_logfile = " > " + logfile;
} }
@ -3928,7 +3928,7 @@ int main(int argc, char* argv[])
if (hdfs && !nonDistribute ) if (hdfs && !nonDistribute )
{ {
string postConfigurePsdhLog = tmpDir + "postConfigure.pdsh.log"; string postConfigurePsdhLog = tmpDir + "/postConfigure.pdsh.log";
cout << endl << "----- Starting MariaDB ColumnStore Service on all Modules -----" << endl << endl; cout << endl << "----- Starting MariaDB ColumnStore Service on all Modules -----" << endl << endl;
string cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > " + postConfigurePsdhLog + " 2>&1"; string cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > " + postConfigurePsdhLog + " 2>&1";
@ -4022,7 +4022,7 @@ int main(int argc, char* argv[])
} }
} }
string dbbuilderLog = tmpDir + "dbbuilder.log"; string dbbuilderLog = tmpDir + "/dbbuilder.log";
if (hdfs) if (hdfs)
cmd = "bash -c '. " + installDir + "/bin/" + DataFileEnvFile + ";" + installDir + "/bin/dbbuilder 7 > " + dbbuilderLog; cmd = "bash -c '. " + installDir + "/bin/" + DataFileEnvFile + ";" + installDir + "/bin/dbbuilder 7 > " + dbbuilderLog;

View File

@ -124,7 +124,9 @@ const string StartUp::tmpDir()
else else
{ {
// non-root user // non-root user
*fTmpDirp = homedir + "/.tmp"; fTmpDirp = new string(homedir);
*fTmpDirp = *fTmpDirp + "/.tmp";
} }
#endif #endif