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
|
||||
user=`whoami 2>/dev/null`
|
||||
|
||||
# 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
|
||||
# Lock directory
|
||||
lockdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory`
|
||||
|
||||
lock_file_path="$lockdir/mysql-Columnstore"
|
||||
|
||||
|
@ -469,6 +469,7 @@
|
||||
<MySQLPort>3306</MySQLPort>
|
||||
<AmazonDeviceName>/dev/xvd</AmazonDeviceName>
|
||||
<DistributedInstall>y</DistributedInstall>
|
||||
<LockFileDirectory>/var/lock/subsys</LockFileDirectory>
|
||||
</Installation>
|
||||
<ExtentMap>
|
||||
<!--
|
||||
|
@ -463,6 +463,7 @@
|
||||
<JavaPath>unassigned</JavaPath>
|
||||
<MySQLPort>3306</MySQLPort>
|
||||
<DistributedInstall>y</DistributedInstall>
|
||||
<LockFileDirectory>/var/lock/subsys</LockFileDirectory>
|
||||
</Installation>
|
||||
<ExtentMap>
|
||||
<!--
|
||||
|
@ -56,17 +56,7 @@ if [ "x$has_um" = x ]; then
|
||||
has_um=0
|
||||
fi
|
||||
|
||||
user=`whoami 2>/dev/null`
|
||||
|
||||
# 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
|
||||
lockdir=`$InstallDir/bin/getConfig Installation LockFileDirectory`
|
||||
|
||||
checkInstallSetup() {
|
||||
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Columnstore.xml Installation InitialInstallFlag`
|
||||
|
@ -242,6 +242,20 @@ else
|
||||
rm -f /var/lock/subsys/mysql-Columnstore
|
||||
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
|
||||
/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/dbbuilder.*
|
||||
rm -f /tmp/dbrmfiles
|
||||
rm -f /var/lock/subsys/columnstore
|
||||
rm -f /tmp/pkgcheck
|
||||
rm -f /tmp/upgrade-status.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 -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
|
||||
#rm -f /var/log/mariadb/columnstore/corefiles/* > /dev/null 2>&1
|
||||
|
||||
|
@ -10683,7 +10683,17 @@ bool Oam::checkSystemRunning()
|
||||
// system(cmd.c_str());
|
||||
struct stat st;
|
||||
|
||||
string lockFile = userDir + "/columnstore";
|
||||
string lockFileDir = "/var/subsys/lock";
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -2091,6 +2091,26 @@ int main(int argc, char* argv[])
|
||||
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
|
||||
{
|
||||
string DistributedInstall = sysConfigOld->getConfig("Installation", "DistributedInstall");
|
||||
@ -2111,6 +2131,7 @@ int main(int argc, char* argv[])
|
||||
catch (...)
|
||||
{}
|
||||
|
||||
|
||||
// add entries from tuning guide
|
||||
|
||||
string ColScanReadAheadBlocks;
|
||||
|
Reference in New Issue
Block a user