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
change to use local lock file directory for nonroot
This commit is contained in:
@ -64,15 +64,8 @@ datadir=$basedir/db
|
|||||||
service_startup_timeout=90
|
service_startup_timeout=90
|
||||||
user=`whoami 2>/dev/null`
|
user=`whoami 2>/dev/null`
|
||||||
|
|
||||||
# Lock directory for root user
|
# Lock directory
|
||||||
lockdir='/var/lock/subsys'
|
lockdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory`
|
||||||
# Lock directory for non-root user
|
|
||||||
if $user != "root"
|
|
||||||
then
|
|
||||||
lockdir='$HOME/.lock'
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir $lockdir
|
|
||||||
|
|
||||||
lock_file_path="$lockdir/mysql-Columnstore"
|
lock_file_path="$lockdir/mysql-Columnstore"
|
||||||
|
|
||||||
|
@ -469,6 +469,7 @@
|
|||||||
<MySQLPort>3306</MySQLPort>
|
<MySQLPort>3306</MySQLPort>
|
||||||
<AmazonDeviceName>/dev/xvd</AmazonDeviceName>
|
<AmazonDeviceName>/dev/xvd</AmazonDeviceName>
|
||||||
<DistributedInstall>y</DistributedInstall>
|
<DistributedInstall>y</DistributedInstall>
|
||||||
|
<LockFileDirectory>/var/lock/subsys</LockFileDirectory>
|
||||||
</Installation>
|
</Installation>
|
||||||
<ExtentMap>
|
<ExtentMap>
|
||||||
<!--
|
<!--
|
||||||
|
@ -463,6 +463,7 @@
|
|||||||
<JavaPath>unassigned</JavaPath>
|
<JavaPath>unassigned</JavaPath>
|
||||||
<MySQLPort>3306</MySQLPort>
|
<MySQLPort>3306</MySQLPort>
|
||||||
<DistributedInstall>y</DistributedInstall>
|
<DistributedInstall>y</DistributedInstall>
|
||||||
|
<LockFileDirectory>/var/lock/subsys</LockFileDirectory>
|
||||||
</Installation>
|
</Installation>
|
||||||
<ExtentMap>
|
<ExtentMap>
|
||||||
<!--
|
<!--
|
||||||
|
@ -56,17 +56,7 @@ if [ "x$has_um" = x ]; then
|
|||||||
has_um=0
|
has_um=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
user=`whoami 2>/dev/null`
|
lockdir=`$InstallDir/bin/getConfig Installation LockFileDirectory`
|
||||||
|
|
||||||
# Lock directory for root user
|
|
||||||
lockdir='/var/lock/subsys'
|
|
||||||
# Lock directory for non-root user
|
|
||||||
if $user != "root"
|
|
||||||
then
|
|
||||||
lockdir='$HOME/.lock'
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir $lockdir
|
|
||||||
|
|
||||||
checkInstallSetup() {
|
checkInstallSetup() {
|
||||||
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Columnstore.xml Installation InitialInstallFlag`
|
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Columnstore.xml Installation InitialInstallFlag`
|
||||||
|
@ -242,6 +242,20 @@ else
|
|||||||
rm -f /var/lock/subsys/mysql-Columnstore
|
rm -f /var/lock/subsys/mysql-Columnstore
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#determine lock file directory
|
||||||
|
# Lock directory for root user
|
||||||
|
lockdir='/var/lock/subsys'
|
||||||
|
if [ $user != "root" ];then
|
||||||
|
# Lock directory for non-root user
|
||||||
|
lockdir=$prefix/.lock
|
||||||
|
fi
|
||||||
|
|
||||||
|
$installdir/bin/setConfig -d Installation LockFileDirectory $lockdir
|
||||||
|
|
||||||
|
mkdir $lockdir >/dev/null 2>&1
|
||||||
|
|
||||||
|
rm -f $lockdir/mysql-Columnstore
|
||||||
|
|
||||||
#backup copy of Alarm Config File
|
#backup copy of Alarm Config File
|
||||||
/bin/cp -f $installdir/etc/AlarmConfig.xml $installdir/etc/AlarmConfig.xml.installSave > /dev/null 2>&1
|
/bin/cp -f $installdir/etc/AlarmConfig.xml $installdir/etc/AlarmConfig.xml.installSave > /dev/null 2>&1
|
||||||
|
|
||||||
|
@ -70,7 +70,6 @@ rm -rf /tmp/bucketreuse
|
|||||||
rm -f /tmp/columnstore.txt
|
rm -f /tmp/columnstore.txt
|
||||||
rm -f /tmp/dbbuilder.*
|
rm -f /tmp/dbbuilder.*
|
||||||
rm -f /tmp/dbrmfiles
|
rm -f /tmp/dbrmfiles
|
||||||
rm -f /var/lock/subsys/columnstore
|
|
||||||
rm -f /tmp/pkgcheck
|
rm -f /tmp/pkgcheck
|
||||||
rm -f /tmp/upgrade-status.log.*
|
rm -f /tmp/upgrade-status.log.*
|
||||||
rm -f /tmp/mount.log
|
rm -f /tmp/mount.log
|
||||||
@ -78,6 +77,10 @@ rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
|
|||||||
rm -rf /tmp/columnstore_tmp_files
|
rm -rf /tmp/columnstore_tmp_files
|
||||||
rm -f $installdir/local/moveDbrootTransactionLog
|
rm -f $installdir/local/moveDbrootTransactionLog
|
||||||
|
|
||||||
|
lockdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory`
|
||||||
|
rm -f $lockdir/subsys/columnstore
|
||||||
|
rm -f $lockdir/mysql-Columnstore
|
||||||
|
|
||||||
# delete core files
|
# delete core files
|
||||||
#rm -f /var/log/mariadb/columnstore/corefiles/* > /dev/null 2>&1
|
#rm -f /var/log/mariadb/columnstore/corefiles/* > /dev/null 2>&1
|
||||||
|
|
||||||
|
@ -10682,8 +10682,18 @@ bool Oam::checkSystemRunning()
|
|||||||
// string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log";
|
// string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log";
|
||||||
// system(cmd.c_str());
|
// system(cmd.c_str());
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
|
string lockFileDir = "/var/subsys/lock";
|
||||||
|
|
||||||
string lockFile = userDir + "/columnstore";
|
try
|
||||||
|
{
|
||||||
|
Config* sysConfig = Config::makeConfig(CalpontConfigFile.c_str());
|
||||||
|
lockFileDir = sysConfig->getConfig("Installation", "LockFileDirectory");
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{} // defaulted to false
|
||||||
|
|
||||||
|
string lockFile = lockFileDir + "/columnstore";
|
||||||
|
|
||||||
if (stat(lockFile.c_str(), &st) == 0)
|
if (stat(lockFile.c_str(), &st) == 0)
|
||||||
{
|
{
|
||||||
|
@ -2091,6 +2091,26 @@ int main(int argc, char* argv[])
|
|||||||
catch (...)
|
catch (...)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string LockFileDirectory = sysConfigOld->getConfig("Installation", "LockFileDirectory");
|
||||||
|
|
||||||
|
if ( !LockFileDirectory.empty() )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
sysConfigNew->setConfig("Installation", "LockFileDirectory", LockFileDirectory);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
cout << "ERROR: Problem setting LockFileDirectory in the Calpont System Configuration file" << endl;
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string DistributedInstall = sysConfigOld->getConfig("Installation", "DistributedInstall");
|
string DistributedInstall = sysConfigOld->getConfig("Installation", "DistributedInstall");
|
||||||
@ -2111,6 +2131,7 @@ int main(int argc, char* argv[])
|
|||||||
catch (...)
|
catch (...)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// add entries from tuning guide
|
// add entries from tuning guide
|
||||||
|
|
||||||
string ColScanReadAheadBlocks;
|
string ColScanReadAheadBlocks;
|
||||||
|
Reference in New Issue
Block a user