1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-03 23:42:03 +03:00

Merge pull request #90 from mariadb-corporation/1.0.6.1

1.0.6.1
This commit is contained in:
benthompson15
2017-01-11 12:01:35 -06:00
committed by GitHub
16 changed files with 654 additions and 958 deletions

View File

@@ -1,2 +1,2 @@
install(PROGRAMS MCSInstanceCmds.sh MCSVolumeCmds.sh DESTINATION ${ENGINE_BINDIR} COMPONENT platform) install(PROGRAMS MCSInstanceCmds.sh MCSVolumeCmds.sh MCSgetCredentials.sh DESTINATION ${ENGINE_BINDIR} COMPONENT platform)

422
oam/cloud/MCSInstanceCmds.sh Normal file → Executable file
View File

@@ -8,8 +8,7 @@ prefix=/usr/local
#check command #check command
if [ "$1" = "" ]; then if [ "$1" = "" ]; then
echo "Enter Command Name: {launchInstance|getInstance|getZone|getPrivateIP|getKey|getAMI|getType|terminateInstance|startInstance|assignElasticIP|deassignElasticIP|getProfile|stopInstance|getGroup|getSubnet} echo "Enter Command Name: {launchInstance|getInstance|getZone|getPrivateIP|getKey|getAMI|getType|terminateInstance|startInstance|assignElasticIP|deassignElasticIP|getProfile|stopInstance|getGroup|getSubnet|getVpc|getRegion|getRole}"
}"
exit 1 exit 1
fi fi
@@ -33,9 +32,9 @@ if [ "$1" = "launchInstance" ]; then
instanceType="$3" instanceType="$3"
fi fi
if [ "$4" = "" ]; then if [ "$4" = "" ]; then
group="unassigned" groupid="unassigned"
else else
group="$4" groupid="$4"
fi fi
fi fi
@@ -88,163 +87,77 @@ if [ "$1" = "deassignElasticIP" ]; then
fi fi
test -f /usr/local/mariadb/columnstore/post/functions && . /usr/local/mariadb/columnstore/post/functions $prefix/mariadb/columnstore/bin/MCSgetCredentials.sh >/dev/null 2>&1
ec2=`$prefix/mariadb/columnstore/bin/getConfig Installation EC2_HOME` test -f $prefix//mariadb/columnstore/post/functions && . $prefix//mariadb/columnstore/post/functions
if [ $ec2 == "unassigned" ]; then
if [ "$1" = "getPrivateIP" ]; then
echo "stopped"
exit 1
else
echo "unknown"
exit 1
fi
fi
java=`$prefix/mariadb/columnstore/bin/getConfig Installation JAVA_HOME`
path=`$prefix/mariadb/columnstore/bin/getConfig Installation EC2_PATH`
export PATH=$path
export EC2_HOME=$ec2
export JAVA_HOME=$java
# get Keys and region
AmazonAccessKeyFile=`$prefix/mariadb/columnstore/bin/getConfig Installation AmazonAccessKey`
if [ $AmazonAccessKeyFile == "unassigned" ]; then
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
exit 1
fi
AmazonSecretKeyFile=`$prefix/mariadb/columnstore/bin/getConfig Installation AmazonSecretKey`
if [ $AmazonSecretKeyFile == "unassigned" ]; then
echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile"
exit 1
fi
AmazonAccessKey=`cat $AmazonAccessKeyFile`
AmazonSecretKey=`cat $AmazonSecretKeyFile`
Region=`$prefix/mariadb/columnstore/bin/getConfig Installation AmazonRegion`
subnet=`$prefix/mariadb/columnstore/bin/getConfig Installation AmazonSubNetID`
if test ! -f $AmazonAccessKeyfile ; then
echo "FAILED: missing AmazonAccessKeyfile : $AmazonAccessKeyfile"
exit 1
fi
if test ! -f $AmazonSecretKeyfile ; then
echo "FAILED: missing AmazonSecretKeyfile : $AmazonSecretKeyfile"
exit 1
fi
#default instance to null #default instance to null
instance="" instance=""
describeInstanceFile="/tmp/describeInstance.txt" AWSCLI="aws ec2 "
touch $describeInstanceFile
describeInstance() { getRegion() {
ec2-describe-instances -O $AmazonAccessKey -W $AmazonSecretKey --region $Region > $describeInstanceFile 2>&1 Region=`curl --silent http://169.254.169.254/latest/dynamic/instance-identity/document/region | grep region | cut -d':' -f2 | sed 's/\"//g' | sed 's/\,//g' | sed -e 's/^[ \t]*//'`
echo $Region
return
} }
#call at start up getRole() {
describeInstance #check for iam folder
iam=`curl -s http://169.254.169.254/latest/meta-data/ | grep iam`
if [ -z "$iam" ]; then
exit 1;
fi
Role=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/`
if [ -z "$Role" ]; then
exit 1;
fi
echo $Role
return
}
getInstance() { getInstance() {
if [ "$instance" != "" ]; then if [ "$instanceName" != "" ]; then
echo $instance echo $instanceName
return return
fi fi
# first get local IP Address instanceName=`curl -s http://169.254.169.254/latest/meta-data/instance-id`
localIP=`ifconfig eth0 | grep -m 1 "inet" | awk '{print substr($2,0,20)}'`
#get local Instance ID
instance=`cat $describeInstanceFile | grep -m 1 -w $localIP | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
if [ "$instance" == "" ]; then
describeInstance
fi
instance=`cat $describeInstanceFile | grep -m 1 -w $localIP | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
echo $instance
return
}
getInstancePrivate() {
if [ "$instance" != "" ]; then
echo $instance
return
fi
# first get local IP Address
localIP=`ifconfig eth0 | grep -m 1 "inet" | awk '{print substr($2,0,20)}'`
#get local Instance ID
instance=`cat $describeInstanceFile | grep -m 1 -w $localIP | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
if [ "$instance" == "" ]; then
describeInstance
fi
instance=`cat $describeInstanceFile | grep -m 1 -w $localIP | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
echo $instanceName
return return
} }
getZone() { getZone() {
#get from Columnstore.xml if it's there, if not, get from instance then store zone=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone`
zone=`$prefix/mariadb/columnstore/bin/getConfig Installation AmazonZone`
if [ "$zone" = "unassigned" ] || [ "$zone" = "" ]; then
#get local Instance ID
getInstancePrivate >/dev/null 2>&1
#get zone
if [ "$subnet" == "unassigned" ]; then
zone=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $11}'`
if [ "$zone" == "" ]; then
describeInstance
fi
zone=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $11}'`
else
zone=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $11}'`
if [ "$zone" == "" ]; then
describeInstance
fi
zone=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $11}'`
fi
$prefix/mariadb/columnstore/bin/setConfig Installation AmazonZone $zone
fi
echo $zone echo $zone
return return
} }
getPrivateIP() { getPrivateIP() {
#get instance info #get region
grep -B1 -A4 -m 1 $instanceName $describeInstanceFile > /tmp/instanceInfo_$instanceName 2>&1 getRegion >/dev/null 2>&1
if [ `cat /tmp/instanceInfo_$instanceName | wc -c` -eq 0 ]; then
describeInstance
fi
grep -B1 -A4 -m 1 $instanceName $describeInstanceFile > /tmp/instanceInfo_$instanceName 2>&1
#check if running or terminated #check if running or terminated
cat /tmp/instanceInfo_$instanceName | grep running > /tmp/instanceStatus_$instanceName state=`aws ec2 describe-instances --instance-ids $instanceName --region $Region --output text --query 'Reservations[*].Instances[*].State.Name'`
if [ `cat /tmp/instanceStatus_$instanceName | wc -c` -eq 0 ]; then if [ "$state" != "running" ]; then
# not running # not running
cat /tmp/instanceInfo_$instanceName | grep pending > /tmp/instanceStatus_$instanceName if [ "$state" != "stopped" ]; then
if [ `cat /tmp/instanceStatus_$instanceName | wc -c` -ne 0 ]; then
describeInstance
echo "stopped" echo "stopped"
exit 1 exit 1
else else
cat /tmp/instanceInfo_$instanceName | grep terminated > /tmp/instanceStatus_$instanceName if [ "$state" != "terminated" ]; then
if [ `cat /tmp/instanceStatus_$instanceName | wc -c` -ne 0 ]; then
echo "terminated" echo "terminated"
exit 1 exit 1
else else
cat /tmp/instanceInfo_$instanceName | grep shutting-down > /tmp/instanceStatus_$instanceName if [ "$state" != "shutting-down" ]; then
if [ `cat /tmp/instanceStatus_$instanceName | wc -c` -ne 0 ]; then
echo "terminated" echo "terminated"
exit 1 exit 1
else else
@@ -256,11 +169,7 @@ getPrivateIP() {
fi fi
#running, get priviate IP Address #running, get priviate IP Address
if [ "$subnet" == "unassigned" ]; then IpAddr=`aws ec2 describe-instances --instance-ids $instanceName --region $Region --output text --query 'Reservations[*].Instances[*].PrivateIpAddress'`
IpAddr=`head -n 2 /tmp/instanceInfo_$instanceName | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $14}'`
else
IpAddr=`head -n 2 /tmp/instanceInfo_$instanceName | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $14}'`
fi
echo $IpAddr echo $IpAddr
exit 0 exit 0
@@ -268,195 +177,155 @@ getPrivateIP() {
getType() { getType() {
#get local Instance ID #get local Instance ID
getInstancePrivate >/dev/null 2>&1 instanceType=`curl -s http://169.254.169.254/latest/meta-data/instance-type`
#get Type
if [ "$subnet" == "unassigned" ]; then
instanceType=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $9}'`
if [ "$instanceType" == "" ]; then
describeInstance
fi
instanceType=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $9}'`
else
instanceType=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $9}'`
if [ "$instanceType" == "" ]; then
describeInstance
fi
instanceType=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $9}'`
fi
echo $instanceType echo $instanceType
return return
} }
getKey() { getKey() {
#get region
getRegion >/dev/null 2>&1
#get local Instance ID #get local Instance ID
getInstancePrivate >/dev/null 2>&1 getInstance >/dev/null 2>&1
#get Key
if [ "$subnet" == "unassigned" ]; then key=`aws ec2 describe-instances --instance-ids $instanceName --region $Region --output text --query 'Reservations[*].Instances[*].KeyName'`
key=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $7}'`
if [ "$key" == "" ]; then
describeInstance
fi
key=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $7}'`
else
key=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $7}'`
if [ "$key" == "" ]; then
describeInstance
fi
key=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $7}'`
fi
echo $key echo $key
return return
} }
getVpc() {
#get region
getRegion >/dev/null 2>&1
#get local Instance ID
getInstance >/dev/null 2>&1
#get VCP
vpc=`aws ec2 describe-instances --instance-ids $instanceName --output text --region $Region --query 'Reservations[*].Instances[*].VpcId'`
echo $vpc
return
}
getAMI() { getAMI() {
#get local Instance ID #get local Instance ID
getInstancePrivate >/dev/null 2>&1 ami=`curl -s http://169.254.169.254/latest/meta-data/ami-id`
#get AMI
ami=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $3}'`
if [ "$ami" == "" ]; then
describeInstance
fi
ami=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $3}'`
echo $ami echo $ami
return return
} }
getGroup() { getGroup() {
#get local Instance ID #get region
getInstancePrivate >/dev/null 2>&1 getRegion >/dev/null 2>&1
#get group
if [ "$subnet" == "unassigned" ]; then
group=`grep -B1 -A4 -m 1 $instance $describeInstanceFile | grep -m 1 RESERVATION | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $4}'`
if [ "$group" == "" ]; then
describeInstance
fi
group=`grep -B1 -A4 -m 1 $instance $describeInstanceFile | grep -m 1 RESERVATION | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $4}'`
if [ "$group" == "" ]; then
group=`grep -B1 -A4 -m 1 $instance $describeInstanceFile | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $21}'`
fi
else
group=`grep -B1 -A6 -m 1 $instance $describeInstanceFile | grep -m 1 GROUP | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
if [ "$group" == "" ]; then
describeInstance
fi
group=`grep -B1 -A6 -m 1 $instance $describeInstanceFile | grep -m 1 GROUP | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
if [ "$group" == "" ]; then
group=`grep -B1 -A4 -m 1 $instance $describeInstanceFile | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $21}'`
fi
fi
echo $group #get group id
groupid=`aws ec2 describe-instances --instance-ids $instanceName --region $Region --output text --query 'Reservations[*].Instances[*].SecurityGroups[*].GroupId' | grep -m 1 sg`
echo $groupid
return return
} }
getProfile() { getProfile() {
#get local Instance ID #get region
getInstancePrivate >/dev/null 2>&1 getRegion >/dev/null 2>&1
#get Type
if [ "$subnet" == "unassigned" ]; then
instanceProfile=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $23}'`
if [ "$instanceProfile" == "" ]; then
describeInstance
fi
instanceProfile=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $23}'`
else # get profile
instanceProfile=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $22}'` instanceProfile=`curl -s http://169.254.169.254/latest/meta-data/profile`
if [ "$instanceProfile" == "" ]; then
describeInstance
fi
instanceProfile=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $22}'`
fi
echo $instanceProfile echo $instanceProfile
return return
} }
launchInstance() { launchInstance() {
#get region
getRegion >/dev/null 2>&1
#get publickey #get publickey
getKey >/dev/null 2>&1 getKey >/dev/null 2>&1
if [ "$group" = "unassigned" ]; then if [ "$groupid" = "unassigned" ]; then
#get group #get group
getGroup >/dev/null 2>&1 getGroup >/dev/null 2>&1
fi fi
#get AMI #get AMI
getAMI >/dev/null 2>&1 getAMI >/dev/null 2>&1
#get Zone #get Zone
getZone >/dev/null 2>&1 getZone >/dev/null 2>&1
if [ "$instanceType" = "unassigned" ]; then if [ "$instanceType" = "unassigned" ]; then
#get type #get type
getType >/dev/null 2>&1 getType >/dev/null 2>&1
fi fi
#get AMI Profile
getProfile >/dev/null 2>&1
if [ "$subnet" == "unassigned" ]; then #get Subnet
#NOT VPC getSubnet >/dev/null 2>&1
if [ "$instanceProfile" = "" ] || [ "$instanceProfile" = "default" ]; then
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -g $group -t $instanceType -z $zone --region $Region $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'` #get IAM Role
else getRole >/dev/null 2>&1
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -g $group -t $instanceType -z $zone -p $instanceProfile --region $Region $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
fi if [ "$Role" = "" ] || [ "$Role" = "default" ]; then
else # VPC if [ "$groupid" != "default" ]; then
if [ "$instanceProfile" = "" ] || [ "$instanceProfile" = "default" ]; then if [ "$IPaddress" = "autoassign" ] || [ "$IPaddress" = "unassigned" ] ; then
if [ "$group" != "default" ]; then newInstance=`$AWSCLI run-instances --region $Region --key-name $key --instance-type $instanceType --placement AvailabilityZone=$zone --subnet-id $subnet --image-id $ami --security-group-ids $groupid --query 'Instances[*].InstanceId' --output text`
if [ "$IPaddress" = "autoassign" ]; then
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -g $group -t $instanceType -z $zone --region $Region -s $subnet $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
else
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -g $group -t $instanceType -z $zone --region $Region -s $subnet --private-ip-address $IPaddress $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
fi
else else
if [ "$IPaddress" = "autoassign" ]; then newInstance=`$AWSCLI run-instances --region $Region --key-name $key --instance-type $instanceType --placement AvailabilityZone=$zone --subnet-id $subnet --private-ip-address $IPaddress --image-id $ami --query 'Instances[*].InstanceId' --output text`
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -t $instanceType -z $zone --region $Region -s $subnet $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
else
newInstance=`ec2-run-instances --O $AmazonAccessKey -W $AmazonSecretKey -k $key -t $instanceType -z $zone --region $Region -s $subnet --private-ip-address $IPaddress $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
fi
fi fi
else else
if [ "$group" != "default" ]; then if [ "$IPaddress" = "autoassign" ] || [ "$IPaddress" = "unassigned" ]; then
if [ "$IPaddress" = "autoassign" ]; then newInstance=`$AWSCLI run-instances --region $Region --key-name $key --instance-type $instanceType --placement AvailabilityZone=$zone --subnet-id $subnet --image-id $ami --query 'Instances[*].InstanceId' --output text`
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -g $group -t $instanceType -z $zone -p $instanceProfile --region $Region -s $subnet $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
else
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -g $group -t $instanceType -z $zone -p $instanceProfile --region $Region -s $subnet --private-ip-address $IPaddress $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'`
fi
else else
if [ "$IPaddress" = "autoassign" ]; then newInstance=`$AWSCLI run-instances --region $Region --key-name $key --instance-type $instanceType --placement AvailabilityZone=$zone --subnet-id $subnet --private-ip-address $IPaddress --image-id $ami --query 'Instances[*].InstanceId' --output text`
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -t $instanceType -z $zone -p $instanceProfile --region $Region -s $subnet $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'` fi
else fi
newInstance=`ec2-run-instances -O $AmazonAccessKey -W $AmazonSecretKey -k $key -t $instanceType -z $zone -p $instanceProfile --region $Region -s $subnet --private-ip-address $IPaddress $ami | grep -m 1 INSTANCE | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'` else
fi if [ "$groupid" != "default" ]; then
if [ "$IPaddress" = "autoassign" ] || [ "$IPaddress" = "unassigned" ]; then
newInstance=`$AWSCLI run-instances --region $Region --key-name $key --instance-type $instanceType --placement AvailabilityZone=$zone --iam-instance-profile "Name=$Role" --subnet-id $subnet --image-id $ami --security-group-ids $groupid --query 'Instances[*].InstanceId' --output text`
else
newInstance=`$AWSCLI run-instances --region $Region --key-name $key --instance-type $instanceType --placement AvailabilityZone=$zone --iam-instance-profile "Name=$Role" --subnet-id $subnet --private-ip-address $IPaddress --image-id $ami --security-group-ids $groupid --query 'Instances[*].InstanceId' --output text`
fi
else
if [ "$IPaddress" = "autoassign" ] || [ "$IPaddress" = "unassigned" ]; then
newInstance=`$AWSCLI run-instances --region $Region --key-name $key --instance-type $instanceType --placement AvailabilityZone=$zone --iam-instance-profile "Name=$Role" --subnet-id $subnet --image-id $ami --query 'Instances[*].InstanceId' --output text`
else
newInstance=`$AWSCLI run-instances --region $Region --key-name $key --instance-type $instanceType --placement AvailabilityZone=$zone --iam-instance-profile "Name=$Role" --subnet-id $subnet --private-ip-address $IPaddress --image-id $ami --query 'Instances[*].InstanceId' --output text`
fi fi
fi fi
fi fi
echo $newInstance echo $newInstance
return return
} }
terminateInstance() { terminateInstance() {
#get region
getRegion >/dev/null 2>&1
#terminate Instance #terminate Instance
ec2-terminate-instances -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $instanceName > /tmp/termInstanceInfo_$instanceName 2>&1 $AWSCLI terminate-instances --instance-ids $instanceName --region $Region > /tmp/termInstanceInfo_$instanceName 2>&1
return return
} }
stopInstance() { stopInstance() {
#get region
getRegion >/dev/null 2>&1
#terminate Instance #terminate Instance
ec2-stop-instances -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $instanceName > /tmp/stopInstanceInfo_$instanceName 2>&1 $AWSCLI stop-instances --instance-ids $instanceName --region $Region > /tmp/stopInstanceInfo_$instanceName 2>&1
return return
} }
startInstance() { startInstance() {
#terminate Instance #get region
ec2-start-instances -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $instanceName > /tmp/startInstanceInfo_$instanceName 2>&1 getRegion >/dev/null 2>&1
cat /tmp/startInstanceInfo_$instanceName | grep INSTANCE > /tmp/startInstanceStatus_$instanceName #terminate Instance
$AWSCLI start-instances --instance-ids $instanceName --region $Region > /tmp/startInstanceInfo_$instanceName 2>&1
cat /tmp/startInstanceInfo_$instanceName | grep InstanceId > /tmp/startInstanceStatus_$instanceName
if [ `cat /tmp/startInstanceStatus_$instanceName | wc -c` -eq 0 ]; then if [ `cat /tmp/startInstanceStatus_$instanceName | wc -c` -eq 0 ]; then
echo "Failed, check /tmp/startInstanceInfo_$instanceName" echo "Failed, check /tmp/startInstanceInfo_$instanceName"
exit 1 exit 1
@@ -466,17 +335,15 @@ startInstance() {
} }
assignElasticIP() { assignElasticIP() {
#terminate Instance #get region
getRegion >/dev/null 2>&1
if [ "$subnet" == "unassigned" ]; then EIP=`$AWSCLI describe-addresses --region $Region --public-ips $IPAddress --query 'Addresses[*].AllocationId' --output text`
ec2-associate-address -O $AmazonAccessKey -W $AmazonSecretKey -i $instanceName $IPAddress > /tmp/assignElasticIPInfo_$IPAddress 2>&1
else $AWSCLI associate-address --region $Region --instance-id $instanceName --allocation-id $EIP > /tmp/assignElasticIPInfo_$IPAddress 2>&1
EIP=`ec2-describe-addresses -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $IPAddress | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $4}'`
ec2-associate-address -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -i $instanceName -a $EIP > /tmp/assignElasticIPInfo_$IPAddress 2>&1
fi
cat /tmp/assignElasticIPInfo_$IPAddress | grep ADDRESS > /tmp/assignElasticIPStatus_$IPAddress cat /tmp/assignElasticIPInfo_$IPAddress | grep error > /tmp/assignElasticIPStatus_$IPAddress
if [ `cat /tmp/assignElasticIPStatus_$IPAddress | wc -c` -eq 0 ]; then if [ `cat /tmp/assignElasticIPStatus_$IPAddress | wc -c` -ne 0 ]; then
echo "Failed, check /tmp/assignElasticIPInfo_$IPAddress" echo "Failed, check /tmp/assignElasticIPInfo_$IPAddress"
exit 1 exit 1
fi fi
@@ -486,11 +353,14 @@ assignElasticIP() {
} }
deassignElasticIP() { deassignElasticIP() {
#terminate Instance #get region
ec2-disassociate-address -O $AmazonAccessKey -W $AmazonSecretKey $IPAddress > /tmp/deassignElasticIPInfo_$IPAddress 2>&1 getRegion >/dev/null 2>&1
cat /tmp/deassignElasticIPInfo_$IPAddress | grep ADDRESS > /tmp/deassignElasticIPStatus_$IPAddress EIP=`$AWSCLI describe-addresses --region $Region --public-ips $IPAddress --query 'Addresses[*].AssociationId' --output text`
if [ `cat /tmp/deassignElasticIPStatus_$IPAddress | wc -c` -eq 0 ]; then
$AWSCLI disassociate-address --region $Region --association-id $EIP > /tmp/deassignElasticIPInfo_$IPAddress 2>&1
cat /tmp/deassignElasticIPInfo_$IPAddress | grep error > /tmp/deassignElasticIPStatus_$IPAddress
if [ `cat /tmp/deassignElasticIPStatus_$IPAddress | wc -c` -ne 0 ]; then
echo "Failed, check /tmp/deassignElasticIPStatus_$IPAddress" echo "Failed, check /tmp/deassignElasticIPStatus_$IPAddress"
exit 1 exit 1
fi fi
@@ -500,14 +370,13 @@ deassignElasticIP() {
} }
getSubnet() { getSubnet() {
#get region
getRegion >/dev/null 2>&1
#get local Instance ID #get local Instance ID
getInstancePrivate >/dev/null 2>&1 getInstance >/dev/null 2>&1
#get Subnet #get Subnet
subnet=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $16}'` subnet=`aws ec2 describe-instances --instance-ids $instanceName --region $Region --output text --query 'Reservations[*].Instances[*].SubnetId'`
if [ "$subnet" == "" ]; then
describeInstance
fi
subnet=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $16}'`
if [[ $subnet == *"subnet"* ]] if [[ $subnet == *"subnet"* ]]
then then
@@ -566,8 +435,17 @@ case "$1" in
getSubnet) getSubnet)
getSubnet getSubnet
;; ;;
getVpc)
getVpc
;;
getRegion)
getRegion
;;
getRole)
getRole
;;
*) *)
echo $"Usage: $0 {launchInstance|getInstance|getZone|getPrivateIP|getType|getKey|getAMI|terminateInstance|startInstance|assignElasticIP|deassignElasticIP|getProfile|stopInstance|getGroup|getSubnet}" echo $"Usage: $0 {launchInstance|getInstance|getZone|getPrivateIP|getType|getKey|getAMI|terminateInstance|startInstance|assignElasticIP|deassignElasticIP|getProfile|stopInstance|getGroup|getSubnet|getVpc|getRegion|getRole}"
exit 1 exit 1
esac esac

60
oam/cloud/MCSVolumeCmds.sh Normal file → Executable file
View File

@@ -95,48 +95,12 @@ fi
test -f $prefix/mariadb/columnstore/post/functions && . $prefix/mariadb/columnstore/post/functions test -f $prefix/mariadb/columnstore/post/functions && . $prefix/mariadb/columnstore/post/functions
ec2=`$prefix/mariadb/columnstore/bin/getConfig Installation EC2_HOME` AWSCLI="aws ec2 "
if [ $ec2 == "unassigned" ]; then $prefix/mariadb/columnstore/bin/MCSgetCredentials.sh >/dev/null 2>&1
STATUS="unknown"
RETVAL=1
fi
java=`$prefix/mariadb/columnstore/bin/getConfig Installation JAVA_HOME`
path=`$prefix/mariadb/columnstore/bin/getConfig Installation EC2_PATH`
export PATH=$path
export EC2_HOME=$ec2
export JAVA_HOME=$java
# get Keys and region
AmazonAccessKeyFile=`$prefix/mariadb/columnstore/bin/getConfig Installation AmazonAccessKey`
if [ $AmazonAccessKeyFile == "unassigned" ]; then
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
exit 1
fi
AmazonSecretKeyFile=`$prefix/mariadb/columnstore/bin/getConfig Installation AmazonSecretKey`
if [ $AmazonSecretKeyFile == "unassigned" ]; then
echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile"
exit 1
fi
AmazonAccessKey=`cat $AmazonAccessKeyFile`
AmazonSecretKey=`cat $AmazonSecretKeyFile`
if test ! -f $AmazonAccessKeyfile ; then
echo "FAILED: missing AmazonAccessKeyfile : $AmazonAccessKeyfile"
exit 1
fi
if test ! -f $AmazonSecretKeyfile ; then
echo "FAILED: missing AmazonSecretKeyfile : $AmazonSecretKeyfile"
exit 1
fi
Region=`$prefix/mariadb/columnstore/bin/getConfig Installation AmazonRegion`
#get Region
Region=`$prefix/mariadb/columnstore/bin/MCSInstanceCmds.sh getRegion`
checkInfostatus() { checkInfostatus() {
#check if attached #check if attached
@@ -209,9 +173,9 @@ createvolume() {
#create volume #create volume
if [ $volumeType == "io1" ]; then 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}'` volume=`$AWSCLI create-volume --region $Region --availability-zone $zone --size $volumeSize --volume-type $volumeType --iops $volumeIOPS --output text --query VolumeId`
else else
volume=`ec2-create-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region -z $zone -s $volumeSize -t $volumeType | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $2}'` volume=`$AWSCLI create-volume --region $Region --availability-zone $zone --size $volumeSize --volume-type $volumeType --output text --query VolumeId`
fi fi
echo $volume echo $volume
@@ -220,7 +184,7 @@ createvolume() {
describevolume() { describevolume() {
#describe volume #describe volume
ec2-describe-volumes -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $volumeName > /tmp/volumeInfo_$volumeName 2>&1 $AWSCLI describe-volumes --volume-ids $volumeName --region $Region > /tmp/volumeInfo_$volumeName 2>&1
checkInfostatus checkInfostatus
echo $STATUS echo $STATUS
@@ -229,14 +193,14 @@ describevolume() {
detachvolume() { detachvolume() {
#detach volume #detach volume
ec2-detach-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $volumeName > /tmp/volumeInfo_$volumeName 2>&1 $AWSCLI detach-volume --volume-id $volumeName --region $Region > /tmp/volumeInfo_$volumeName 2>&1
checkInfostatus checkInfostatus
if [ $STATUS == "detaching" ]; then if [ $STATUS == "detaching" ]; then
retries=1 retries=1
while [ $retries -ne 60 ]; do while [ $retries -ne 60 ]; do
#retry until it's attached #retry until it's attached
ec2-detach-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $volumeName > /tmp/volumeInfo_$volumeName 2>&1 $AWSCLI detach-volume --volume-id $volumeName --region $Region > /tmp/volumeInfo_$volumeName 2>&1
checkInfostatus checkInfostatus
if [ $STATUS == "available" ]; then if [ $STATUS == "available" ]; then
@@ -266,7 +230,7 @@ detachvolume() {
attachvolume() { attachvolume() {
#detach volume #detach volume
ec2-attach-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $volumeName -i $instanceName -d $deviceName > /tmp/volumeInfo_$volumeName 2>&1 $AWSCLI attach-volume --volume-id $volumeName --instance-id $instanceName --device $deviceName --region $Region > /tmp/volumeInfo_$volumeName 2>&1
checkInfostatus checkInfostatus
if [ $STATUS == "attaching" -o $STATUS == "already-attached" ]; then if [ $STATUS == "attaching" -o $STATUS == "already-attached" ]; then
@@ -300,13 +264,13 @@ attachvolume() {
deletevolume() { deletevolume() {
#delete volume #delete volume
ec2-delete-volume -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $volumeName > /tmp/deletevolume_$volumeName 2>&1 $AWSCLI delete-volume --volume-id $volumeName --region $Region > /tmp/deletevolume_$volumeName 2>&1
return return
} }
createTag() { createTag() {
#create tag #create tag
ec2-create-tags -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $resourceName --tag $tagName=$tagValue > /tmp/createTag_$volumeName 2>&1 $AWSCLI create-tags --resources $resourceName --tags Key=$tagName,Value=$tagValue --region $Region > /tmp/createTag_$volumeName 2>&1
return return
} }

View File

@@ -0,0 +1,46 @@
#! /bin/sh
# Get Amazon EC2 security-credentials, access and secret access keys
#
#first check for local versions, then meta-data versions
if [ -f $HOME/.aws/credentials ]; then
echo "$HOME/.aws/credentials found, use local credentials"
exit 0
fi
#get IAM Role
#check for iam folder
iam=`curl -s http://169.254.169.254/latest/meta-data/ | grep iam`
if [ -z "$iam" ]; then
echo "No IAM in meta-data"
exit 1;
fi
Role=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/`
if [ -z "$Role" ]; then
echo "No Role in IAM meta-data"
exit 1;
fi
aws_access_key_id=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/${Role} | grep AccessKeyId | cut -d':' -f2 | sed 's/[^0-9A-Z]*//g'`
if [ -z "$aws_access_key_id" ]; then
echo "No Access-Key is blank in IAM meta-data"
exit 1;
fi
aws_secret_access_key=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/${Role} | grep SecretAccessKey | cut -d':' -f2 | sed 's/[^0-9A-Za-z/+=]*//g'`
if [ -z "$aws_secret_access_key" ]; then
echo "No Secret-Key is blank in IAM meta-data"
exit 1;
fi
echo $aws_access_key_id $aws_secret_access_key
#
export AWS_ACCESS_KEY_ID=${aws_access_key_id}
export AWS_SECRET_ACCESS_KEY=${aws_secret_access_key}
exit 0

View File

@@ -443,20 +443,15 @@
<SystemLogConfigFile>unassigned</SystemLogConfigFile> <SystemLogConfigFile>unassigned</SystemLogConfigFile>
<rpw>mariadb1</rpw> <rpw>mariadb1</rpw>
<Cloud>unassigned</Cloud> <Cloud>unassigned</Cloud>
<AmazonAccessKey>unassigned</AmazonAccessKey>
<AmazonSecretKey>unassigned</AmazonSecretKey>
<AmazonRegion>us-east-1</AmazonRegion>
<AmazonZone>unassigned</AmazonZone>
<AmazonSubNetID>unassigned</AmazonSubNetID>
<AmazonVPCNextPrivateIP>autoassign</AmazonVPCNextPrivateIP> <AmazonVPCNextPrivateIP>autoassign</AmazonVPCNextPrivateIP>
<UMInstanceType>unassigned</UMInstanceType> <UMInstanceType>unassigned</UMInstanceType>
<UMSecurityGroup>unassigned</UMSecurityGroup> <UMSecurityGroup>unassigned</UMSecurityGroup>
<UMVolumeSize>unassigned</UMVolumeSize> <UMVolumeSize>unassigned</UMVolumeSize>
<UMVolumeType>standard</UMVolumeType> <UMVolumeType>gp2</UMVolumeType>
<UMVolumeIOPS>unassigned</UMVolumeIOPS> <UMVolumeIOPS>unassigned</UMVolumeIOPS>
<PMInstanceType>unassigned</PMInstanceType> <PMInstanceType>unassigned</PMInstanceType>
<PMVolumeSize>unassigned</PMVolumeSize> <PMVolumeSize>unassigned</PMVolumeSize>
<PMVolumeType>standard</PMVolumeType> <PMVolumeType>gp2</PMVolumeType>
<PMVolumeIOPS>unassigned</PMVolumeIOPS> <PMVolumeIOPS>unassigned</PMVolumeIOPS>
<AmazonPMFailover>y</AmazonPMFailover> <AmazonPMFailover>y</AmazonPMFailover>
<AmazonAutoTagging>y</AmazonAutoTagging> <AmazonAutoTagging>y</AmazonAutoTagging>
@@ -467,8 +462,6 @@
<GlusterCopies>0</GlusterCopies> <GlusterCopies>0</GlusterCopies>
<GlusterStorageType>unassigned</GlusterStorageType> <GlusterStorageType>unassigned</GlusterStorageType>
<CoreFileFlag>n</CoreFileFlag> <CoreFileFlag>n</CoreFileFlag>
<JavaHome>unassigned</JavaHome>
<JavaPath>unassigned</JavaPath>
<MySQLPort>3306</MySQLPort> <MySQLPort>3306</MySQLPort>
<MySQLPasswordConfig>unassigned</MySQLPasswordConfig> <MySQLPasswordConfig>unassigned</MySQLPasswordConfig>
<AmazonDeviceName>/dev/xvd</AmazonDeviceName> <AmazonDeviceName>/dev/xvd</AmazonDeviceName>

View File

@@ -54,10 +54,10 @@ fi
export COLUMNSTORE_INSTALL_DIR=$installdir export COLUMNSTORE_INSTALL_DIR=$installdir
cloud=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation Cloud` cloud=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation Cloud`
if [ $module = "pm" ]; then if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then cp $COLUMNSTORE_INSTALL_DIR/local/etc/*.pem $HOME/. > /dev/null 2>&1
cp $COLUMNSTORE_INSTALL_DIR/local/etc/*.pem /root/. > /dev/null 2>&1
if [ $module = "pm" ]; then
if test -f $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab ; then if test -f $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab ; then
echo "Setup fstab on Module" echo "Setup fstab on Module"
touch /etc/fstab touch /etc/fstab

View File

@@ -249,15 +249,10 @@ if [ $rc1 -ne 0 -a $rc2 -ne 0 ]; then
echo " " >> ${bashFile} echo " " >> ${bashFile}
fi fi
#check and get amazon EC2 env variables #check and get amazon env variables
if [ -n "$EC2_HOME" ]; then aws=`which aws 2>/dev/null`
$installdir/bin/setConfig -d Installation EC2_HOME $EC2_HOME if [ -z "aws" ]; then
$installdir/bin/MCSgetCredentials.sh >/dev/null 2>&1
if [ -n "$EC2_HOME" ]; then
$installdir/bin/setConfig -d Installation JAVA_HOME $JAVA_HOME
fi
$installdir/bin/setConfig -d Installation EC2_PATH $PATH:/home/ec2/bin:/opt/aws/bin
fi fi
#log install message #log install message

View File

@@ -22,7 +22,6 @@ if {[info exists env(USER)]} {
if { $PASSWORD == "ssh" } { if { $PASSWORD == "ssh" } {
set USERNAME ""
set PASSWORD "" set PASSWORD ""
} }

View File

@@ -176,7 +176,7 @@ if [ ! -z "$syslog_conf" ] ; then
fi fi
fi fi
$SUDO etc/init.d/rsyslog restart > /dev/null 2>&1 $SUDO /etc/init.d/rsyslog restart > /dev/null 2>&1
$SUDO /etc/init.d/syslog restart > /dev/null 2>&1 $SUDO /etc/init.d/syslog restart > /dev/null 2>&1
$SUDO /etc/init.d/syslog-ng restart > /dev/null 2>&1 $SUDO /etc/init.d/syslog-ng restart > /dev/null 2>&1
@@ -212,7 +212,7 @@ if [ ! -z "$syslog_conf" ] ; then
$SUDO rm -f "$syslog_conf" $SUDO rm -f "$syslog_conf"
fi fi
$SUDO etc/init.d/rsyslog restart > /dev/null 2>&1 $SUDO /etc/init.d/rsyslog restart > /dev/null 2>&1
$SUDO /etc/init.d/syslog restart > /dev/null 2>&1 $SUDO /etc/init.d/syslog restart > /dev/null 2>&1
$SUDO /etc/init.d/syslog-ng restart > /dev/null 2>&1 $SUDO /etc/init.d/syslog-ng restart > /dev/null 2>&1

View File

@@ -5964,11 +5964,25 @@ 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, "um");
if ( volumeName == "failed" ) { cout << " Create AWS Volume for UM #" << itoa(moduleID) << endl;
writeLog("addModule: create volume failed", LOG_TYPE_CRITICAL);
exceptionControl("addUMdisk", API_FAILURE); int retry = 0;
} for ( ; retry < 5 ; retry++ )
{
volumeName = createEC2Volume(UMVolumeSize, "um");
if ( volumeName == "failed" || volumeName.empty() )
retry = retry;
else
break;
}
if ( retry >= 5 )
{
cout << " *** ERROR: Failed to create a Volume for um1 " << moduleID << endl;
exceptionControl("addUMdisk", API_FAILURE);
}
//attach and format volumes //attach and format volumes
device = "/dev/sdf"; device = "/dev/sdf";
@@ -5976,14 +5990,26 @@ namespace oam
string localInstance = getEC2LocalInstance(); string localInstance = getEC2LocalInstance();
//attach volumes to local instance //attach volumes to local instance
writeLog("addUMdisk - Attach new Volume to local instance: " + volumeName, LOG_TYPE_DEBUG); writeLog("addUMdisk - Attach new Volume to local instance: " + volumeName, LOG_TYPE_DEBUG);
if (!attachEC2Volume(volumeName, device, localInstance)) {
writeLog("addUMdisk: volume failed to attach to local instance", LOG_TYPE_CRITICAL); retry = 0;
exceptionControl("addUMdisk", API_FAILURE); for ( ; retry < 5 ; retry++ )
} {
if (!attachEC2Volume(volumeName, device, localInstance))
detachEC2Volume(volumeName);
else
break;
}
if ( retry >= 5 )
{
cout << " *** ERROR: Volume " << volumeName << " failed to attach to local instance" << endl;
exceptionControl("addUMdisk", API_FAILURE);
}
//format attached volume //format attached volume
writeLog("addUMdisk - Format new Volume for: " + volumeName, LOG_TYPE_DEBUG); writeLog("addUMdisk - Format new Volume for: " + volumeName, LOG_TYPE_DEBUG);
cout << " Formatting disk for UM #" << itoa(moduleID) << ", please wait..." << endl;
string cmd; string cmd;
int user; int user;

View File

@@ -176,7 +176,7 @@ bool waitForStop()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void handleSigTerm(int i) void handleSigTerm(int i)
{ {
std::cout << "Received SIGTERM to terminate MariaDB Columnstore Console..." << std::endl; std::cout << "Received SIGTERM to terminate MariaDB ColumnStore Console..." << std::endl;
} }
@@ -336,9 +336,9 @@ int main(int argc, char *argv[])
} }
else else
{ {
cout << endl << "MariaDB Columnstore Admin Console" << endl; cout << endl << "MariaDB ColumnStore Admin Console" << endl;
cout << " enter 'help' for list of commands" << endl; cout << " enter 'help' for list of commands" << endl;
cout << " enter 'exit' to exit the MariaDB Columnstore Command Console" << endl; cout << " enter 'exit' to exit the MariaDB ColumnStore Command Console" << endl;
cout << " use up/down arrows to recall commands" << endl << endl; cout << " use up/down arrows to recall commands" << endl << endl;
// output current active alarm stats // output current active alarm stats
@@ -707,7 +707,7 @@ int processCommand(string* arguments)
// close the log file // close the log file
writeLog("End of a command session!!!"); writeLog("End of a command session!!!");
logFile.close(); logFile.close();
cout << "Exiting the MariaDB Columnstore Admin Console" << endl; cout << "Exiting the MariaDB ColumnStore Admin Console" << endl;
exit (0); exit (0);
} }
@@ -2148,7 +2148,7 @@ int processCommand(string* arguments)
break; break;
} }
cout << endl << "This command stops the processing of applications on all Modules within the MariaDB Columnstore System" << endl; cout << endl << "This command stops the processing of applications on all Modules within the MariaDB ColumnStore System" << endl;
try try
{ {
@@ -2265,7 +2265,7 @@ int processCommand(string* arguments)
bool bDBRMReady = dbrm.isDBRMReady(); bool bDBRMReady = dbrm.isDBRMReady();
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm); getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
cout << endl << "This command stops the processing of applications on all Modules within the MariaDB Columnstore System" << endl; cout << endl << "This command stops the processing of applications on all Modules within the MariaDB ColumnStore System" << endl;
try try
{ {
@@ -2367,7 +2367,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1";
system(cmd.c_str()); system(cmd.c_str());
if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) { if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) {
cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl; cout << endl << "ERROR: Stopping MariaDB ColumnStore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl;
} }
} }
else else
@@ -2412,7 +2412,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1";
system(cmd.c_str()); system(cmd.c_str());
if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) { if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) {
cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl; cout << endl << "ERROR: Stopping MariaDB ColumnStore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl;
break; break;
} }
} }
@@ -2508,7 +2508,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1";
system(cmd.c_str()); system(cmd.c_str());
if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) { if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) {
cout << endl << "ERROR: Restart MariaDB Columnstore Service failure, check /tmp/cc-restart.pdsh. exit..." << endl; cout << endl << "ERROR: Restart MariaDB ColumnStore Service failure, check /tmp/cc-restart.pdsh. exit..." << endl;
break; break;
} }
} }
@@ -2727,7 +2727,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1";
system(cmd.c_str()); system(cmd.c_str());
if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) { if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) {
cout << endl << "ERROR: Restart MariaDB Columnstore Service failue, check /tmp/cc-restart.pdsh. exit..." << endl; cout << endl << "ERROR: Restart MariaDB ColumnStore Service failue, check /tmp/cc-restart.pdsh. exit..." << endl;
break; break;
} }
} }
@@ -3414,7 +3414,7 @@ int processCommand(string* arguments)
if ( MySQLRep == "y" && MySQLPasswordConfig == oam::UnassignedName ) { if ( MySQLRep == "y" && MySQLPasswordConfig == oam::UnassignedName ) {
cout << endl; cout << endl;
string prompt = "MariaDB Columnstore Replication is enabled, is there a 'MariaDB Columnstore' Password configured in " + HOME + "/.my.cnf (y,n): "; string prompt = "MariaDB ColumnStore Replication is enabled, is there a 'MariaDB ColumnStore' Password configured in " + HOME + "/.my.cnf (y,n): ";
MySQLPasswordConfig = dataPrompt(prompt); MySQLPasswordConfig = dataPrompt(prompt);
} }
@@ -3582,7 +3582,7 @@ int processCommand(string* arguments)
string configFileName; string configFileName;
oam.getSystemConfig("SystemLogConfigFile", configFileName); oam.getSystemConfig("SystemLogConfigFile", configFileName);
cout << endl << "MariaDB Columnstore System Log Configuration Data" << endl << endl; cout << endl << "MariaDB ColumnStore System Log Configuration Data" << endl << endl;
cout << "System Logging Configuration File being used: " << configFileName << endl << endl; cout << "System Logging Configuration File being used: " << configFileName << endl << endl;
@@ -3903,7 +3903,7 @@ int processCommand(string* arguments)
BRM::DBRM dbrm; BRM::DBRM dbrm;
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm); getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
cout << endl << "This command suspends the DDL/DML writes to the MariaDB Columnstore Database" << endl; cout << endl << "This command suspends the DDL/DML writes to the MariaDB ColumnStore Database" << endl;
try try
{ {
@@ -3984,7 +3984,7 @@ int processCommand(string* arguments)
break; break;
} }
// stop writes to MariaDB Columnstore Database // stop writes to MariaDB ColumnStore Database
oam.SuspendWrites(gracefulTemp, ackTemp); oam.SuspendWrites(gracefulTemp, ackTemp);
} }
catch (exception& e) catch (exception& e)
@@ -4002,11 +4002,11 @@ int processCommand(string* arguments)
case 33: // resumeDatabaseWrites case 33: // resumeDatabaseWrites
{ {
if ( arguments[1] != "y" ) { if ( arguments[1] != "y" ) {
if (confirmPrompt("This command resumes the DDL/DML writes to the MariaDB Columnstore Database")) if (confirmPrompt("This command resumes the DDL/DML writes to the MariaDB ColumnStore Database"))
break; break;
} }
// resume writes to MariaDB Columnstore Database // resume writes to MariaDB ColumnStore Database
try{ try{
SystemProcessStatus systemprocessstatus; SystemProcessStatus systemprocessstatus;
@@ -4031,7 +4031,7 @@ int processCommand(string* arguments)
} }
} }
oam.setSystemStatus(ACTIVE); oam.setSystemStatus(ACTIVE);
cout << endl << "Resume MariaDB Columnstore Database Writes Request successfully completed" << endl; cout << endl << "Resume MariaDB ColumnStore Database Writes Request successfully completed" << endl;
} }
catch (exception& e) catch (exception& e)
{ {
@@ -4593,7 +4593,7 @@ int processCommand(string* arguments)
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem setting AmazonElasticModule in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem setting AmazonElasticModule in the MariaDB ColumnStore System Configuration file" << endl;
break; break;
} }
@@ -4707,7 +4707,7 @@ int processCommand(string* arguments)
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem setting AmazonElasticModule in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem setting AmazonElasticModule in the MariaDB ColumnStore System Configuration file" << endl;
break; break;
} }
} }
@@ -4920,16 +4920,6 @@ int processCommand(string* arguments)
} }
catch(...) {} catch(...) {}
if ( cloud == "amazon-vpc" )
{
string AmazonSubNetID = oam::UnassignedName;
try{
oam.getSystemConfig("AmazonSubNetID", AmazonSubNetID);
cout << "AmazonSubNetID = " << AmazonSubNetID << endl;
}
catch(...) {}
}
} }
cout << endl; cout << endl;
@@ -4946,7 +4936,7 @@ int processCommand(string* arguments)
catch(...) {} catch(...) {}
if ( MySQLRep == "y" ) { if ( MySQLRep == "y" ) {
string warning = "MariaDB Columnstore Replication Feature is already enabled"; string warning = "MariaDB ColumnStore Replication Feature is already enabled";
// confirm request // confirm request
if (confirmPrompt(warning)) if (confirmPrompt(warning))
break; break;
@@ -4972,7 +4962,7 @@ int processCommand(string* arguments)
if ( MySQLPasswordConfig == oam::UnassignedName ) { if ( MySQLPasswordConfig == oam::UnassignedName ) {
cout << endl; cout << endl;
string prompt = "Is there a 'MariaDB Columnstore' Password configured on the MariaDB Columnstore Front-end Modules in " + HOME + "/.my.cnf (y,n): "; string prompt = "Is there a 'MariaDB ColumnStore' Password configured on the MariaDB ColumnStore Front-end Modules in " + HOME + "/.my.cnf (y,n): ";
MySQLPasswordConfig = dataPrompt(prompt); MySQLPasswordConfig = dataPrompt(prompt);
} }
@@ -4994,7 +4984,7 @@ int processCommand(string* arguments)
try try
{ {
oam.enableMySQLRep(password); oam.enableMySQLRep(password);
cout << endl << " Successful Enabling of MariaDB Columnstore Replication " << endl << endl; cout << endl << " Successful Enabling of MariaDB ColumnStore Replication " << endl << endl;
//display Primary UM Module / Master Node //display Primary UM Module / Master Node
string PrimaryUMModuleName; string PrimaryUMModuleName;
@@ -5003,7 +4993,7 @@ int processCommand(string* arguments)
} }
catch(...) {} catch(...) {}
cout << " MariaDB Columnstore Replication Master Node is " << PrimaryUMModuleName << endl << endl; cout << " MariaDB ColumnStore Replication Master Node is " << PrimaryUMModuleName << endl << endl;
} }
catch (exception& e) catch (exception& e)
{ {
@@ -5626,7 +5616,7 @@ int processCommand(string* arguments)
if ( localModule != parentOAMModule ) { if ( localModule != parentOAMModule ) {
// exit out since not on Parent OAM Module // exit out since not on Parent OAM Module
cout << endl << "**** addModule Failed : only should be run on the Parent OAM Module, which is '" << parentOAMModule << "'" << endl; cout << endl << "**** removeModule Failed : only should be run on the Parent OAM Module, which is '" << parentOAMModule << "'" << endl;
break; break;
} }
@@ -5653,7 +5643,7 @@ int processCommand(string* arguments)
if ( arguments[3] != "y") { if ( arguments[3] != "y") {
cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl; cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl;
string warning = "This command does a remove a module from the MariaDB Columnstore System"; string warning = "This command does a remove a module from the MariaDB ColumnStore System";
// confirm request // confirm request
if (confirmPrompt(warning)) if (confirmPrompt(warning))
break; break;
@@ -5718,7 +5708,7 @@ int processCommand(string* arguments)
if ( arguments[2] != "y") { if ( arguments[2] != "y") {
cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl; cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl;
string warning = "This command does a stop and remove a module from the MariaDB Columnstore System"; string warning = "This command does a stop and remove a module from the MariaDB ColumnStore System";
// confirm request // confirm request
if (confirmPrompt(warning)) if (confirmPrompt(warning))
break; break;
@@ -5926,7 +5916,7 @@ int processCommand(string* arguments)
catch(...) {} catch(...) {}
if ( MySQLRep == "n" ) { if ( MySQLRep == "n" ) {
string warning = "MariaDB Columnstore Replication Feature is already disable"; string warning = "MariaDB ColumnStore Replication Feature is already disable";
// confirm request // confirm request
if (confirmPrompt(warning)) if (confirmPrompt(warning))
break; break;
@@ -5940,7 +5930,7 @@ int processCommand(string* arguments)
if ( MySQLPasswordConfig == oam::UnassignedName ) { if ( MySQLPasswordConfig == oam::UnassignedName ) {
cout << endl; cout << endl;
string prompt = "Is there a 'MariaDB Columnstore' Password configured on the MariaDB Columnstore Front-end Modules in " + HOME + "/.my.cnf (y,n): "; string prompt = "Is there a 'MariaDB ColumnStore' Password configured on the MariaDB ColumnStore Front-end Modules in " + HOME + "/.my.cnf (y,n): ";
MySQLPasswordConfig = dataPrompt(prompt); MySQLPasswordConfig = dataPrompt(prompt);
} }
@@ -5962,7 +5952,7 @@ int processCommand(string* arguments)
try try
{ {
oam.disableMySQLRep(); oam.disableMySQLRep();
cout << endl << " Successful Disable of MariaDB Columnstore Replication " << endl; cout << endl << " Successful Disable of MariaDB ColumnStore Replication " << endl;
} }
catch (exception& e) catch (exception& e)
{ {
@@ -6719,7 +6709,7 @@ int processCommand(string* arguments)
{ {
// confirm request // confirm request
if ( arguments[2] != "y" ) { if ( arguments[2] != "y" ) {
if (confirmPrompt("This command stops the processing of applications on a Module within the MariaDB Columnstore System")) if (confirmPrompt("This command stops the processing of applications on a Module within the MariaDB ColumnStore System"))
break; break;
} }
} }
@@ -6845,7 +6835,7 @@ int processCommand(string* arguments)
// confirm request // confirm request
if ( arguments[2] != "y" ) { if ( arguments[2] != "y" ) {
if (confirmPrompt("This command starts the processing of applications on a Module within the MariaDB Columnstore System")) if (confirmPrompt("This command starts the processing of applications on a Module within the MariaDB ColumnStore System"))
break; break;
} }
@@ -6991,7 +6981,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{ {
// give warning for Process-Monitor // give warning for Process-Monitor
if ( arguments[1] == "ProcessManager" ) { if ( arguments[1] == "ProcessManager" ) {
if (confirmPrompt("ProcessManager is the Interface for the Console and should only be removed as part of a MariaDB Columnstore Package installation")) if (confirmPrompt("ProcessManager is the Interface for the Console and should only be removed as part of a MariaDB ColumnStore Package installation"))
break; break;
} }
else else
@@ -6999,7 +6989,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
if ( arguments[3] != "y" ) { if ( arguments[3] != "y" ) {
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm); getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
// confirm request // confirm request
if (confirmPrompt("This command stops the processing of an application on a Module within the MariaDB Columnstore System")) if (confirmPrompt("This command stops the processing of an application on a Module within the MariaDB ColumnStore System"))
break; break;
} }
} }
@@ -7054,7 +7044,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
if (arguments[3] != "y") if (arguments[3] != "y")
{ {
// confirm request // confirm request
if (confirmPrompt("This command restarts the processing of an application on a Module within the MariaDB Columnstore System")) if (confirmPrompt("This command restarts the processing of an application on a Module within the MariaDB ColumnStore System"))
break; break;
} }
@@ -7119,7 +7109,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
string password = arguments[1]; string password = arguments[1];
if ( arguments[2] != "y") { if ( arguments[2] != "y") {
cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl; cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl;
string warning = "This command stops the Processing of applications and reboots all modules within the MariaDB Columnstore System"; string warning = "This command stops the Processing of applications and reboots all modules within the MariaDB ColumnStore System";
// confirm request // confirm request
if (confirmPrompt(warning)) if (confirmPrompt(warning))
break; break;
@@ -7211,7 +7201,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
// close the log file // close the log file
writeLog("End of a command session!!!"); writeLog("End of a command session!!!");
logFile.close(); logFile.close();
cout << endl << "Exiting the MariaDB Columnstore Command Console" << endl; cout << endl << "Exiting the MariaDB ColumnStore Command Console" << endl;
exit (0); exit (0);
} }
} }
@@ -7242,7 +7232,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
string password = arguments[2]; string password = arguments[2];
if ( arguments[3] != "y") { if ( arguments[3] != "y") {
cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl; cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl;
string warning = "This command reboots a node within the MariaDB Columnstore System"; string warning = "This command reboots a node within the MariaDB ColumnStore System";
// confirm request // confirm request
if (confirmPrompt(warning)) if (confirmPrompt(warning))
break; break;
@@ -7281,7 +7271,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
// close the log file // close the log file
writeLog("End of a command session!!!"); writeLog("End of a command session!!!");
logFile.close(); logFile.close();
cout << endl << "Exiting the MariaDB Columnstore Command Console" << endl; cout << endl << "Exiting the MariaDB ColumnStore Command Console" << endl;
exit (0); exit (0);
} }
} }
@@ -7315,7 +7305,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{ {
if ( arguments[1] != "y" ) { if ( arguments[1] != "y" ) {
// confirm request // confirm request
if (confirmPrompt("This command stops the dbrm processes within the MariaDB Columnstore System")) if (confirmPrompt("This command stops the dbrm processes within the MariaDB ColumnStore System"))
break; break;
} }
@@ -7349,7 +7339,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{ {
if ( arguments[1] != "y" ) { if ( arguments[1] != "y" ) {
// confirm request // confirm request
if (confirmPrompt("This command restarts the dbrm processes within the MariaDB Columnstore System")) if (confirmPrompt("This command restarts the dbrm processes within the MariaDB ColumnStore System"))
break; break;
} }
@@ -7383,7 +7373,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem getting systemStartupOffline from the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem getting systemStartupOffline from the MariaDB ColumnStore System Configuration file" << endl;
return 1; return 1;
} }
@@ -7415,7 +7405,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem setting systemStartupOffline in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem setting systemStartupOffline in the MariaDB ColumnStore System Configuration file" << endl;
exit(-1); exit(-1);
} }
cout << endl << " Successful setting of systemStartupOffline to '" << systemStartupOffline << "'" << endl << endl; cout << endl << " Successful setting of systemStartupOffline to '" << systemStartupOffline << "'" << endl << endl;
@@ -7426,7 +7416,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{ {
if ( arguments[1] != "y" ) { if ( arguments[1] != "y" ) {
// confirm request // confirm request
if (confirmPrompt("This command stops the PrimProc processes within the MariaDB Columnstore System")) if (confirmPrompt("This command stops the PrimProc processes within the MariaDB ColumnStore System"))
break; break;
} }
@@ -7460,7 +7450,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{ {
if ( arguments[1] != "y" ) { if ( arguments[1] != "y" ) {
// confirm request // confirm request
if (confirmPrompt("This command restarts the PrimProc processes within the MariaDB Columnstore System")) if (confirmPrompt("This command restarts the PrimProc processes within the MariaDB ColumnStore System"))
break; break;
} }
@@ -7480,7 +7470,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{ {
if ( arguments[1] != "y" ) { if ( arguments[1] != "y" ) {
// confirm request // confirm request
if (confirmPrompt("This command stops the ExeMgr processes within the MariaDB Columnstore System")) if (confirmPrompt("This command stops the ExeMgr processes within the MariaDB ColumnStore System"))
break; break;
} }
@@ -7514,7 +7504,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{ {
if ( arguments[1] != "y" ) { if ( arguments[1] != "y" ) {
// confirm request // confirm request
if (confirmPrompt("This command restarts the ExeMgr processes within the MariaDB Columnstore System")) if (confirmPrompt("This command restarts the ExeMgr processes within the MariaDB ColumnStore System"))
break; break;
} }
@@ -7546,11 +7536,11 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
try try
{ {
oam.distributeConfigFile(name); oam.distributeConfigFile(name);
cout << endl << " Successful Distribution of MariaDB Columnstore Config File" << endl << endl; cout << endl << " Successful Distribution of MariaDB ColumnStore Config File" << endl << endl;
} }
catch (exception& e) catch (exception& e)
{ {
cout << endl << "**** Distribution of MariaDB Columnstore Config File Failed : " << e.what() << endl; cout << endl << "**** Distribution of MariaDB ColumnStore Config File Failed : " << e.what() << endl;
} }
} }
break; break;
@@ -8083,13 +8073,13 @@ void printSystemStatus()
if ( moduletypeconfig.ModuleCount > 1 ) if ( moduletypeconfig.ModuleCount > 1 )
{ {
if ( PrimaryUMModuleName != oam::UnassignedName ) if ( PrimaryUMModuleName != oam::UnassignedName )
cout << "Primary Front-End MariaDB Columnstore Module is '" << PrimaryUMModuleName << "'" << endl; cout << "Primary Front-End MariaDB ColumnStore Module is '" << PrimaryUMModuleName << "'" << endl;
} }
} }
else else
{ {
if ( PrimaryUMModuleName != oam::UnassignedName ) if ( PrimaryUMModuleName != oam::UnassignedName )
cout << "Primary Front-End MariaDB Columnstore Module is '" << PrimaryUMModuleName << "'" << endl; cout << "Primary Front-End MariaDB ColumnStore Module is '" << PrimaryUMModuleName << "'" << endl;
} }
} }
@@ -8111,7 +8101,7 @@ void printSystemStatus()
catch(...) {} catch(...) {}
if ( MySQLRep == "y" ) if ( MySQLRep == "y" )
cout << "MariaDB Columnstore Replication Feature is enabled" << endl << endl; cout << "MariaDB ColumnStore Replication Feature is enabled" << endl << endl;
} }
catch (exception& e) catch (exception& e)
{ {
@@ -8174,7 +8164,7 @@ void printProcessStatus(std::string port)
} }
} }
cout << endl << "MariaDB Columnstore Process statuses" << endl << endl; cout << endl << "MariaDB ColumnStore Process statuses" << endl << endl;
cout << "Process Module Status Last Status Change Process ID" << endl; cout << "Process Module Status Last Status Change Process ID" << endl;
cout << "------------------ ------ --------------- ------------------------ ----------" << endl; cout << "------------------ ------ --------------- ------------------------ ----------" << endl;
try try

View File

@@ -436,7 +436,7 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, std::st
returnStatus = sendMsgProcMon( (*pt).DeviceName, msg1, requestID, 600 ); returnStatus = sendMsgProcMon( (*pt).DeviceName, msg1, requestID, 600 );
if ( returnStatus != API_SUCCESS) { if ( returnStatus != API_SUCCESS) {
cout << endl << "ERROR: Error return in running the MariaDB Columnstore Master DB Distribute, check /tmp/master-dist*.logs on " << masterModule << endl; cout << endl << "ERROR: Error return in running the MariaDB ColumnStore Master DB Distribute, check /tmp/master-dist*.logs on " << masterModule << endl;
return returnStatus; return returnStatus;
} }
@@ -448,7 +448,7 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, std::st
returnStatus = sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 ); returnStatus = sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 );
if ( returnStatus != API_SUCCESS) { if ( returnStatus != API_SUCCESS) {
cout << endl << "ERROR: Error return in running the MariaDB Columnstore Master replication, check /tmp/master-rep*.logs on " << masterModule << endl; cout << endl << "ERROR: Error return in running the MariaDB ColumnStore Master replication, check /tmp/master-rep*.logs on " << masterModule << endl;
return returnStatus; return returnStatus;
} }
@@ -479,7 +479,7 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, std::st
returnStatus = sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 ); returnStatus = sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 );
if ( returnStatus != API_SUCCESS) { if ( returnStatus != API_SUCCESS) {
cout << endl << "ERROR: Error return in running the MariaDB Columnstore Slave replication, check /tmp/slave-rep*.logs on " << (*pt).DeviceName << endl; cout << endl << "ERROR: Error return in running the MariaDB ColumnStore Slave replication, check /tmp/slave-rep*.logs on " << (*pt).DeviceName << endl;
return returnStatus; return returnStatus;
} }
@@ -677,12 +677,12 @@ void checkMysqlPort( std::string& mysqlPort, Config* sysConfig )
int size = oldFile.tellg(); int size = oldFile.tellg();
if ( size != 0 ) { if ( size != 0 ) {
if ( noPrompting ) { if ( noPrompting ) {
cout << endl << "The MariaDB Columnstore port of '" + mysqlPort + "' is already in-use" << endl; cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use" << endl;
cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl;
exit(1); exit(1);
} }
cout << "The MariaDB Columnstore port of '" + mysqlPort + "' is already in-use on local server" << endl; cout << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on local server" << endl;
while(true) while(true)
{ {
@@ -697,7 +697,7 @@ void checkMysqlPort( std::string& mysqlPort, Config* sysConfig )
if ( atoi(mysqlPort.c_str()) < 1000 || atoi(mysqlPort.c_str()) > 9999) if ( atoi(mysqlPort.c_str()) < 1000 || atoi(mysqlPort.c_str()) > 9999)
{ {
cout << " ERROR: Invalid MariaDB Columnstore Port ID supplied, must be between 1000-9999" << endl; cout << " ERROR: Invalid MariaDB ColumnStore Port ID supplied, must be between 1000-9999" << endl;
} }
else else
break; break;
@@ -755,7 +755,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
int size = oldFile.tellg(); int size = oldFile.tellg();
if ( size != 0 ) { if ( size != 0 ) {
if ( noPrompting ) { if ( noPrompting ) {
cout << endl << "The MariaDB Columnstore port of '" + mysqlPort + "' is already in-use" << endl; cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use" << endl;
cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl;
exit(1); exit(1);
} }
@@ -786,7 +786,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
int rtnCode = system(cmd.c_str()); int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) == 0) { if (WEXITSTATUS(rtnCode) == 0) {
if ( noPrompting ) { if ( noPrompting ) {
cout << endl << "The MariaDB Columnstore port of '" + mysqlPort + "' is already in-use on " << remoteModuleName << endl; cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on " << remoteModuleName << endl;
cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl; cout << "For No-prompt install, use the command line argument of 'port' to enter a different number" << endl;
cout << "exiting..." << endl; cout << "exiting..." << endl;
exit(1); exit(1);
@@ -804,7 +804,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
if ( inUse ) if ( inUse )
{ {
cout << endl << "The MariaDB Columnstore port of '" + mysqlPort + "' is already in-use on " << inUseServer << endl; cout << endl << "The MariaDB ColumnStore port of '" + mysqlPort + "' is already in-use on " << inUseServer << endl;
while(true) while(true)
{ {
@@ -819,7 +819,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
if ( atoi(mysqlPort.c_str()) < 1000 || atoi(mysqlPort.c_str()) > 9999) if ( atoi(mysqlPort.c_str()) < 1000 || atoi(mysqlPort.c_str()) > 9999)
{ {
cout << " ERROR: Invalid MariaDB Columnstore Port ID supplied, must be between 1000-9999" << endl; cout << " ERROR: Invalid MariaDB ColumnStore Port ID supplied, must be between 1000-9999" << endl;
} }
else else
break; break;

View File

@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem getting ServerTypeInstall from the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem getting ServerTypeInstall from the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
IserverTypeInstall = atoi(serverTypeInstall.c_str()); IserverTypeInstall = atoi(serverTypeInstall.c_str());
@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
case (oam::INSTALL_COMBINE_DM_UM_PM): // combined #1 - dm/um/pm on a single server case (oam::INSTALL_COMBINE_DM_UM_PM): // combined #1 - dm/um/pm on a single server
{ {
if ( !writeConfig(sysConfig) ) { if ( !writeConfig(sysConfig) ) {
cout << "ERROR: Failed trying to update MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
@@ -214,7 +214,7 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem setting RotatingDestination in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem setting RotatingDestination in the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
@@ -225,7 +225,7 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem getting DB Storage Data from the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem getting DB Storage Data from the MariaDB ColumnStore System Configuration file" << endl;
return false; return false;
} }
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem setting NumBlocksPct in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem setting NumBlocksPct in the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem setting TotalUmMemory in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem setting TotalUmMemory in the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
} }
@@ -286,7 +286,7 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem setting NumBlocksPct in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem setting NumBlocksPct in the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
} }
@@ -297,13 +297,13 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem reading NumBlocksPct/TotalUmMemory in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem reading NumBlocksPct/TotalUmMemory in the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
} }
if ( !writeConfig(sysConfig) ) { if ( !writeConfig(sysConfig) ) {
cout << "ERROR: Failed trying to update MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
@@ -330,7 +330,7 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem setting TotalUmMemory in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem setting TotalUmMemory in the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
} }
@@ -349,13 +349,13 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem reading NumBlocksPct/TotalUmMemory in the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem reading NumBlocksPct/TotalUmMemory in the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
} }
if ( !writeConfig(sysConfig) ) { if ( !writeConfig(sysConfig) ) {
cout << "ERROR: Failed trying to update MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
@@ -365,7 +365,7 @@ int main(int argc, char *argv[])
} }
if ( !writeConfig(sysConfig) ) { if ( !writeConfig(sysConfig) ) {
cout << "ERROR: Failed trying to update MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
@@ -418,7 +418,7 @@ int main(int argc, char *argv[])
} }
catch(...) catch(...)
{ {
cout << "ERROR: Problem reading the MariaDB Columnstore System Configuration file" << endl; cout << "ERROR: Problem reading the MariaDB ColumnStore System Configuration file" << endl;
exit(1); exit(1);
} }
@@ -700,17 +700,17 @@ int main(int argc, char *argv[])
if ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) if ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM )
{ {
//run the mysql / mysqld setup scripts //run the mysql / mysqld setup scripts
cout << endl << "Running the MariaDB Columnstore setup scripts" << endl << endl; cout << endl << "Running the MariaDB ColumnStore setup scripts" << endl << endl;
// call the mysql setup scripts // call the mysql setup scripts
mysqlSetup(); mysqlSetup();
sleep(5); sleep(5);
} }
cout << "System Install successfully completed, starting MariaDB Columnstore" << endl; cout << "System Install successfully completed, starting MariaDB ColumnStore" << endl;
// //
// perform start of MariaDB Columnstore of other servers in the system // perform start of MariaDB ColumnStore of other servers in the system
// //
list1 = childmodulelist.begin(); list1 = childmodulelist.begin();
@@ -733,9 +733,9 @@ int main(int argc, char *argv[])
//start on local module //start on local module
int rtnCode = system(idbstartcmd.c_str()); int rtnCode = system(idbstartcmd.c_str());
if (rtnCode != 0) if (rtnCode != 0)
cout << "Error starting MariaDB Columnstore local module" << endl; cout << "Error starting MariaDB ColumnStore local module" << endl;
else else
cout << "Start MariaDB Columnstore request successful" << endl; cout << "Start MariaDB ColumnStore request successful" << endl;
} }
else else
{ {
@@ -745,7 +745,7 @@ int main(int argc, char *argv[])
if ( calpont_rpm1 != "dummy.rpm" ) { if ( calpont_rpm1 != "dummy.rpm" ) {
//run the mysql / mysqld setup scripts //run the mysql / mysqld setup scripts
cout << endl << "Running the MariaDB Columnstore setup scripts" << endl << endl; cout << endl << "Running the MariaDB ColumnStore setup scripts" << endl << endl;
// call the mysql setup scripts // call the mysql setup scripts
mysqlSetup(); mysqlSetup();
@@ -754,9 +754,9 @@ int main(int argc, char *argv[])
//start on local module //start on local module
int rtnCode = system(idbstartcmd.c_str()); int rtnCode = system(idbstartcmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) if (WEXITSTATUS(rtnCode) != 0)
cout << "Error starting MariaDB Columnstore local module" << endl; cout << "Error starting MariaDB ColumnStore local module" << endl;
else else
cout << "Start MariaDB Columnstore request successful" << endl; cout << "Start MariaDB ColumnStore request successful" << endl;
} }
else else
{ {
@@ -765,7 +765,7 @@ int main(int argc, char *argv[])
// //
//run the mysql / mysqld setup scripts //run the mysql / mysqld setup scripts
cout << endl << "Running the MariaDB Columnstore setup scripts" << endl << endl; cout << endl << "Running the MariaDB ColumnStore setup scripts" << endl << endl;
// call the mysql setup scripts // call the mysql setup scripts
mysqlSetup(); mysqlSetup();
@@ -781,7 +781,7 @@ int main(int argc, char *argv[])
// check for system going ACTIVE // check for system going ACTIVE
sleep(5); sleep(5);
cout << endl << "MariaDB Columnstore Database Platform Starting, please wait ."; cout << endl << "MariaDB ColumnStore Database Platform Starting, please wait .";
cout.flush(); cout.flush();
if ( waitForActive() ) { if ( waitForActive() ) {
@@ -801,19 +801,19 @@ int main(int argc, char *argv[])
} }
} }
cout << endl << "MariaDB Columnstore Install Successfully Completed, System is Active" << endl << endl; cout << endl << "MariaDB ColumnStore Install Successfully Completed, System is Active" << endl << endl;
cout << "Enter the following command to define MariaDB Columnstore Alias Commands" << endl << endl; cout << "Enter the following command to define MariaDB ColumnStore Alias Commands" << endl << endl;
cout << ". " + installDir + "/bin/columnstoreAlias" << endl << endl; cout << ". " + installDir + "/bin/columnstoreAlias" << endl << endl;
cout << "Enter 'mcsmysql' to access the MariaDB Columnstore SQL console" << endl; cout << "Enter 'mcsmysql' to access the MariaDB ColumnStore SQL console" << endl;
cout << "Enter 'mcsadmin' to access the MariaDB Columnstore Admin console" << endl << endl; cout << "Enter 'mcsadmin' to access the MariaDB ColumnStore Admin console" << endl << endl;
} }
else else
{ {
cout << " FAILED" << endl; cout << " FAILED" << endl;
cout << endl << "ERROR: MariaDB Columnstore Process failed to start, check log files in /var/log/mariadb/columnstore" << endl; cout << endl << "ERROR: MariaDB ColumnStore Process failed to start, check log files in /var/log/mariadb/columnstore" << endl;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -4816,14 +4816,10 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
sysConfig->setConfig(Section, "Port", "8622"); sysConfig->setConfig(Section, "Port", "8622");
} }
bool setMysqlRep = false;
if ( moduleType == "um" || if ( moduleType == "um" ||
( moduleType == "pm" && config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM ) || ( moduleType == "pm" && config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM ) ||
( moduleType == "pm" && PMwithUM == "y") ) { ( moduleType == "pm" && PMwithUM == "y") ) {
setMysqlRep = true;
listPT = devicenetworklist.begin(); listPT = devicenetworklist.begin();
for( ; listPT != devicenetworklist.end() ; listPT++) for( ; listPT != devicenetworklist.end() ; listPT++)
{ {
@@ -5313,22 +5309,6 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
sleep(30); sleep(30);
} }
//check and add MySQL Replication slave
string MySQLRep;
try {
oam.getSystemConfig("MySQLRep", MySQLRep);
}
catch(...) {
MySQLRep = "n";
}
if ( MySQLRep == "n" && setMysqlRep ) {
try {
oam.setSystemConfig("MySQLRep", "y");
}
catch(...) {}
}
//distribute config file //distribute config file
distributeConfigFile("system"); distributeConfigFile("system");

View File

@@ -147,20 +147,7 @@ int main(int argc, char *argv[])
{} {}
bool build40 = false; bool build40 = false;
if ( !CoreFileFlag.empty() ) bool build401 = true;
build40 = true;
//build 4.0.1 flag
string AmazonSubNetID;
try {
AmazonSubNetID = sysConfigNew->getConfig(InstallSection, "AmazonSubNetID");
}
catch(...)
{}
bool build401 = false;
if ( !AmazonSubNetID.empty() )
build401 = true;
//set install config flag //set install config flag
try { try {
@@ -1283,18 +1270,13 @@ int main(int argc, char *argv[])
// //
if (build3) { if (build3) {
//setup cloud parameters //setup cloud parameters
string x509Cert;
string x509PriKey;
string UMStorageType; string UMStorageType;
string rpw;
string PMInstanceType; string PMInstanceType;
string UMInstanceType; string UMInstanceType;
string UMSecurityGroup; string UMSecurityGroup;
string UMVolumeSize; string UMVolumeSize;
string PMVolumeSize; string PMVolumeSize;
string AmazonAutoTagging; string AmazonAutoTagging;
string AmazonRegion;
string AmazonZone;
string AmazonVPCNextPrivateIP; string AmazonVPCNextPrivateIP;
string AmazonDeviceName; string AmazonDeviceName;
string UMVolumeType; string UMVolumeType;
@@ -1305,20 +1287,14 @@ int main(int argc, char *argv[])
try { try {
cloud = sysConfigOld->getConfig(InstallSection, "Cloud"); cloud = sysConfigOld->getConfig(InstallSection, "Cloud");
x509Cert = sysConfigOld->getConfig(InstallSection, "AmazonX509Certificate");
x509PriKey = sysConfigOld->getConfig(InstallSection, "AmazonX509PrivateKey");
UMStorageType = sysConfigOld->getConfig(InstallSection, "UMStorageType"); UMStorageType = sysConfigOld->getConfig(InstallSection, "UMStorageType");
rpw = sysConfigOld->getConfig(InstallSection, "rpw");
PMInstanceType = sysConfigOld->getConfig(InstallSection, "PMInstanceType"); PMInstanceType = sysConfigOld->getConfig(InstallSection, "PMInstanceType");
UMInstanceType = sysConfigOld->getConfig(InstallSection, "UMInstanceType"); UMInstanceType = sysConfigOld->getConfig(InstallSection, "UMInstanceType");
UMSecurityGroup = sysConfigOld->getConfig(InstallSection, "UMSecurityGroup"); UMSecurityGroup = sysConfigOld->getConfig(InstallSection, "UMSecurityGroup");
UMVolumeSize = sysConfigOld->getConfig(InstallSection, "UMVolumeSize"); UMVolumeSize = sysConfigOld->getConfig(InstallSection, "UMVolumeSize");
PMVolumeSize = sysConfigOld->getConfig(InstallSection, "PMVolumeSize"); PMVolumeSize = sysConfigOld->getConfig(InstallSection, "PMVolumeSize");
AmazonAutoTagging = sysConfigOld->getConfig(InstallSection, "AmazonAutoTagging"); AmazonAutoTagging = sysConfigOld->getConfig(InstallSection, "AmazonAutoTagging");
AmazonRegion = sysConfigOld->getConfig(InstallSection, "AmazonRegion");
AmazonZone = sysConfigOld->getConfig(InstallSection, "AmazonZone");
AmazonVPCNextPrivateIP = sysConfigOld->getConfig(InstallSection, "AmazonVPCNextPrivateIP"); AmazonVPCNextPrivateIP = sysConfigOld->getConfig(InstallSection, "AmazonVPCNextPrivateIP");
AmazonSubNetID = sysConfigOld->getConfig(InstallSection, "AmazonSubNetID");
AmazonDeviceName = sysConfigOld->getConfig(InstallSection, "AmazonDeviceName"); AmazonDeviceName = sysConfigOld->getConfig(InstallSection, "AmazonDeviceName");
UMVolumeType = sysConfigOld->getConfig(InstallSection, "UMVolumeType"); UMVolumeType = sysConfigOld->getConfig(InstallSection, "UMVolumeType");
UMVolumeIOPS = sysConfigOld->getConfig(InstallSection, "UMVolumeIOPS"); UMVolumeIOPS = sysConfigOld->getConfig(InstallSection, "UMVolumeIOPS");
@@ -1355,13 +1331,10 @@ int main(int argc, char *argv[])
cloud = oam::UnassignedName; cloud = oam::UnassignedName;
if ( cloud == "amazon") if ( cloud == "amazon")
cloud = "amazon-ec2"; cloud = "amazon-ec2";
if ( AmazonSubNetID.empty() )
AmazonSubNetID = oam::UnassignedName;
if ( AmazonVPCNextPrivateIP.empty() ) if ( AmazonVPCNextPrivateIP.empty() )
AmazonVPCNextPrivateIP = oam::UnassignedName; AmazonVPCNextPrivateIP = oam::UnassignedName;
try { try {
sysConfigNew->setConfig(InstallSection, "AmazonSubNetID", AmazonSubNetID);
sysConfigNew->setConfig(InstallSection, "AmazonVPCNextPrivateIP", AmazonVPCNextPrivateIP); sysConfigNew->setConfig(InstallSection, "AmazonVPCNextPrivateIP", AmazonVPCNextPrivateIP);
} }
catch(...) catch(...)
@@ -1373,18 +1346,13 @@ int main(int argc, char *argv[])
try { try {
sysConfigNew->setConfig(InstallSection, "Cloud", cloud); sysConfigNew->setConfig(InstallSection, "Cloud", cloud);
sysConfigNew->setConfig(InstallSection, "AmazonX509Certificate", x509Cert);
sysConfigNew->setConfig(InstallSection, "AmazonX509PrivateKey", x509PriKey);
sysConfigNew->setConfig(InstallSection, "UMStorageType", UMStorageType); sysConfigNew->setConfig(InstallSection, "UMStorageType", UMStorageType);
sysConfigNew->setConfig(InstallSection, "rpw", rpw);
sysConfigNew->setConfig(InstallSection, "PMInstanceType", PMInstanceType); sysConfigNew->setConfig(InstallSection, "PMInstanceType", PMInstanceType);
sysConfigNew->setConfig(InstallSection, "UMInstanceType", UMInstanceType); sysConfigNew->setConfig(InstallSection, "UMInstanceType", UMInstanceType);
sysConfigNew->setConfig(InstallSection, "UMSecurityGroup", UMSecurityGroup); sysConfigNew->setConfig(InstallSection, "UMSecurityGroup", UMSecurityGroup);
sysConfigNew->setConfig(InstallSection, "UMVolumeSize", UMVolumeSize); sysConfigNew->setConfig(InstallSection, "UMVolumeSize", UMVolumeSize);
sysConfigNew->setConfig(InstallSection, "PMVolumeSize", PMVolumeSize); sysConfigNew->setConfig(InstallSection, "PMVolumeSize", PMVolumeSize);
sysConfigNew->setConfig(InstallSection, "AmazonAutoTagging", AmazonAutoTagging); sysConfigNew->setConfig(InstallSection, "AmazonAutoTagging", AmazonAutoTagging);
sysConfigNew->setConfig(InstallSection, "AmazonRegion", AmazonRegion);
sysConfigNew->setConfig(InstallSection, "AmazonZone", AmazonZone);
sysConfigNew->setConfig(InstallSection, "AmazonDeviceName", AmazonDeviceName); sysConfigNew->setConfig(InstallSection, "AmazonDeviceName", AmazonDeviceName);
sysConfigNew->setConfig(InstallSection, "UMVolumeType", UMVolumeType); sysConfigNew->setConfig(InstallSection, "UMVolumeType", UMVolumeType);