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