You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-18 13:54:11 +03:00
MCOL-715 - fixed um storage type setup
This commit is contained in:
@@ -4,7 +4,12 @@
|
||||
#
|
||||
# 1. Amazon EC2
|
||||
|
||||
prefix=/usr/local
|
||||
if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
|
||||
|
||||
#check command
|
||||
if [ "$1" = "" ]; then
|
||||
@@ -87,9 +92,9 @@ if [ "$1" = "deassignElasticIP" ]; then
|
||||
fi
|
||||
|
||||
|
||||
$prefix/mariadb/columnstore/bin/MCSgetCredentials.sh >/dev/null 2>&1
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/MCSgetCredentials.sh >/dev/null 2>&1
|
||||
|
||||
test -f $prefix//mariadb/columnstore/post/functions && . $prefix//mariadb/columnstore/post/functions
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
|
||||
#default instance to null
|
||||
instance=""
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
#
|
||||
# 1. Amazon EC2
|
||||
|
||||
prefix=/usr/local
|
||||
if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
export COLUMNSTORE_INSTALL_DIR=$COLUMNSTORE_INSTALL_DIR
|
||||
|
||||
#check command
|
||||
if [ "$1" = "" ]; then
|
||||
@@ -93,14 +97,14 @@ if [ "$1" = "createTag" ]; then
|
||||
fi
|
||||
|
||||
|
||||
test -f $prefix/mariadb/columnstore/post/functions && . $prefix/mariadb/columnstore/post/functions
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
|
||||
AWSCLI="aws ec2 "
|
||||
|
||||
$prefix/mariadb/columnstore/bin/MCSgetCredentials.sh >/dev/null 2>&1
|
||||
$COLUMNSTORE_INSTALL_DIR/MCSgetCredentials.sh >/dev/null 2>&1
|
||||
|
||||
#get Region
|
||||
Region=`$prefix/mariadb/columnstore/bin/MCSInstanceCmds.sh getRegion`
|
||||
Region=`$COLUMNSTORE_INSTALL_DIR/bin/MCSInstanceCmds.sh getRegion`
|
||||
|
||||
checkInfostatus() {
|
||||
#check if attached
|
||||
@@ -153,21 +157,21 @@ checkInfostatus() {
|
||||
|
||||
createvolume() {
|
||||
# get zone
|
||||
zone=`$prefix/mariadb/columnstore/bin/MCSInstanceCmds.sh getZone`
|
||||
zone=`$COLUMNSTORE_INSTALL_DIR/bin/MCSInstanceCmds.sh getZone`
|
||||
|
||||
if [ $moduleType == "um" ]; then
|
||||
# get type
|
||||
volumeType=`$prefix/mariadb/columnstore/bin/getConfig Installation UMVolumeType`
|
||||
volumeType=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeType`
|
||||
if [ $volumeType == "io1" ]; then
|
||||
# get IOPS
|
||||
volumeIOPS=`$prefix/mariadb/columnstore/bin/getConfig Installation UMVolumeIOPS`
|
||||
volumeIOPS=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeIOPS`
|
||||
fi
|
||||
else # pm
|
||||
# get type
|
||||
volumeType=`$prefix/mariadb/columnstore/bin/getConfig Installation PMVolumeType`
|
||||
volumeType=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation PMVolumeType`
|
||||
if [ $volumeType == "io1" ]; then
|
||||
# get IOPS
|
||||
volumeIOPS=`$prefix/mariadb/columnstore/bin/getConfig Installation PMVolumeIOPS`
|
||||
volumeIOPS=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation PMVolumeIOPS`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -211,7 +215,7 @@ detachvolume() {
|
||||
sleep 1
|
||||
done
|
||||
test -f /usr/local/mariadb/columnstore/post/functions && . /usr/local/mariadb/columnstore/post/functions
|
||||
$prefix/mariadb/columnstore/bin/cplogger -w 100 "detachvolume failed: $STATUS"
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/cplogger -w 100 "detachvolume failed: $STATUS"
|
||||
echo "failed"
|
||||
exit 1
|
||||
fi
|
||||
@@ -221,8 +225,8 @@ detachvolume() {
|
||||
exit 0
|
||||
fi
|
||||
|
||||
test -f /usr/local/mariadb/columnstore/post/functions && . /usr/local/mariadb/columnstore/post/functions
|
||||
$prefix/mariadb/columnstore/bin/cplogger -w 100 "detachvolume failed status: $STATUS"
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/cplogger -w 100 "detachvolume failed status: $STATUS"
|
||||
echo $STATUS
|
||||
exit 1
|
||||
}
|
||||
@@ -245,8 +249,8 @@ attachvolume() {
|
||||
((retries++))
|
||||
sleep 1
|
||||
done
|
||||
test -f /usr/local/mariadb/columnstore/post/functions && . /usr/local/mariadb/columnstore/post/functions
|
||||
$prefix/mariadb/columnstore/bin/cplogger -w 100 "attachvolume failed: $STATUS"
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/cplogger -w 100 "attachvolume failed: $STATUS"
|
||||
echo "failed"
|
||||
exit 1
|
||||
fi
|
||||
@@ -256,8 +260,8 @@ attachvolume() {
|
||||
exit 0
|
||||
fi
|
||||
|
||||
test -f /usr/local/mariadb/columnstore/post/functions && . /usr/local/mariadb/columnstore/post/functions
|
||||
$prefix/mariadb/columnstore/bin/cplogger -w 100 "attachvolume failed: $STATUS"
|
||||
test -f $COLUMNSTORE_INSTALL_DIR/post/functions && . $COLUMNSTORE_INSTALL_DIR/post/functions
|
||||
$COLUMNSTORE_INSTALL_DIR/bin/cplogger -w 100 "attachvolume failed: $STATUS"
|
||||
echo $STATUS
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||
cat $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
||||
else
|
||||
sudo touch /etc/fstab
|
||||
sudo chmod 666 /etc/fstab
|
||||
sudo rm -f /etc/fstab.columnstoreSave
|
||||
sudo cp /etc/fstab /etc/fstab.columnstoreSave
|
||||
sudo cat $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
||||
|
||||
@@ -229,12 +229,12 @@ else
|
||||
$SUDO mkdir /var/lock/subsys > /dev/null 2>&1
|
||||
$SUDO chmod 777 /var/lock/subsys > /dev/null 2>&1
|
||||
$SUDO rm -f /var/lock/subsys/mysql-Columnstore
|
||||
$SUDO chmod 644 /etc/fstab
|
||||
$SUDO chmod 666 /etc/fstab
|
||||
fi
|
||||
|
||||
# install Columnstore Log Rotate File
|
||||
$SUDO cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
|
||||
$SUDO chmod 644 /etc/logrotate.d/columnstore
|
||||
$SUDO chmod 666 /etc/logrotate.d/columnstore
|
||||
|
||||
#check if MariaDB Columnstore system logging was setup
|
||||
cat /tmp/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1
|
||||
|
||||
@@ -4213,7 +4213,7 @@ bool storageSetup(bool amazonInstall)
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( UMVolumeType.empty() || UMVolumeType == "")
|
||||
if ( UMVolumeType.empty() || UMVolumeType == "" || UMVolumeType == oam::UnassignedName)
|
||||
UMVolumeType = "gp2";
|
||||
|
||||
while(true)
|
||||
@@ -4311,7 +4311,7 @@ bool storageSetup(bool amazonInstall)
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( UMVolumeIOPS.empty() || UMVolumeIOPS == "")
|
||||
if ( UMVolumeIOPS.empty() || UMVolumeIOPS == "" || UMVolumeIOPS == oam::UnassignedName)
|
||||
UMVolumeIOPS = maxIOPS;
|
||||
|
||||
while(true)
|
||||
@@ -4556,7 +4556,7 @@ bool storageSetup(bool amazonInstall)
|
||||
catch(...)
|
||||
{}
|
||||
|
||||
if ( PMVolumeType.empty() || PMVolumeType == "")
|
||||
if ( PMVolumeType.empty() || PMVolumeType == "" || PMVolumeType == oam::UnassignedName)
|
||||
PMVolumeType = "gp2";
|
||||
|
||||
while(true)
|
||||
@@ -4739,7 +4739,7 @@ bool storageSetup(bool amazonInstall)
|
||||
DataFileEnvFile = "setenv-hdfs-20";
|
||||
}
|
||||
|
||||
if (DataFileEnvFile.empty() || DataFileEnvFile == "")
|
||||
if (DataFileEnvFile.empty() || DataFileEnvFile == "" || DataFileEnvFile == oam::UnassignedName)
|
||||
DataFileEnvFile = "setenv-hdfs-20";
|
||||
|
||||
cout << endl;
|
||||
|
||||
Reference in New Issue
Block a user