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
fix(build): Fixing build for S3 with "LocalStorage" type.
This commit is contained in:
committed by
Leonid Fedorov
parent
97f58e8592
commit
a8c4a7673c
@ -45,6 +45,7 @@ optparse.define short=M long=skip-smoke desc="Skip final smoke test" variable=SK
|
|||||||
optparse.define short=n long=no-clean-install desc="Do not perform a clean install (keep existing db files)" variable=NO_CLEAN default=false value=true
|
optparse.define short=n long=no-clean-install desc="Do not perform a clean install (keep existing db files)" variable=NO_CLEAN default=false value=true
|
||||||
optparse.define short=j long=parallel desc="Number of paralles for build" variable=CPUS default=$(getconf _NPROCESSORS_ONLN)
|
optparse.define short=j long=parallel desc="Number of paralles for build" variable=CPUS default=$(getconf _NPROCESSORS_ONLN)
|
||||||
optparse.define short=F long=show-build-flags desc="Print CMake flags, while build" variable=PRINT_CMAKE_FLAGS default=false
|
optparse.define short=F long=show-build-flags desc="Print CMake flags, while build" variable=PRINT_CMAKE_FLAGS default=false
|
||||||
|
optparse.define short=c long=cloud desc="Enable cloud storage" variable=CLOUD_STORAGE_ENABLED default=false value=true
|
||||||
|
|
||||||
source $( optparse.build )
|
source $( optparse.build )
|
||||||
|
|
||||||
@ -141,6 +142,7 @@ stop_service()
|
|||||||
message "Stopping MariaDB services"
|
message "Stopping MariaDB services"
|
||||||
systemctl stop mariadb
|
systemctl stop mariadb
|
||||||
systemctl stop mariadb-columnstore
|
systemctl stop mariadb-columnstore
|
||||||
|
systemctl stop mcs-storagemanager
|
||||||
}
|
}
|
||||||
|
|
||||||
check_service()
|
check_service()
|
||||||
@ -170,6 +172,17 @@ start_service()
|
|||||||
check_service mcs-writeengineserver
|
check_service mcs-writeengineserver
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start_storage_manager_if_needed()
|
||||||
|
{
|
||||||
|
if [[ $CLOUD_STORAGE_ENABLED = true ]]; then
|
||||||
|
export MCS_USE_S3_STORAGE=1;
|
||||||
|
message_split
|
||||||
|
message "Starting Storage Manager service"
|
||||||
|
systemctl start mcs-storagemanager
|
||||||
|
check_service mcs-storagemanager
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
clean_old_installation()
|
clean_old_installation()
|
||||||
{
|
{
|
||||||
message_split
|
message_split
|
||||||
@ -177,8 +190,7 @@ clean_old_installation()
|
|||||||
rm -rf /var/lib/columnstore/data1/*
|
rm -rf /var/lib/columnstore/data1/*
|
||||||
rm -rf /var/lib/columnstore/data/
|
rm -rf /var/lib/columnstore/data/
|
||||||
rm -rf /var/lib/columnstore/local/
|
rm -rf /var/lib/columnstore/local/
|
||||||
rm -f /var/lib/columnstore/storagemanager/storagemanager-lock
|
rm -rf /var/lib/columnstore/storagemanager/*
|
||||||
rm -f /var/lib/columnstore/storagemanager/cs-initialized
|
|
||||||
rm -rf /var/log/mariadb/columnstore/*
|
rm -rf /var/log/mariadb/columnstore/*
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
rm -rf $REPORT_PATH
|
rm -rf $REPORT_PATH
|
||||||
@ -493,6 +505,8 @@ socket=/run/mysqld/mysqld.sock" > /etc/my.cnf.d/socket.cnf'
|
|||||||
|
|
||||||
ldconfig
|
ldconfig
|
||||||
|
|
||||||
|
start_storage_manager_if_needed
|
||||||
|
|
||||||
message "Running columnstore-post-install"
|
message "Running columnstore-post-install"
|
||||||
mkdir -p /var/lib/columnstore/local
|
mkdir -p /var/lib/columnstore/local
|
||||||
columnstore-post-install --rpmmode=install
|
columnstore-post-install --rpmmode=install
|
||||||
|
@ -312,6 +312,9 @@ if [ ! -z "$MCS_USE_S3_STORAGE" ] && [ $MCS_USE_S3_STORAGE -eq 1 ]; then
|
|||||||
fi
|
fi
|
||||||
if [ -z "$MCS_S3_BUCKET" ] || [[ -z "$MCS_S3_ACCESS_KEY_ID" && -z "$MCS_S3_ROLE_NAME" ]] || [[ -z "$MCS_S3_SECRET_ACCESS_KEY" && -z "$MCS_S3_ROLE_NAME" ]]; then
|
if [ -z "$MCS_S3_BUCKET" ] || [[ -z "$MCS_S3_ACCESS_KEY_ID" && -z "$MCS_S3_ROLE_NAME" ]] || [[ -z "$MCS_S3_SECRET_ACCESS_KEY" && -z "$MCS_S3_ROLE_NAME" ]]; then
|
||||||
echo "Using local storage."
|
echo "Using local storage."
|
||||||
|
@ENGINE_BINDIR@/mcsSetConfig -d Installation DBRootStorageType "storagemanager"
|
||||||
|
@ENGINE_BINDIR@/mcsSetConfig -d StorageManager Enabled "Y"
|
||||||
|
@ENGINE_BINDIR@/mcsSetConfig -d SystemConfig DataFilePlugin "libcloudio.so"
|
||||||
else
|
else
|
||||||
@ENGINE_BINDIR@/mcsSetConfig -d Installation DBRootStorageType "storagemanager"
|
@ENGINE_BINDIR@/mcsSetConfig -d Installation DBRootStorageType "storagemanager"
|
||||||
@ENGINE_BINDIR@/mcsSetConfig -d StorageManager Enabled "Y"
|
@ENGINE_BINDIR@/mcsSetConfig -d StorageManager Enabled "Y"
|
||||||
|
Reference in New Issue
Block a user