You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-520
This commit is contained in:
@ -55,7 +55,7 @@ namespace execplan
|
|||||||
* default value is 1000.
|
* default value is 1000.
|
||||||
* SessionManager/SharedMemoryTmpFile: the file to store the shared memory segment
|
* SessionManager/SharedMemoryTmpFile: the file to store the shared memory segment
|
||||||
* data in between invocations if DESTROYSHMSEG is defined below. The
|
* data in between invocations if DESTROYSHMSEG is defined below. The
|
||||||
* default is /tmp/CalpontShm.
|
* default is /tmp/ColumnstoreShm.
|
||||||
* SessionManager/TxnIDFile: the file to store the last transaction ID issued
|
* SessionManager/TxnIDFile: the file to store the last transaction ID issued
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -2720,16 +2720,16 @@ int ha_calpont_impl_rnd_init(TABLE* table)
|
|||||||
#ifdef DEBUG_SETENV
|
#ifdef DEBUG_SETENV
|
||||||
string home(getenv("HOME"));
|
string home(getenv("HOME"));
|
||||||
|
|
||||||
if (!getenv("CALPONT_HOME"))
|
if (!getenv("COLUMNSTORE_HOME"))
|
||||||
{
|
{
|
||||||
string calpontHome(home + "/Calpont/etc/");
|
string calpontHome(home + "/Calpont/etc/");
|
||||||
setenv("CALPONT_HOME", calpontHome.c_str(), 1);
|
setenv("COLUMNSTORE_HOME", calpontHome.c_str(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!getenv("CALPONT_CONFIG_FILE"))
|
if (!getenv("COLUMNSTORE_CONFIG_FILE"))
|
||||||
{
|
{
|
||||||
string calpontConfigFile(home + "/Calpont/etc/Columnstore.xml");
|
string calpontConfigFile(home + "/mariadb/columnstore/etc/Columnstore.xml");
|
||||||
setenv("CALPONT_CONFIG_FILE", calpontConfigFile.c_str(), 1);
|
setenv("COLUMNSTORE_CONFIG_FILE", calpontConfigFile.c_str(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!getenv("CALPONT_CSC_IDENT"))
|
if (!getenv("CALPONT_CSC_IDENT"))
|
||||||
|
@ -249,9 +249,9 @@
|
|||||||
<ExternalCriticalThreshold>90</ExternalCriticalThreshold>
|
<ExternalCriticalThreshold>90</ExternalCriticalThreshold>
|
||||||
<ExternalMajorThreshold>80</ExternalMajorThreshold>
|
<ExternalMajorThreshold>80</ExternalMajorThreshold>
|
||||||
<ExternalMinorThreshold>70</ExternalMinorThreshold>
|
<ExternalMinorThreshold>70</ExternalMinorThreshold>
|
||||||
<!-- <TempDiskPath>/tmp</TempDiskPath>
|
<!-- <TempDiskPath>${tmpDir}</TempDiskPath>
|
||||||
<WorkingDir>/tmp</WorkingDir>
|
<WorkingDir>${tmpDir}</WorkingDir>
|
||||||
<TempFileDir>/tmp/columnstore_tmp_files</TempFileDir>
|
<TempFileDir>${tmpDir}/columnstore_tmp_files</TempFileDir>
|
||||||
-->
|
-->
|
||||||
<TransactionArchivePeriod>10</TransactionArchivePeriod>
|
<TransactionArchivePeriod>10</TransactionArchivePeriod>
|
||||||
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
||||||
@ -269,7 +269,7 @@
|
|||||||
-->
|
-->
|
||||||
<hdfsRdwrScratch>/rdwrscratch</hdfsRdwrScratch> <!-- Do not set to an hdfs file path -->
|
<hdfsRdwrScratch>/rdwrscratch</hdfsRdwrScratch> <!-- Do not set to an hdfs file path -->
|
||||||
<TempFileDir>/columnstore_tmp_files</TempFileDir>
|
<TempFileDir>/columnstore_tmp_files</TempFileDir>
|
||||||
<SystemTempFileDir>/tmp/columnstore_tmp_files</SystemTempFileDir>
|
<SystemTempFileDir>${tmpDir}/columnstore_tmp_files</SystemTempFileDir>
|
||||||
</SystemConfig>
|
</SystemConfig>
|
||||||
<SystemModuleConfig>
|
<SystemModuleConfig>
|
||||||
<ModuleType1>dm</ModuleType1>
|
<ModuleType1>dm</ModuleType1>
|
||||||
@ -495,7 +495,7 @@
|
|||||||
<!-- Be careful modifying TempFilePath! On start, ExeMgr deletes
|
<!-- Be careful modifying TempFilePath! On start, ExeMgr deletes
|
||||||
the entire directory and recreates it to make sure no
|
the entire directory and recreates it to make sure no
|
||||||
files are left behind. -->
|
files are left behind. -->
|
||||||
<TempFilePath>$INSTALLDIR/tmp</TempFilePath>
|
<TempFilePath>$INSTALLDIR${tmpDir}</TempFilePath>
|
||||||
<TempFileCompression>Y</TempFileCompression>
|
<TempFileCompression>Y</TempFileCompression>
|
||||||
</HashJoin>
|
</HashJoin>
|
||||||
<JobList>
|
<JobList>
|
||||||
|
@ -79,7 +79,7 @@ tmpDir=`$installdir/bin/getConfig SystemConfig SystemTempFileDir`
|
|||||||
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/tmpjob/* >/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=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory`
|
||||||
|
@ -43,6 +43,9 @@ using namespace execplan;
|
|||||||
|
|
||||||
#include "installdir.h"
|
#include "installdir.h"
|
||||||
|
|
||||||
|
string tmpDir;
|
||||||
|
string logFile;
|
||||||
|
|
||||||
enum BUILD_OPTION
|
enum BUILD_OPTION
|
||||||
{
|
{
|
||||||
SYSCATALOG_ONLY = 7, //Create systables only
|
SYSCATALOG_ONLY = 7, //Create systables only
|
||||||
@ -54,8 +57,10 @@ namespace
|
|||||||
int setUp()
|
int setUp()
|
||||||
{
|
{
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
(void)system("/bin/rm -f /tmp/dbbuilder.status >/dev/null 2>&1");
|
string cmd = "/bin/rm -f " + logFile + " >/dev/null 2>&1";
|
||||||
(void)system("/bin/touch /tmp/dbbuilder.status >/dev/null 2>&1");
|
(void)system(cmd.c_str());
|
||||||
|
cmd = "/bin/touch -f " + logFile + " >/dev/null 2>&1";
|
||||||
|
(void)system(cmd.c_str());
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -69,7 +74,8 @@ int checkNotThere(WriteEngine::FID fid)
|
|||||||
|
|
||||||
void tearDown()
|
void tearDown()
|
||||||
{
|
{
|
||||||
unlink("/tmp/oidbitmap");
|
string file = tmpDir + "/oidbitmap";
|
||||||
|
unlink(file.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void usage()
|
void usage()
|
||||||
@ -173,6 +179,10 @@ int main(int argc, char* argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//get tmp log directory
|
||||||
|
tmpDir = startup::StartUp::tmpDir();
|
||||||
|
logFile = tmpDir + "/dbbuilder.status";
|
||||||
|
|
||||||
buildOption = atoi(argv[optind++]);
|
buildOption = atoi(argv[optind++]);
|
||||||
|
|
||||||
if (buildOption != 7 && !fFlg)
|
if (buildOption != 7 && !fFlg)
|
||||||
@ -187,7 +197,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
bool canWrite = true;
|
bool canWrite = true;
|
||||||
|
|
||||||
if (access("/tmp/dbbuilder.status", W_OK) != 0)
|
if (access(logFile.c_str(), W_OK) != 0)
|
||||||
canWrite = false;
|
canWrite = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -196,7 +206,7 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
string cmd = "echo 'FAILED: buildOption=" +
|
string cmd = "echo 'FAILED: buildOption=" +
|
||||||
oam.itoa(buildOption) +
|
oam.itoa(buildOption) +
|
||||||
"' > /tmp/dbbuilder.status";
|
"' > " + logFile;
|
||||||
|
|
||||||
if (canWrite)
|
if (canWrite)
|
||||||
(void)system(cmd.c_str());
|
(void)system(cmd.c_str());
|
||||||
@ -230,7 +240,7 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
catch (const exception& ex)
|
catch (const exception& ex)
|
||||||
{
|
{
|
||||||
string cmd(string("echo 'FAILED: ") + ex.what() + "' > /tmp/dbbuilder.status");
|
string cmd(string("echo 'FAILED: ") + ex.what() + "' > " + logFile);
|
||||||
|
|
||||||
if (canWrite)
|
if (canWrite)
|
||||||
(void)system(cmd.c_str());
|
(void)system(cmd.c_str());
|
||||||
@ -242,7 +252,7 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
string cmd = "echo 'FAILED: HDFS checking.' > /tmp/dbbuilder.status";
|
string cmd = "echo 'FAILED: HDFS checking.' > " + logFile;
|
||||||
|
|
||||||
if (canWrite)
|
if (canWrite)
|
||||||
(void)system(cmd.c_str());
|
(void)system(cmd.c_str());
|
||||||
@ -261,7 +271,7 @@ int main(int argc, char* argv[])
|
|||||||
SystemCatalog sysCatalog;
|
SystemCatalog sysCatalog;
|
||||||
sysCatalog.build();
|
sysCatalog.build();
|
||||||
|
|
||||||
std::string cmd = "echo 'OK: buildOption=" + oam.itoa(buildOption) + "' > /tmp/dbbuilder.status";
|
std::string cmd = "echo 'OK: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
|
||||||
|
|
||||||
if (canWrite)
|
if (canWrite)
|
||||||
(void)system(cmd.c_str());
|
(void)system(cmd.c_str());
|
||||||
@ -296,7 +306,7 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
catch (exception& ex)
|
catch (exception& ex)
|
||||||
{
|
{
|
||||||
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > /tmp/dbbuilder.status";
|
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
|
||||||
|
|
||||||
if (canWrite)
|
if (canWrite)
|
||||||
(void)system(cmd.c_str());
|
(void)system(cmd.c_str());
|
||||||
@ -307,7 +317,7 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > /tmp/dbbuilder.status";
|
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
|
||||||
|
|
||||||
if (canWrite)
|
if (canWrite)
|
||||||
(void)system(cmd.c_str());
|
(void)system(cmd.c_str());
|
||||||
|
@ -6,7 +6,7 @@ def find_paths():
|
|||||||
|
|
||||||
"""Find DBRoot and BulkRoot."""
|
"""Find DBRoot and BulkRoot."""
|
||||||
try:
|
try:
|
||||||
config_file = os.environ['CALPONT_CONFIG_FILE']
|
config_file = os.environ['COLUMNSTORE_CONFIG_FILE']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
try:
|
try:
|
||||||
config_file = '/usr/local/mariadb/columnstore/etc'
|
config_file = '/usr/local/mariadb/columnstore/etc'
|
||||||
|
@ -18,6 +18,9 @@ if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
|||||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#get temp directory
|
||||||
|
tmpDir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||||
|
|
||||||
checkContinue() {
|
checkContinue() {
|
||||||
|
|
||||||
if [ "$CHECK" = false ]; then
|
if [ "$CHECK" = false ]; then
|
||||||
@ -69,7 +72,6 @@ helpPrint () {
|
|||||||
echo " Firewall settings"
|
echo " Firewall settings"
|
||||||
echo " Date/time settings"
|
echo " Date/time settings"
|
||||||
echo " Dependent packages installed"
|
echo " Dependent packages installed"
|
||||||
echo " For non-root user install - test permissions on /tmp and /dev/shm"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo "OPTIONS:"
|
echo "OPTIONS:"
|
||||||
@ -203,23 +205,23 @@ checkLocalOS()
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
#get local OS
|
#get local OS
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/os_detect.sh > /tmp/os_detect 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/os_detect.sh > ${tmpDir}/os_detect 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
localOS=`cat /tmp/os_detect | grep "Operating System name" | cut -f2 -d '"'`
|
localOS=`cat ${tmpDir}/os_detect | grep "Operating System name" | cut -f2 -d '"'`
|
||||||
echo "Local Node OS System Name : $localOS"
|
echo "Local Node OS System Name : $localOS"
|
||||||
|
|
||||||
if [ "$OS" != "" ] ; then
|
if [ "$OS" != "" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Local Node OS Versions doesn't match the command line OS argument"
|
echo "Local Node OS Versions doesn't match the command line OS argument"
|
||||||
echo "Contining using the Detected Local Node OS Version"
|
echo "Contining using the Detected Local Node OS Version"
|
||||||
OS=`cat /tmp/os_detect | grep "Operating System tag" | cut -f4 -d " "`
|
OS=`cat ${tmpDir}/os_detect | grep "Operating System tag" | cut -f4 -d " "`
|
||||||
|
|
||||||
echo "Local Node OS Version : $OS"
|
echo "Local Node OS Version : $OS"
|
||||||
else
|
else
|
||||||
OS=`cat /tmp/os_detect | grep "Operating System tag" | cut -f4 -d " "`
|
OS=`cat ${tmpDir}/os_detect | grep "Operating System tag" | cut -f4 -d " "`
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
localOS=`cat /tmp/os_detect | grep "Operating System name" | cut -f2 -d '"'`
|
localOS=`cat ${tmpDir}/os_detect | grep "Operating System name" | cut -f2 -d '"'`
|
||||||
echo "Local Node OS System Name : $localOS"
|
echo "Local Node OS System Name : $localOS"
|
||||||
|
|
||||||
if [ "$OS" == "" ] ; then
|
if [ "$OS" == "" ] ; then
|
||||||
@ -269,16 +271,16 @@ checkLocalDir()
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
#remove any check tmp files from previous runs
|
#remove any check tmp files from previous runs
|
||||||
`rm -f /tmp/*_check > /dev/null 2>&1`
|
`rm -f ${tmpDir}/*_check > /dev/null 2>&1`
|
||||||
|
|
||||||
#check /tmp and /dev/shm
|
#check ${tmpDir} and /dev/shm
|
||||||
pass=true
|
pass=true
|
||||||
`touch /tmp/cs_check > /dev/null 2>&1`
|
`touch ${tmpDir}/cs_check > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "Local Node permission test on /tmp : Passed"
|
echo "Local Node permission test on ${tmpDir} : Passed"
|
||||||
`rm -f /tmp/cs_check`
|
`rm -f ${tmpDir}/cs_check`
|
||||||
else
|
else
|
||||||
echo "Local Node permission test on /tmp : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
echo "Local Node permission test on ${tmpDir} : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -349,10 +351,10 @@ checkRemoteDir()
|
|||||||
#
|
#
|
||||||
# remove old _check tmp files from remote servers
|
# remove old _check tmp files from remote servers
|
||||||
|
|
||||||
`rm -f /tmp/*_check > /dev/null 2>&1`
|
`rm -f ${tmpDir}/*_check > /dev/null 2>&1`
|
||||||
|
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f /tmp/*_check > /dev/null 2>&1' 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f ${tmpDir}/*_check > /dev/null 2>&1' 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$USER" != "root" ]; then
|
if [ "$USER" != "root" ]; then
|
||||||
@ -363,26 +365,26 @@ checkRemoteDir()
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'touch /tmp/cs_check' 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'touch ${tmpDir}/cs_check' 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
||||||
`grep "Permission denied" /tmp/remote_command_check > /dev/null 2>&1`
|
`grep "Permission denied" ${tmpDir}/remote_command_check > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "$ipadd Node permission test on /tmp : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
echo "$ipadd Node permission test on ${tmpDir} : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "$ipadd Node permission test on /tmp : Passed"
|
echo "$ipadd Node permission test on ${tmpDir} : Passed"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
|
echo "Error running remote_command.sh to $ipadd Node, check ${tmpDir}/remote_command_check"
|
||||||
pass=false
|
pass=false
|
||||||
REPORTPASS=false
|
REPORTPASS=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'touch /dev/shm/cs_check' 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'touch /dev/shm/cs_check' 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
||||||
`grep "Permission denied" /tmp/remote_command_check > /dev/null 2>&1`
|
`grep "Permission denied" ${tmpDir}/remote_command_check > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "$ipadd Node permission test on /dev/shm : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
echo "$ipadd Node permission test on /dev/shm : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
||||||
pass=false
|
pass=false
|
||||||
@ -391,7 +393,7 @@ checkRemoteDir()
|
|||||||
echo "$ipadd Node permission test on /dev/shm : Passed"
|
echo "$ipadd Node permission test on /dev/shm : Passed"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
|
echo "Error running remote_command.sh to $ipadd Node, check ${tmpDir}/remote_command_check"
|
||||||
pass=false
|
pass=false
|
||||||
REPORTPASS=false
|
REPORTPASS=false
|
||||||
fi
|
fi
|
||||||
@ -415,20 +417,20 @@ checkOS()
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
pass=true
|
pass=true
|
||||||
`/bin/cp -f $COLUMNSTORE_INSTALL_DIR/bin/os_detect.sh /tmp/.`
|
`/bin/cp -f $COLUMNSTORE_INSTALL_DIR/bin/os_detect.sh ${tmpDir}/.`
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_put.sh $ipadd $PASSWORD /tmp/os_detect.sh 1 > /tmp/remote_scp_put_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_put.sh $ipadd $PASSWORD ${tmpDir}/os_detect.sh 1 > ${tmpDir}/remote_scp_put_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_put.sh to $ipadd Node, check /tmp/remote_scp_put_check"
|
echo "Error running remote_scp_put.sh to $ipadd Node, check ${tmpDir}/remote_scp_put_check"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD /tmp/os_detect.sh 1 > /tmp/remote_command_check`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD ${tmpDir}/os_detect.sh 1 > ${tmpDir}/remote_command_check`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_command.sh /tmp/os_detect.sh on $ipadd Node, check /tmp/remote_command_check"
|
echo "Error running remote_command.sh ${tmpDir}/os_detect.sh on $ipadd Node, check ${tmpDir}/remote_command_check"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
remoteOS=`cat /tmp/remote_command_check | grep "Operating System name" | cut -f2 -d '"'`
|
remoteOS=`cat ${tmpDir}/remote_command_check | grep "Operating System name" | cut -f2 -d '"'`
|
||||||
echo "$ipadd Node OS Version : $remoteOS"
|
echo "$ipadd Node OS Version : $remoteOS"
|
||||||
if [ $localOS != $remoteOS ]; then
|
if [ $localOS != $remoteOS ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd has a different OS than local node"
|
echo "${bold}Failed${normal}, $ipadd has a different OS than local node"
|
||||||
@ -453,25 +455,25 @@ checkLocale()
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
#get local Locale
|
#get local Locale
|
||||||
`locale | grep LANG= > /tmp/locale_check 2>&1`
|
`locale | grep LANG= > ${tmpDir}/locale_check 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "Local Node Locale : `cat /tmp/locale_check`"
|
echo "Local Node Locale : `cat ${tmpDir}/locale_check`"
|
||||||
else
|
else
|
||||||
echo "Error running 'locale' command on local node"
|
echo "Error running 'locale' command on local node"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pass=true
|
pass=true
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'locale | grep LANG= > /tmp/locale_check 2>&1' 1 > /tmp/remote_command_check`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'locale | grep LANG= > ${tmpDir}/locale_check 2>&1' 1 > ${tmpDir}/remote_command_check`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/locale_check > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/locale_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "$ipadd Node Locale : `cat locale_check`"
|
echo "$ipadd Node Locale : `cat locale_check`"
|
||||||
`diff /tmp/locale_check locale_check > /dev/null 2>&1`
|
`diff ${tmpDir}/locale_check locale_check > /dev/null 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd has a different Locale setting than local node"
|
echo "${bold}Failed${normal}, $ipadd has a different Locale setting than local node"
|
||||||
pass=false
|
pass=false
|
||||||
@ -480,7 +482,7 @@ checkLocale()
|
|||||||
`rm -f locale_check`
|
`rm -f locale_check`
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
|
echo "Error running remote_command.sh to $ipadd Node, check ${tmpDir}/remote_command_check"
|
||||||
exit 1
|
exit 1
|
||||||
pass=false
|
pass=false
|
||||||
REPORTPASS=false
|
REPORTPASS=false
|
||||||
@ -538,7 +540,7 @@ checkLocalSELINUX()
|
|||||||
pass=true
|
pass=true
|
||||||
#check local SELINUX
|
#check local SELINUX
|
||||||
if [ -f /etc/selinux/config ]; then
|
if [ -f /etc/selinux/config ]; then
|
||||||
`cat /etc/selinux/config | grep SELINUX | grep enforcing > /tmp/selinux_check 2>&1`
|
`cat /etc/selinux/config | grep SELINUX | grep enforcing > ${tmpDir}/selinux_check 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Warning${normal}, Local Node SELINUX setting is Enabled, check port test results"
|
echo "${bold}Warning${normal}, Local Node SELINUX setting is Enabled, check port test results"
|
||||||
pass=false
|
pass=false
|
||||||
@ -565,9 +567,9 @@ checkUMASK()
|
|||||||
pass=true
|
pass=true
|
||||||
|
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f UMASKtest;touch UMASKtest;echo $(stat -c "%A" "UMASKtest") > test.log' > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f UMASKtest;touch UMASKtest;echo $(stat -c "%A" "UMASKtest") > test.log' > ${tmpDir}/remote_command_check 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd Calpont1 test.log >> /tmp/remote_scp_get 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd Calpont1 test.log >> ${tmpDir}/remote_scp_get 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
permission=`cat test.log`
|
permission=`cat test.log`
|
||||||
result=${permission:4:1}
|
result=${permission:4:1}
|
||||||
@ -584,11 +586,11 @@ checkUMASK()
|
|||||||
pass=false
|
pass=false
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "${bold}Warning${normal}, $ipadd UMASK test failed, remote_scp_get.sh error, check /tmp/remote_scp_get"
|
echo "${bold}Warning${normal}, $ipadd UMASK test failed, remote_scp_get.sh error, check ${tmpDir}/remote_scp_get"
|
||||||
pass=false
|
pass=false
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "${bold}Warning${normal}, $ipadd UMASK test failed, remote_command.sh error, check /tmp/remote_command_check"
|
echo "${bold}Warning${normal}, $ipadd UMASK test failed, remote_command.sh error, check ${tmpDir}/remote_command_check"
|
||||||
pass=false
|
pass=false
|
||||||
fi
|
fi
|
||||||
`rm -f test.log`
|
`rm -f test.log`
|
||||||
@ -611,11 +613,11 @@ checkSELINUX()
|
|||||||
|
|
||||||
pass=true
|
pass=true
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /etc/selinux/config > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /etc/selinux/config > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "$ipadd Node SELINUX setting is Not Enabled"
|
echo "$ipadd Node SELINUX setting is Not Enabled"
|
||||||
else
|
else
|
||||||
`cat config | grep SELINUX | grep enforcing > /tmp/selinux_check 2>&1`
|
`cat config | grep SELINUX | grep enforcing > ${tmpDir}/selinux_check 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Warning${normal}, $ipadd SELINUX setting is Enabled, check port test results"
|
echo "${bold}Warning${normal}, $ipadd SELINUX setting is Enabled, check port test results"
|
||||||
pass=false
|
pass=false
|
||||||
@ -644,12 +646,12 @@ checkFirewalls()
|
|||||||
#check local FIREWALLS
|
#check local FIREWALLS
|
||||||
for firewall in "${FIREWALL_LIST[@]}"; do
|
for firewall in "${FIREWALL_LIST[@]}"; do
|
||||||
pass=true
|
pass=true
|
||||||
`service $firewall status > /tmp/firewall1_check 2>&1`
|
`service $firewall status > ${tmpDir}/firewall1_check 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Warning${normal}, Local Node $firewall service is Active, check port test results"
|
echo "${bold}Warning${normal}, Local Node $firewall service is Active, check port test results"
|
||||||
pass=false
|
pass=false
|
||||||
else
|
else
|
||||||
`systemctl status $firewall > /tmp/firewall1_check 2>&1`
|
`systemctl status $firewall > ${tmpDir}/firewall1_check 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Warning${normal}, Local Node $firewall service is Active, check port test results"
|
echo "${bold}Warning${normal}, Local Node $firewall service is Active, check port test results"
|
||||||
pass=false
|
pass=false
|
||||||
@ -667,12 +669,12 @@ checkFirewalls()
|
|||||||
# 'sysconfig not on remote node
|
# 'sysconfig not on remote node
|
||||||
for firewall in "${FIREWALL_LIST[@]}"; do
|
for firewall in "${FIREWALL_LIST[@]}"; do
|
||||||
pass=true
|
pass=true
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "service '$firewall' status > /tmp/firewall_check 2>&1" 1 > /tmp/remote_command_check`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "service '$firewall' status > ${tmpDir}/firewall_check 2>&1" 1 > ${tmpDir}/remote_command_check`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Warning${normal}, $ipadd Node $firewall service is Active, check port test results"
|
echo "${bold}Warning${normal}, $ipadd Node $firewall service is Active, check port test results"
|
||||||
pass=false
|
pass=false
|
||||||
else
|
else
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "systemctl status '$firewall' > /tmp/firewall_check 2>&1" 1 > /tmp/remote_command_check`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "systemctl status '$firewall' > ${tmpDir}/firewall_check 2>&1" 1 > ${tmpDir}/remote_command_check`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Warning${normal}, $ipadd Node $firewall service is Active, check port test results"
|
echo "${bold}Warning${normal}, $ipadd Node $firewall service is Active, check port test results"
|
||||||
pass=false
|
pass=false
|
||||||
@ -696,7 +698,7 @@ checkFirewalls()
|
|||||||
|
|
||||||
pass=true
|
pass=true
|
||||||
#check local IPTABLES
|
#check local IPTABLES
|
||||||
`/sbin/rcSuSEfirewall2 status > /tmp/rcSuSEfirewall2_check 2>&1`
|
`/sbin/rcSuSEfirewall2 status > ${tmpDir}/rcSuSEfirewall2_check 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node rcSuSEfirewall2 service is Enabled, check port test results"
|
echo "${bold}Failed${normal}, Local Node rcSuSEfirewall2 service is Enabled, check port test results"
|
||||||
pass=false
|
pass=false
|
||||||
@ -705,7 +707,7 @@ checkFirewalls()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD '/sbin/rcSuSEfirewall2 status > /tmp/rcSuSEfirewall2_check 2>&1' 1 > /tmp/remote_command_check`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD '/sbin/rcSuSEfirewall2 status > ${tmpDir}/rcSuSEfirewall2_check 2>&1' 1 > ${tmpDir}/remote_command_check`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -eq 0 ] ; then
|
if [ $rc -eq 0 ] ; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node rcSuSEfirewall2 service is Enabled, check port test results"
|
echo "${bold}Failed${normal}, $ipadd Node rcSuSEfirewall2 service is Enabled, check port test results"
|
||||||
@ -728,12 +730,12 @@ checkPorts()
|
|||||||
pass=true
|
pass=true
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
|
|
||||||
`nmap $ipadd -p 8600-8630,8700,8800,3306 | grep 'filtered' > /tmp/port_test`
|
`nmap $ipadd -p 8600-8630,8700,8800,3306 | grep 'filtered' > ${tmpDir}/port_test`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo $ipadd " Node Passed port test"
|
echo $ipadd " Node Passed port test"
|
||||||
else
|
else
|
||||||
echo $ipadd " Node ${bold}Failed${normal} port test, check and disable any firewalls or open ports in firewall"
|
echo $ipadd " Node ${bold}Failed${normal} port test, check and disable any firewalls or open ports in firewall"
|
||||||
cat /tmp/port_test
|
cat ${tmpDir}/port_test
|
||||||
pass=false
|
pass=false
|
||||||
REPORTPASS=false
|
REPORTPASS=false
|
||||||
fi
|
fi
|
||||||
@ -756,16 +758,16 @@ checkTime()
|
|||||||
#get local epoch time
|
#get local epoch time
|
||||||
localTime=`date +%s`
|
localTime=`date +%s`
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'date +%s > /tmp/time_check' > /tmp/time_check`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'date +%s > ${tmpDir}/time_check' > ${tmpDir}/time_check`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -ne 0 ] ; then
|
if [ $rc -ne 0 ] ; then
|
||||||
echo $ipadd " Node ${bold}Failed${normal} date/time check failed, check /tmp/time_check"
|
echo $ipadd " Node ${bold}Failed${normal} date/time check failed, check ${tmpDir}/time_check"
|
||||||
pass=false
|
pass=false
|
||||||
REPORTPASS=false
|
REPORTPASS=false
|
||||||
else
|
else
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/time_check > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/time_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||||
else
|
else
|
||||||
remoteTime=`cat time_check`
|
remoteTime=`cat time_check`
|
||||||
timeDiff=`echo "$(($remoteTime-$localTime))"`
|
timeDiff=`echo "$(($remoteTime-$localTime))"`
|
||||||
@ -803,17 +805,17 @@ checkMysqlPassword()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$IPADDRESSES" != "" ]; then
|
if [ "$IPADDRESSES" != "" ]; then
|
||||||
`/bin/cp -f $COLUMNSTORE_INSTALL_DIR/bin/mariadb-command-line.sh /tmp/.`
|
`/bin/cp -f $COLUMNSTORE_INSTALL_DIR/bin/mariadb-command-line.sh ${tmpDir}/.`
|
||||||
|
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD $COLUMNSTORE_INSTALL_DIR/mysql/mysql-Columnstore start > /dev/null 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD $COLUMNSTORE_INSTALL_DIR/mysql/mysql-Columnstore start > /dev/null 2>&1`
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_put.sh $ipadd $PASSWORD /tmp/mariadb-command-line.sh 1 > /tmp/remote_scp_put_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_put.sh $ipadd $PASSWORD ${tmpDir}/mariadb-command-line.sh 1 > ${tmpDir}/remote_scp_put_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_put.sh to $ipadd Node, check /tmp/remote_scp_put_check"
|
echo "Error running remote_scp_put.sh to $ipadd Node, check ${tmpDir}/remote_scp_put_check"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD /tmp/mariadb-command-line.sh 1 > /tmp/remote_command_check`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD ${tmpDir}/mariadb-command-line.sh 1 > ${tmpDir}/remote_command_check`
|
||||||
`cat /tmp/remote_command_check | grep "ERROR - PASSWORD" > /dev/null 2>&1`
|
`cat ${tmpDir}/remote_command_check | grep "ERROR - PASSWORD" > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node MariaDB login failed with missing password file, /root/.my.cnf"
|
echo "${bold}Failed${normal}, $ipadd Node MariaDB login failed with missing password file, /root/.my.cnf"
|
||||||
pass=false
|
pass=false
|
||||||
@ -860,8 +862,8 @@ checkPackages()
|
|||||||
REPORTPASS=false
|
REPORTPASS=false
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
`yum list installed "$PKG" > /tmp/pkg_check 2>&1`
|
`yum list installed "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep Installed > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep Installed > /dev/null 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -880,8 +882,8 @@ checkPackages()
|
|||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
pass=true
|
pass=true
|
||||||
for PKG in "${CENTOS_PKG_NOT[@]}"; do
|
for PKG in "${CENTOS_PKG_NOT[@]}"; do
|
||||||
`yum list installed "$PKG" > /tmp/pkg_check 2>&1`
|
`yum list installed "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep Installed > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep Installed > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -901,14 +903,14 @@ checkPackages()
|
|||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
for PKG in "${CENTOS_PKG[@]}"; do
|
for PKG in "${CENTOS_PKG[@]}"; do
|
||||||
if [ $OS == "centos6" ] && [ $PKG == "boost" ]; then
|
if [ $OS == "centos6" ] && [ $PKG == "boost" ]; then
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'ls /usr/lib/libboost_regex.so > /dev/null 2>&1' 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'ls /usr/lib/libboost_regex.so > /dev/null 2>&1' 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}boost libraries${normal} not installed"
|
echo "${bold}Failed${normal}, $ipadd Node ${bold}boost libraries${normal} not installed"
|
||||||
pass=false
|
pass=false
|
||||||
REPORTPASS=false
|
REPORTPASS=false
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -eq 2 ] ; then
|
if [ $rc -eq 2 ] ; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node, 'yum' not installed"
|
echo "${bold}Failed${normal}, $ipadd Node, 'yum' not installed"
|
||||||
@ -933,7 +935,7 @@ checkPackages()
|
|||||||
|
|
||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
for PKG in "${CENTOS_PKG_NOT[@]}"; do
|
for PKG in "${CENTOS_PKG_NOT[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -eq 2 ] ; then
|
if [ $rc -eq 2 ] ; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node, 'yum' not installed"
|
echo "${bold}Failed${normal}, $ipadd Node, 'yum' not installed"
|
||||||
@ -972,8 +974,8 @@ checkPackages()
|
|||||||
pass=true
|
pass=true
|
||||||
#check centos packages on local node
|
#check centos packages on local node
|
||||||
for PKG in "${SUSE_PKG[@]}"; do
|
for PKG in "${SUSE_PKG[@]}"; do
|
||||||
`rpm -qi "$PKG" > /tmp/pkg_check 2>&1`
|
`rpm -qi "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep "not installed" > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep "not installed" > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -990,8 +992,8 @@ checkPackages()
|
|||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
pass=true
|
pass=true
|
||||||
for PKG in "${SUSE_PKG_NOT[@]}"; do
|
for PKG in "${SUSE_PKG_NOT[@]}"; do
|
||||||
`rpm -qi "$PKG" > /tmp/pkg_check 2>&1`
|
`rpm -qi "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep "not installed" > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep "not installed" > /dev/null 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1011,7 +1013,7 @@ checkPackages()
|
|||||||
if [ "$IPADDRESSES" != "" ]; then
|
if [ "$IPADDRESSES" != "" ]; then
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
for PKG in "${SUSE_PKG[@]}"; do
|
for PKG in "${SUSE_PKG[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -ne 0 ] ; then
|
if [ $rc -ne 0 ] ; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is not installed, please install"
|
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||||
@ -1030,7 +1032,7 @@ checkPackages()
|
|||||||
|
|
||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
for PKG in "${SUSE_PKG_NOT[@]}"; do
|
for PKG in "${SUSE_PKG_NOT[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
rc="$?"
|
rc="$?"
|
||||||
if [ $rc -eq 0 ] ; then
|
if [ $rc -eq 0 ] ; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is installed, please un-install"
|
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||||
@ -1063,8 +1065,8 @@ checkPackages()
|
|||||||
pass=true
|
pass=true
|
||||||
#check centos packages on local node
|
#check centos packages on local node
|
||||||
for PKG in "${UBUNTU_PKG[@]}"; do
|
for PKG in "${UBUNTU_PKG[@]}"; do
|
||||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1081,8 +1083,8 @@ checkPackages()
|
|||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
pass=true
|
pass=true
|
||||||
for PKG in "${UBUNTU_PKG_NOT[@]}"; do
|
for PKG in "${UBUNTU_PKG_NOT[@]}"; do
|
||||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1102,12 +1104,12 @@ checkPackages()
|
|||||||
if [ "$IPADDRESSES" != "" ]; then
|
if [ "$IPADDRESSES" != "" ]; then
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
for PKG in "${UBUNTU_PKG[@]}"; do
|
for PKG in "${UBUNTU_PKG[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||||
else
|
else
|
||||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1134,12 +1136,12 @@ checkPackages()
|
|||||||
|
|
||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
for PKG in "${UBUNTU_PKG_NOT[@]}"; do
|
for PKG in "${UBUNTU_PKG_NOT[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||||
else
|
else
|
||||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1181,8 +1183,8 @@ checkPackages()
|
|||||||
pass=true
|
pass=true
|
||||||
#check centos packages on local node
|
#check centos packages on local node
|
||||||
for PKG in "${DEBIAN_PKG[@]}"; do
|
for PKG in "${DEBIAN_PKG[@]}"; do
|
||||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1199,8 +1201,8 @@ checkPackages()
|
|||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
pass=true
|
pass=true
|
||||||
for PKG in "${DEBIAN_PKG_NOT[@]}"; do
|
for PKG in "${DEBIAN_PKG_NOT[@]}"; do
|
||||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1220,12 +1222,12 @@ checkPackages()
|
|||||||
if [ "$IPADDRESSES" != "" ]; then
|
if [ "$IPADDRESSES" != "" ]; then
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
for PKG in "${DEBIAN_PKG[@]}"; do
|
for PKG in "${DEBIAN_PKG[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||||
else
|
else
|
||||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1252,12 +1254,12 @@ checkPackages()
|
|||||||
|
|
||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
for PKG in "${DEBIAN_PKG_NOT[@]}"; do
|
for PKG in "${DEBIAN_PKG_NOT[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||||
else
|
else
|
||||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1299,8 +1301,8 @@ checkPackages()
|
|||||||
pass=true
|
pass=true
|
||||||
#check centos packages on local node
|
#check centos packages on local node
|
||||||
for PKG in "${DEBIAN9_PKG[@]}"; do
|
for PKG in "${DEBIAN9_PKG[@]}"; do
|
||||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1317,8 +1319,8 @@ checkPackages()
|
|||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
pass=true
|
pass=true
|
||||||
for PKG in "${DEBIAN9_PKG_NOT[@]}"; do
|
for PKG in "${DEBIAN9_PKG_NOT[@]}"; do
|
||||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1339,12 +1341,12 @@ checkPackages()
|
|||||||
if [ "$IPADDRESSES" != "" ]; then
|
if [ "$IPADDRESSES" != "" ]; then
|
||||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||||
for PKG in "${DEBIAN9_PKG[@]}"; do
|
for PKG in "${DEBIAN9_PKG[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||||
else
|
else
|
||||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||||
pass=false
|
pass=false
|
||||||
@ -1371,12 +1373,12 @@ checkPackages()
|
|||||||
|
|
||||||
#check for package that shouldnt be installed
|
#check for package that shouldnt be installed
|
||||||
for PKG in "${DEBIAN9_PKG_NOT[@]}"; do
|
for PKG in "${DEBIAN9_PKG_NOT[@]}"; do
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||||
else
|
else
|
||||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||||
if [ "$?" -eq 0 ]; then
|
if [ "$?" -eq 0 ]; then
|
||||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||||
pass=false
|
pass=false
|
||||||
|
@ -97,7 +97,7 @@ Config* Config::makeConfig(const char* cf)
|
|||||||
cf = cfStr.c_str();
|
cf = cfStr.c_str();
|
||||||
|
|
||||||
#else
|
#else
|
||||||
cf = getenv("CALPONT_CONFIG_FILE");
|
cf = getenv("COLUMNSTORE_CONFIG_FILE");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (cf == 0 || *cf == 0)
|
if (cf == 0 || *cf == 0)
|
||||||
@ -419,7 +419,7 @@ void Config::writeConfig(const string& configFile) const
|
|||||||
value = c1->getConfig("SystemConfig", "SystemName");
|
value = c1->getConfig("SystemConfig", "SystemName");
|
||||||
|
|
||||||
//good read, save copy, copy temp file tp tmp then to Columnstore.xml
|
//good read, save copy, copy temp file tp tmp then to Columnstore.xml
|
||||||
//move to /tmp to get around a 'same file error' in mv command
|
//move to get around a 'same file error' in mv command
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (exists(scft)) fs::remove(scft);
|
if (exists(scft)) fs::remove(scft);
|
||||||
|
@ -50,12 +50,16 @@ namespace config
|
|||||||
|
|
||||||
void WriteOnceConfig::initializeDefaults()
|
void WriteOnceConfig::initializeDefaults()
|
||||||
{
|
{
|
||||||
|
string tmpDir = startup::StartUp::tmpDir();
|
||||||
|
|
||||||
fLBID_Shift = make_pair("13", false);
|
fLBID_Shift = make_pair("13", false);
|
||||||
fDBRootCount = make_pair("1", false);
|
fDBRootCount = make_pair("1", false);
|
||||||
fDBRMRoot = make_pair("/mnt/OAM/dbrm/BRM_saves", false);
|
fDBRMRoot = make_pair("/mnt/OAM/dbrm/BRM_saves", false);
|
||||||
fSharedMemoryTmpFile1 = make_pair("/tmp/CalpontShm,", false);
|
string file = tmpDir + "/ColumnstoreShm";
|
||||||
|
fSharedMemoryTmpFile1 = make_pair(file, false);
|
||||||
fTxnIDFile = make_pair("/mnt/OAM/dbrm/SMTxnID", false);
|
fTxnIDFile = make_pair("/mnt/OAM/dbrm/SMTxnID", false);
|
||||||
fSharedMemoryTmpFile2 = make_pair("/tmp/CalpontSessionMonitorShm", false);
|
file = tmpDir + "/CalpontSessionMonitorShm";
|
||||||
|
fSharedMemoryTmpFile2 = make_pair(file, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteOnceConfig::setup()
|
void WriteOnceConfig::setup()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||||
|
Copyright (C) 2018 MariaDB Corporation
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
@ -28,6 +29,8 @@
|
|||||||
|
|
||||||
#include "IDBLogger.h"
|
#include "IDBLogger.h"
|
||||||
|
|
||||||
|
#include "installdir.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@ -55,7 +58,10 @@ void IDBLogger::writeLog( const std::string& logmsg )
|
|||||||
pthread_t threadid = pthread_self();
|
pthread_t threadid = pthread_self();
|
||||||
#endif
|
#endif
|
||||||
ostringstream fname;
|
ostringstream fname;
|
||||||
fname << "/tmp/idbdf-log-" << pid << "-" << threadid << ".csv";
|
|
||||||
|
string tmpDir = startup::StartUp::tmpDir();
|
||||||
|
|
||||||
|
fname << tmpDir + "/idbdf-log-" << pid << "-" << threadid << ".csv";
|
||||||
|
|
||||||
ofstream output;
|
ofstream output;
|
||||||
output.open( fname.str().c_str(), ios::out | ios::app );
|
output.open( fname.str().c_str(), ios::out | ios::app );
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||||
|
Copyright (C) 2018 MariaDB Corporation
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
@ -22,6 +23,7 @@
|
|||||||
#include "joinpartition.h"
|
#include "joinpartition.h"
|
||||||
#include "tuplejoiner.h"
|
#include "tuplejoiner.h"
|
||||||
#include "atomicops.h"
|
#include "atomicops.h"
|
||||||
|
#include "installdir.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace utils;
|
using namespace utils;
|
||||||
@ -128,12 +130,9 @@ JoinPartition::JoinPartition(const JoinPartition& jp, bool splitMode) :
|
|||||||
// Instead, each will double in size, giving a capacity of 8GB -> 16 -> 32, and so on.
|
// Instead, each will double in size, giving a capacity of 8GB -> 16 -> 32, and so on.
|
||||||
// bucketCount = jp.bucketCount;
|
// bucketCount = jp.bucketCount;
|
||||||
bucketCount = 2;
|
bucketCount = 2;
|
||||||
filenamePrefix = config->getConfig("HashJoin", "TempFilePath");
|
filenamePrefix = startup::StartUp::tmpDir();
|
||||||
|
|
||||||
if (filenamePrefix.empty())
|
filenamePrefix += "/Columnstore-join-data-";
|
||||||
filenamePrefix = "/tmp/infinidb";
|
|
||||||
|
|
||||||
filenamePrefix += "/Infinidb-join-data-";
|
|
||||||
|
|
||||||
uniqueID = atomicops::atomicInc(&uniqueNums);
|
uniqueID = atomicops::atomicInc(&uniqueNums);
|
||||||
uint32_t tmp = uniqueID;
|
uint32_t tmp = uniqueID;
|
||||||
|
@ -73,7 +73,7 @@ namespace BRM
|
|||||||
* default value is 1000.
|
* default value is 1000.
|
||||||
* SessionManager/SharedMemoryTmpFile: the file to store the shared memory segment
|
* SessionManager/SharedMemoryTmpFile: the file to store the shared memory segment
|
||||||
* data in between invocations if DESTROYSHMSEG is defined below. The
|
* data in between invocations if DESTROYSHMSEG is defined below. The
|
||||||
* default is /tmp/CalpontShm.
|
* default is /tmp/ColumnstoreShm.
|
||||||
* SessionManager/TxnIDFile: the file to store the last transaction ID issued
|
* SessionManager/TxnIDFile: the file to store the last transaction ID issued
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
#include "slavecomm.h"
|
#include "slavecomm.h"
|
||||||
#undef SLAVECOMM_DLLEXPORT
|
#undef SLAVECOMM_DLLEXPORT
|
||||||
|
|
||||||
|
#include "installdir.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace messageqcpp;
|
using namespace messageqcpp;
|
||||||
using namespace idbdatafile;
|
using namespace idbdatafile;
|
||||||
@ -98,6 +100,8 @@ SlaveComm::SlaveComm(string hostname, SlaveDBRMNode* s) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string tmpDir = startup::StartUp::tmpDir();
|
||||||
|
|
||||||
/* NOTE: this string has to match whatever is designated as the first slave */
|
/* NOTE: this string has to match whatever is designated as the first slave */
|
||||||
if (hostname == "DBRM_Worker1")
|
if (hostname == "DBRM_Worker1")
|
||||||
@ -108,11 +112,11 @@ SlaveComm::SlaveComm(string hostname, SlaveDBRMNode* s) :
|
|||||||
}
|
}
|
||||||
catch (exception& e)
|
catch (exception& e)
|
||||||
{
|
{
|
||||||
savefile = "/tmp/BRM_SaveFiles";
|
savefile = tmpDir + "/BRM_SaveFiles";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (savefile == "")
|
if (savefile == "")
|
||||||
savefile = "/tmp/BRM_SaveFiles";
|
savefile = tmpDir + "/BRM_SaveFiles";
|
||||||
|
|
||||||
tmp = "";
|
tmp = "";
|
||||||
|
|
||||||
@ -181,17 +185,19 @@ SlaveComm::SlaveComm()
|
|||||||
{
|
{
|
||||||
config::Config* config = config::Config::makeConfig();
|
config::Config* config = config::Config::makeConfig();
|
||||||
|
|
||||||
|
string tmpDir = startup::StartUp::tmpDir();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
savefile = config->getConfig("SystemConfig", "DBRMRoot");
|
savefile = config->getConfig("SystemConfig", "DBRMRoot");
|
||||||
}
|
}
|
||||||
catch (exception& e)
|
catch (exception& e)
|
||||||
{
|
{
|
||||||
savefile = "/tmp/BRM_SaveFiles";
|
savefile = tmpDir + "/BRM_SaveFiles";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (savefile == "")
|
if (savefile == "")
|
||||||
savefile = "/tmp/BRM_SaveFiles";
|
savefile = tmpDir + "/BRM_SaveFiles";
|
||||||
|
|
||||||
journalName = savefile + "_journal";
|
journalName = savefile + "_journal";
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ def find_paths():
|
|||||||
|
|
||||||
"""Find DBRoot and BulkRoot."""
|
"""Find DBRoot and BulkRoot."""
|
||||||
try:
|
try:
|
||||||
config_file = os.environ['CALPONT_CONFIG_FILE']
|
config_file = os.environ['COLUMNSTORE_CONFIG_FILE']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
try:
|
try:
|
||||||
logger.info("Environment variable CALPONT_CONFIG_FILE not set, looking for system Columnstore.xml")
|
logger.info("Environment variable COLUMNSTORE_CONFIG_FILE not set, looking for system Columnstore.xml")
|
||||||
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
||||||
os.lstat(config_file)
|
os.lstat(config_file)
|
||||||
except:
|
except:
|
||||||
@ -185,10 +185,6 @@ def main():
|
|||||||
clean up old files, sort the index inserts and generally rock and roll
|
clean up old files, sort the index inserts and generally rock and roll
|
||||||
"""
|
"""
|
||||||
start_dir = curdir=os.getcwd() # remember where we started
|
start_dir = curdir=os.getcwd() # remember where we started
|
||||||
|
|
||||||
if not os.access('.', os.W_OK):
|
|
||||||
os.chdir('/tmp')
|
|
||||||
logger.warn('Changing to /tmp to have permission to write files')
|
|
||||||
|
|
||||||
if not os.environ.has_key('LD_LIBRARY_PATH'):
|
if not os.environ.has_key('LD_LIBRARY_PATH'):
|
||||||
logger.info('No environment variable LD_LIBRARY_PATH')
|
logger.info('No environment variable LD_LIBRARY_PATH')
|
||||||
|
@ -6,7 +6,7 @@ def find_paths():
|
|||||||
|
|
||||||
"""Find DBRoot and BulkRoot."""
|
"""Find DBRoot and BulkRoot."""
|
||||||
try:
|
try:
|
||||||
config_file = os.environ['CALPONT_CONFIG_FILE']
|
config_file = os.environ['COLUMNSTORE_CONFIG_FILE']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
try:
|
try:
|
||||||
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
||||||
@ -71,10 +71,6 @@ def main():
|
|||||||
"""
|
"""
|
||||||
Validate indexes..
|
Validate indexes..
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not os.access('.', os.W_OK):
|
|
||||||
os.chdir('/tmp')
|
|
||||||
print 'Changing to /tmp to have permission to write files'
|
|
||||||
|
|
||||||
if len(os.getenv('LD_LIBRARY_PATH'))<5:
|
if len(os.getenv('LD_LIBRARY_PATH'))<5:
|
||||||
print 'Suspicous LD_LIBRARY_PATH: %s'%os.getenv('LD_LIBRARY_PATH')
|
print 'Suspicous LD_LIBRARY_PATH: %s'%os.getenv('LD_LIBRARY_PATH')
|
||||||
|
@ -49,10 +49,10 @@ def find_paths():
|
|||||||
|
|
||||||
"""Find DBRoot and BulkRoot."""
|
"""Find DBRoot and BulkRoot."""
|
||||||
try:
|
try:
|
||||||
config_file = os.environ['CALPONT_CONFIG_FILE']
|
config_file = os.environ['COLUMNSTORE_CONFIG_FILE']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
try:
|
try:
|
||||||
logger.info("Environment variable CALPONT_CONFIG_FILE not set, looking for system Columnstore.xml")
|
logger.info("Environment variable COLUMNSTORE_CONFIG_FILE not set, looking for system Columnstore.xml")
|
||||||
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
||||||
os.lstat(config_file)
|
os.lstat(config_file)
|
||||||
except:
|
except:
|
||||||
@ -182,10 +182,6 @@ def main():
|
|||||||
clean up old files, sort the index inserts and generally rock and roll
|
clean up old files, sort the index inserts and generally rock and roll
|
||||||
"""
|
"""
|
||||||
start_dir = curdir=os.getcwd() # remember where we started
|
start_dir = curdir=os.getcwd() # remember where we started
|
||||||
|
|
||||||
if not os.access('.', os.W_OK):
|
|
||||||
os.chdir('/tmp')
|
|
||||||
logger.warn('Changing to /tmp to have permission to write files')
|
|
||||||
|
|
||||||
if not os.environ.has_key('LD_LIBRARY_PATH'):
|
if not os.environ.has_key('LD_LIBRARY_PATH'):
|
||||||
logger.info('No environment variable LD_LIBRARY_PATH')
|
logger.info('No environment variable LD_LIBRARY_PATH')
|
||||||
|
@ -1331,15 +1331,6 @@ void WEDataLoader::onReceiveBrmRptFileName(ByteStream& Ibs)
|
|||||||
cout << "Creating directory : " << dirname << endl;
|
cout << "Creating directory : " << dirname << endl;
|
||||||
boost::filesystem::create_directories(dirname.c_str());
|
boost::filesystem::create_directories(dirname.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
mkdir(dirname.c_str());
|
|
||||||
#else
|
|
||||||
mkdir(dirname.c_str(), 0777);
|
|
||||||
boost::filesystem::create_directories("/tmp/boby/test");
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fpSysLog)
|
if (fpSysLog)
|
||||||
@ -1568,15 +1559,6 @@ void WEDataLoader::onReceiveJobId(ByteStream& Ibs)
|
|||||||
cout << "Creating directory : " << dirname << endl;
|
cout << "Creating directory : " << dirname << endl;
|
||||||
boost::filesystem::create_directories(dirname.c_str());
|
boost::filesystem::create_directories(dirname.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
mkdir(dirname.c_str());
|
|
||||||
#else
|
|
||||||
mkdir(dirname.c_str(), 0777);
|
|
||||||
boost::filesystem::create_directories("/tmp/boby/test");
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fJobFile.open(aJobFileName.c_str());
|
fJobFile.open(aJobFileName.c_str());
|
||||||
|
@ -270,7 +270,7 @@ void Config::checkReload( )
|
|||||||
|
|
||||||
if ( hdfsRdwrScratch.length() == 0 )
|
if ( hdfsRdwrScratch.length() == 0 )
|
||||||
{
|
{
|
||||||
hdfsRdwrScratch = "/tmp/hdfsscratch";
|
hdfsRdwrScratch = TmpFileDir + "/hdfsscratch";
|
||||||
}
|
}
|
||||||
|
|
||||||
IDBPolicy::init( idblog, bUseRdwrMemBuffer, hdfsRdwrScratch, hdfsRdwrBufferMaxSize );
|
IDBPolicy::init( idblog, bUseRdwrMemBuffer, hdfsRdwrScratch, hdfsRdwrBufferMaxSize );
|
||||||
|
@ -72,6 +72,8 @@ using namespace batchloader;
|
|||||||
#include "we_tablelockgrabber.h"
|
#include "we_tablelockgrabber.h"
|
||||||
#include "we_simplesyslog.h"
|
#include "we_simplesyslog.h"
|
||||||
|
|
||||||
|
#include "installdir.h"
|
||||||
|
|
||||||
namespace WriteEngine
|
namespace WriteEngine
|
||||||
{
|
{
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -1402,7 +1404,7 @@ void WESDHandler::onBrmReport(int PmId, messageqcpp::SBS& Sbs)
|
|||||||
if (!fRef.fCmdArgs.getConsoleOutput())
|
if (!fRef.fCmdArgs.getConsoleOutput())
|
||||||
{
|
{
|
||||||
ostringstream oss;
|
ostringstream oss;
|
||||||
oss << "/tmp/" << fTableOId << ".txt";
|
oss << startup::StartUp::tmpDir() << fTableOId << ".txt";
|
||||||
ofstream dmlFile(oss.str().c_str(), std::ofstream::app);
|
ofstream dmlFile(oss.str().c_str(), std::ofstream::app);
|
||||||
|
|
||||||
if (dmlFile.is_open())
|
if (dmlFile.is_open())
|
||||||
@ -1883,10 +1885,10 @@ void WESDHandler::onCleanupResult(int PmId, messageqcpp::SBS& Sbs)
|
|||||||
WEColOorVec::iterator aIt = fImportRslt.fColOorVec.begin();
|
WEColOorVec::iterator aIt = fImportRslt.fColOorVec.begin();
|
||||||
ofstream dmlFile;
|
ofstream dmlFile;
|
||||||
|
|
||||||
if (!fRef.fCmdArgs.getConsoleOutput()) //for DML to use file /tmp/
|
if (!fRef.fCmdArgs.getConsoleOutput()) //for DML to use file
|
||||||
{
|
{
|
||||||
ostringstream oss;
|
ostringstream oss;
|
||||||
oss << "/tmp/" << fTableOId << ".txt";
|
oss << startup::StartUp::tmpDir() << fTableOId << ".txt";
|
||||||
dmlFile.open(oss.str().c_str());
|
dmlFile.open(oss.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ WESplitterApp::WESplitterApp(WECmdArgs& CmdArgs) :
|
|||||||
{
|
{
|
||||||
ofstream dmlFile;
|
ofstream dmlFile;
|
||||||
ostringstream oss;
|
ostringstream oss;
|
||||||
oss << "/tmp/" << fDh.getTableOID() << ".txt";
|
oss << startup::StartUp::tmpDir() << fDh.getTableOID() << ".txt";
|
||||||
dmlFile.open(oss.str().c_str());
|
dmlFile.open(oss.str().c_str());
|
||||||
|
|
||||||
if (dmlFile.is_open())
|
if (dmlFile.is_open())
|
||||||
|
Reference in New Issue
Block a user