You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +03:00
Merge pull request #1424 from drrtuy/MCOL-4295
MCOL-4295 Replace hardcoded paths with dynamic ones
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -146,6 +146,7 @@ oam/install_scripts/mcs-stop-controllernode.sh
|
||||
oam/install_scripts/mcs-workernode.service
|
||||
oam/install_scripts/mcs-writeengineserver.service
|
||||
oam/install_scripts/mcs-loadbrm.py
|
||||
oam/install_scripts/mcs-savebrm.py
|
||||
oam/install_scripts/mcs-storagemanager.service
|
||||
oam/install_scripts/mcs_module_installer.sh
|
||||
oam/install_scripts/slave-rep-columnstore.sh
|
||||
|
@@ -23,6 +23,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcs-loadbrm.service.in" "${CMAKE_CUR
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcs-storagemanager.service.in" "${CMAKE_CURRENT_SOURCE_DIR}/mcs-storagemanager.service" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcs-stop-controllernode.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/mcs-stop-controllernode.sh" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcs-loadbrm.py.in" "${CMAKE_CURRENT_SOURCE_DIR}/mcs-loadbrm.py" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcs-savebrm.py.in" "${CMAKE_CURRENT_SOURCE_DIR}/mcs-savebrm.py" @ONLY)
|
||||
|
||||
install(PROGRAMS columnstore-post-install
|
||||
columnstore-pre-uninstall
|
||||
|
@@ -218,7 +218,7 @@ fi
|
||||
# Lock directory for root user
|
||||
lockdir='/var/lock/subsys'
|
||||
|
||||
mcsSetConfig -d Installation LockFileDirectory $lockdir
|
||||
@ENGINE_BINDIR@/mcsSetConfig -d Installation LockFileDirectory $lockdir
|
||||
|
||||
mkdir $lockdir >/dev/null 2>&1
|
||||
|
||||
@@ -270,9 +270,9 @@ if [ ! -z "$MCS_USE_S3_STORAGE" ] && [ $MCS_USE_S3_STORAGE -eq 1 ]; then
|
||||
if [ -z "$MCS_S3_BUCKET" ] || [ -z "$MCS_S3_ACCESS_KEY_ID" ] || [ -z "$MCS_S3_SECRET_ACCESS_KEY" ]; then
|
||||
echo "Using local storage."
|
||||
else
|
||||
mcsSetConfig -d Installation DBRootStorageType "storagemanager"
|
||||
mcsSetConfig -d StorageManager Enabled "Y"
|
||||
mcsSetConfig -d SystemConfig DataFilePlugin "libcloudio.so"
|
||||
@ENGINE_BINDIR@/mcsSetConfig -d Installation DBRootStorageType "storagemanager"
|
||||
@ENGINE_BINDIR@/mcsSetConfig -d StorageManager Enabled "Y"
|
||||
@ENGINE_BINDIR@/mcsSetConfig -d SystemConfig DataFilePlugin "libcloudio.so"
|
||||
sed -i "s|service =.*|service = S3|" /etc/columnstore/storagemanager.cnf
|
||||
if [ ! -z "$MCS_S3_REGION" ]; then
|
||||
sed -i "s|region =.*|region = $MCS_S3_REGION|" /etc/columnstore/storagemanager.cnf
|
||||
|
@@ -53,7 +53,7 @@ rm -f /var/log/mariadb/columnstore/activeAlarms > /dev/null 2>&1
|
||||
rm -f /var/log/mariadb/columnstore/*.log1 > /dev/null 2>&1
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`@ENGINE_BINDIR@/mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
if [[ $tmpDir = *"tmp" ]]; then
|
||||
# delete tmp files
|
||||
rm -rf $tmpDir/*
|
||||
@@ -66,7 +66,7 @@ rm -f /var/lib/columnstore/local/moveDbrootTransactionLog
|
||||
rm -rf /var/log/mariadb/columnstore/
|
||||
rm -rf /tmp/columnstore_tmp_files
|
||||
|
||||
lockdir=`mcsGetConfig Installation LockFileDirectory`
|
||||
lockdir=`@ENGINE_BINDIR@/mcsGetConfig Installation LockFileDirectory`
|
||||
rm -f $lockdir/columnstore
|
||||
|
||||
#uninstall MariaDB Columnstore system logging
|
||||
|
@@ -37,22 +37,22 @@ fi
|
||||
mt=`module_type`
|
||||
mid=`module_id`
|
||||
|
||||
has_um=`mcsGetConfig SystemModuleConfig ModuleCount2`
|
||||
has_um=`@ENGINE_BINDIR@/mcsGetConfig SystemModuleConfig ModuleCount2`
|
||||
if [ "x$has_um" = x ]; then
|
||||
has_um=0
|
||||
fi
|
||||
|
||||
lockdir=`mcsGetConfig Installation LockFileDirectory`
|
||||
lockdir=`@ENGINE_BINDIR@/mcsGetConfig Installation LockFileDirectory`
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`@ENGINE_BINDIR@/mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
if [ $USER == "root" ]; then
|
||||
chmod 777 $tmpDir
|
||||
fi
|
||||
|
||||
checkInstallSetup() {
|
||||
InitialInstallFlag=`mcsGetConfig -c @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml Installation InitialInstallFlag`
|
||||
InitialInstallFlag=`@ENGINE_BINDIR@/mcsGetConfig -c @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml Installation InitialInstallFlag`
|
||||
if [ $InitialInstallFlag != "y" ]; then
|
||||
echo "Please run the postConfigure install script, check the Installation Guide"
|
||||
echo "for additional details"
|
||||
@@ -76,7 +76,7 @@ start() {
|
||||
|
||||
#checkInstallSetup
|
||||
|
||||
CoreFileFlag=`mcsGetConfig -c @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml Installation CoreFileFlag`
|
||||
CoreFileFlag=`@ENGINE_BINDIR@/mcsGetConfig -c @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml Installation CoreFileFlag`
|
||||
if [ $CoreFileFlag = "y" ]; then
|
||||
#columnstore core files
|
||||
ulimit -c unlimited > /dev/null 2>&1
|
||||
|
@@ -50,7 +50,7 @@ columnstoreSyslogFile=@ENGINE_SUPPORTDIR@/columnstoreSyslog
|
||||
columnstoreSyslogFile7=@ENGINE_SUPPORTDIR@/columnstoreSyslog7
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
tmpDir=`@ENGINE_BINDIR@/mcsGetConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
checkSyslog() {
|
||||
#check which syslog daemon is being used
|
||||
@@ -176,7 +176,7 @@ install() {
|
||||
makeDir
|
||||
checkSyslog
|
||||
if [ ! -z "$syslog_conf" ] ; then
|
||||
mcsSetConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1
|
||||
@ENGINE_BINDIR@/mcsSetConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1
|
||||
if [ $non_root_user == "yes" ]; then
|
||||
chown $user:$user @ENGINE_SYSCONFDIR@/columnstore/Columnstore.xml*
|
||||
fi
|
||||
|
@@ -51,7 +51,7 @@ if __name__ == '__main__':
|
||||
|
||||
dbrmroot = config_root.find('./SystemConfig/DBRMRoot').text
|
||||
pmCount = int(config_root.find('./SystemModuleConfig/ModuleCount3').text)
|
||||
loadbrm = '/usr/bin/load_brm'
|
||||
loadbrm = '@ENGINE_BINDIR@/load_brm'
|
||||
|
||||
brm_saves_current = ''
|
||||
|
||||
|
@@ -36,7 +36,7 @@ if __name__ == '__main__':
|
||||
storage = sm_config.get('ObjectStorage', 'service')
|
||||
|
||||
default_addr = '127.0.0.1'
|
||||
savebrm = 'save_brm'
|
||||
savebrm = '@ENGINE_BINDIR@/save_brm'
|
||||
is_primary = False
|
||||
|
||||
# For multi-node with local storage or default installations
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
/bin/kill -15 "$1"
|
||||
timeout=$(mcsGetConfig SystemConfig DBRMTimeout)
|
||||
timeout=$(@ENGINE_BINDIR@/mcsGetConfig SystemConfig DBRMTimeout)
|
||||
|
||||
while [ -n "$(pgrep -x controllernode)" ] && [ $timeout -gt 0 ]
|
||||
do
|
||||
|
Reference in New Issue
Block a user