You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
add ems type support
This commit is contained in:
11
oam/cloud/IDBInstanceCmds.sh
Executable file → Normal file
11
oam/cloud/IDBInstanceCmds.sh
Executable file → Normal file
@@ -111,9 +111,20 @@ export JAVA_HOME=$java
|
|||||||
|
|
||||||
# get Keys and region
|
# get Keys and region
|
||||||
AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey`
|
AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey`
|
||||||
|
if [ $AmazonAccessKeyfile == "unassigned" ]; then
|
||||||
|
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
AmazonSecretKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonSecretKey`
|
AmazonSecretKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonSecretKey`
|
||||||
|
if [ $AmazonSecretKeyFile == "unassigned" ]; then
|
||||||
|
echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
AmazonAccessKey=`cat $AmazonAccessKeyFile`
|
AmazonAccessKey=`cat $AmazonAccessKeyFile`
|
||||||
AmazonSecretKey=`cat $AmazonSecretKeyFile`
|
AmazonSecretKey=`cat $AmazonSecretKeyFile`
|
||||||
|
|
||||||
Region=`$prefix/Calpont/bin/getConfig Installation AmazonRegion`
|
Region=`$prefix/Calpont/bin/getConfig Installation AmazonRegion`
|
||||||
subnet=`$prefix/Calpont/bin/getConfig Installation AmazonSubNetID`
|
subnet=`$prefix/Calpont/bin/getConfig Installation AmazonSubNetID`
|
||||||
|
|
||||||
|
@@ -18,6 +18,13 @@ if [ "$1" = "create" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
volumeSize="$2"
|
volumeSize="$2"
|
||||||
|
|
||||||
|
#get module-type
|
||||||
|
if [ "$3" = "" ]; then
|
||||||
|
echo "Enter Module Type"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
moduleType="$3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "describe" ]; then
|
if [ "$1" = "describe" ]; then
|
||||||
@@ -104,12 +111,20 @@ export JAVA_HOME=$java
|
|||||||
|
|
||||||
# get Keys and region
|
# get Keys and region
|
||||||
AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey`
|
AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey`
|
||||||
|
if [ $AmazonAccessKeyfile == "unassigned" ]; then
|
||||||
|
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
AmazonSecretKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonSecretKey`
|
AmazonSecretKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonSecretKey`
|
||||||
|
if [ $AmazonSecretKeyFile == "unassigned" ]; then
|
||||||
|
echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
AmazonAccessKey=`cat $AmazonAccessKeyFile`
|
AmazonAccessKey=`cat $AmazonAccessKeyFile`
|
||||||
AmazonSecretKey=`cat $AmazonSecretKeyFile`
|
AmazonSecretKey=`cat $AmazonSecretKeyFile`
|
||||||
|
|
||||||
Region=`$prefix/Calpont/bin/getConfig Installation AmazonRegion`
|
|
||||||
|
|
||||||
if test ! -f $AmazonAccessKeyfile ; then
|
if test ! -f $AmazonAccessKeyfile ; then
|
||||||
echo "FAILED: missing AmazonAccessKeyfile : $AmazonAccessKeyfile"
|
echo "FAILED: missing AmazonAccessKeyfile : $AmazonAccessKeyfile"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -120,6 +135,8 @@ if test ! -f $AmazonSecretKeyfile ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Region=`$prefix/Calpont/bin/getConfig Installation AmazonRegion`
|
||||||
|
|
||||||
|
|
||||||
checkInfostatus() {
|
checkInfostatus() {
|
||||||
#check if attached
|
#check if attached
|
||||||
@@ -173,11 +190,29 @@ checkInfostatus() {
|
|||||||
createvolume() {
|
createvolume() {
|
||||||
# get zone
|
# get zone
|
||||||
zone=`$prefix/Calpont/bin/IDBInstanceCmds.sh getZone`
|
zone=`$prefix/Calpont/bin/IDBInstanceCmds.sh getZone`
|
||||||
#create volume
|
|
||||||
volume=`ec2-create-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -z $zone -s $volumeSize | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
|
||||||
|
|
||||||
# #get volume name
|
if [ $moduleType == "um" ]; then
|
||||||
# volume=`cat /tmp/volumeCreate_$resourceName | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
# get type
|
||||||
|
volumeType=`$prefix/Calpont/bin/IDBInstanceCmds.sh UMVolumeType`
|
||||||
|
if [ $volumeType == "io1" ]; then
|
||||||
|
# get IOPS
|
||||||
|
volumeIOPS=`$prefix/Calpont/bin/IDBInstanceCmds.sh UMVolumeIOPS`
|
||||||
|
fi
|
||||||
|
else # pm
|
||||||
|
# get type
|
||||||
|
volumeType=`$prefix/Calpont/bin/IDBInstanceCmds.sh PMVolumeType`
|
||||||
|
if [ $volumeType == "io1" ]; then
|
||||||
|
# get IOPS
|
||||||
|
volumeIOPS=`$prefix/Calpont/bin/IDBInstanceCmds.sh PMVolumeIOPS`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#create volume
|
||||||
|
if [ $volumeType == "io1" ]; then
|
||||||
|
volume=`ec2-create-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -z $zone -s $volumeSize -t volumeType -iops $volumeIOPS | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
||||||
|
else
|
||||||
|
volume=`ec2-create-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -z $zone -s $volumeSize -t volumeType | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
|
||||||
|
|
||||||
echo $volume
|
echo $volume
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@@ -5939,7 +5939,7 @@ namespace oam
|
|||||||
catch(...) {}
|
catch(...) {}
|
||||||
|
|
||||||
writeLog("addUMdisk - Create new Volume for um" + itoa(moduleID), LOG_TYPE_DEBUG);
|
writeLog("addUMdisk - Create new Volume for um" + itoa(moduleID), LOG_TYPE_DEBUG);
|
||||||
volumeName = createEC2Volume(UMVolumeSize);
|
volumeName = createEC2Volume(UMVolumeSize, "um");
|
||||||
if ( volumeName == "failed" ) {
|
if ( volumeName == "failed" ) {
|
||||||
writeLog("addModule: create volume failed", LOG_TYPE_CRITICAL);
|
writeLog("addModule: create volume failed", LOG_TYPE_CRITICAL);
|
||||||
exceptionControl("addUMdisk", API_FAILURE);
|
exceptionControl("addUMdisk", API_FAILURE);
|
||||||
@@ -6120,7 +6120,7 @@ namespace oam
|
|||||||
int retry = 0;
|
int retry = 0;
|
||||||
for ( ; retry < 5 ; retry++ )
|
for ( ; retry < 5 ; retry++ )
|
||||||
{
|
{
|
||||||
volumeName = createEC2Volume(volumeSize);
|
volumeName = createEC2Volume(volumeSize, "pm");
|
||||||
|
|
||||||
if ( volumeName == "failed" || volumeName.empty() )
|
if ( volumeName == "failed" || volumeName.empty() )
|
||||||
retry = retry;
|
retry = retry;
|
||||||
@@ -7839,7 +7839,7 @@ namespace oam
|
|||||||
std::string Oam::createEC2Volume(std::string size, std::string name)
|
std::string Oam::createEC2Volume(std::string size, std::string name)
|
||||||
{
|
{
|
||||||
// run script to get Volume Status
|
// run script to get Volume Status
|
||||||
string cmd = InstallDir + "/bin/IDBVolumeCmds.sh create " + size + " > /tmp/createVolumeStatus_" + name;
|
string cmd = InstallDir + "/bin/IDBVolumeCmds.sh create " + size + " " + name + " > /tmp/createVolumeStatus_" + name;
|
||||||
int ret = system(cmd.c_str());
|
int ret = system(cmd.c_str());
|
||||||
if (WEXITSTATUS(ret) != 0 )
|
if (WEXITSTATUS(ret) != 0 )
|
||||||
return "failed";
|
return "failed";
|
||||||
|
Reference in New Issue
Block a user