diff --git a/oam/cloud/CMakeLists.txt b/oam/cloud/CMakeLists.txt
index 8c18ca72c..3c4e302df 100644
--- a/oam/cloud/CMakeLists.txt
+++ b/oam/cloud/CMakeLists.txt
@@ -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)
diff --git a/oam/cloud/MCSInstanceCmds.sh b/oam/cloud/MCSInstanceCmds.sh
old mode 100644
new mode 100755
index 225fcbf69..006cf9f17
--- a/oam/cloud/MCSInstanceCmds.sh
+++ b/oam/cloud/MCSInstanceCmds.sh
@@ -8,8 +8,7 @@ prefix=/usr/local
#check command
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
fi
@@ -33,9 +32,9 @@ if [ "$1" = "launchInstance" ]; then
instanceType="$3"
fi
if [ "$4" = "" ]; then
- group="unassigned"
+ groupid="unassigned"
else
- group="$4"
+ groupid="$4"
fi
fi
@@ -88,163 +87,77 @@ if [ "$1" = "deassignElasticIP" ]; then
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`
-
-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
+test -f $prefix//mariadb/columnstore/post/functions && . $prefix//mariadb/columnstore/post/functions
#default instance to null
instance=""
-describeInstanceFile="/tmp/describeInstance.txt"
-touch $describeInstanceFile
+AWSCLI="aws ec2 "
-describeInstance() {
- ec2-describe-instances -O $AmazonAccessKey -W $AmazonSecretKey --region $Region > $describeInstanceFile 2>&1
+getRegion() {
+ 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
-describeInstance
+getRole() {
+ #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() {
- if [ "$instance" != "" ]; then
- echo $instance
+ if [ "$instanceName" != "" ]; then
+ echo $instanceName
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 $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}'`
+ instanceName=`curl -s http://169.254.169.254/latest/meta-data/instance-id`
+ echo $instanceName
return
}
getZone() {
- #get from Columnstore.xml if it's there, if not, get from instance then store
- 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
+ zone=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone`
echo $zone
return
}
getPrivateIP() {
- #get instance info
- grep -B1 -A4 -m 1 $instanceName $describeInstanceFile > /tmp/instanceInfo_$instanceName 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
+ #get region
+ getRegion >/dev/null 2>&1
#check if running or terminated
- cat /tmp/instanceInfo_$instanceName | grep running > /tmp/instanceStatus_$instanceName
- if [ `cat /tmp/instanceStatus_$instanceName | wc -c` -eq 0 ]; then
+ state=`aws ec2 describe-instances --instance-ids $instanceName --region $Region --output text --query 'Reservations[*].Instances[*].State.Name'`
+ if [ "$state" != "running" ]; then
# not running
- cat /tmp/instanceInfo_$instanceName | grep pending > /tmp/instanceStatus_$instanceName
- if [ `cat /tmp/instanceStatus_$instanceName | wc -c` -ne 0 ]; then
- describeInstance
+ if [ "$state" != "stopped" ]; then
echo "stopped"
exit 1
else
- cat /tmp/instanceInfo_$instanceName | grep terminated > /tmp/instanceStatus_$instanceName
- if [ `cat /tmp/instanceStatus_$instanceName | wc -c` -ne 0 ]; then
+ if [ "$state" != "terminated" ]; then
echo "terminated"
exit 1
else
- cat /tmp/instanceInfo_$instanceName | grep shutting-down > /tmp/instanceStatus_$instanceName
- if [ `cat /tmp/instanceStatus_$instanceName | wc -c` -ne 0 ]; then
+ if [ "$state" != "shutting-down" ]; then
echo "terminated"
exit 1
else
@@ -256,11 +169,7 @@ getPrivateIP() {
fi
#running, get priviate IP Address
- if [ "$subnet" == "unassigned" ]; then
- 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
+ IpAddr=`aws ec2 describe-instances --instance-ids $instanceName --region $Region --output text --query 'Reservations[*].Instances[*].PrivateIpAddress'`
echo $IpAddr
exit 0
@@ -268,195 +177,155 @@ getPrivateIP() {
getType() {
#get local Instance ID
- getInstancePrivate >/dev/null 2>&1
- #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
+ instanceType=`curl -s http://169.254.169.254/latest/meta-data/instance-type`
echo $instanceType
return
}
getKey() {
+ #get region
+ getRegion >/dev/null 2>&1
+
#get local Instance ID
- getInstancePrivate >/dev/null 2>&1
- #get Key
- if [ "$subnet" == "unassigned" ]; then
- 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
+ getInstance >/dev/null 2>&1
+
+ key=`aws ec2 describe-instances --instance-ids $instanceName --region $Region --output text --query 'Reservations[*].Instances[*].KeyName'`
echo $key
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() {
#get local Instance ID
- getInstancePrivate >/dev/null 2>&1
- #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}'`
+ ami=`curl -s http://169.254.169.254/latest/meta-data/ami-id`
echo $ami
return
}
getGroup() {
- #get local Instance ID
- getInstancePrivate >/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
+ #get region
+ getRegion >/dev/null 2>&1
- 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
}
getProfile() {
- #get local Instance ID
- getInstancePrivate >/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}'`
+ #get region
+ getRegion >/dev/null 2>&1
- else
- instanceProfile=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $22}'`
- if [ "$instanceProfile" == "" ]; then
- describeInstance
- fi
- instanceProfile=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $22}'`
-
- fi
+ # get profile
+ instanceProfile=`curl -s http://169.254.169.254/latest/meta-data/profile`
echo $instanceProfile
return
}
launchInstance() {
+ #get region
+ getRegion >/dev/null 2>&1
+
#get publickey
getKey >/dev/null 2>&1
- if [ "$group" = "unassigned" ]; then
+ if [ "$groupid" = "unassigned" ]; then
#get group
getGroup >/dev/null 2>&1
fi
+
#get AMI
getAMI >/dev/null 2>&1
+
#get Zone
getZone >/dev/null 2>&1
if [ "$instanceType" = "unassigned" ]; then
#get type
getType >/dev/null 2>&1
fi
- #get AMI Profile
- getProfile >/dev/null 2>&1
- if [ "$subnet" == "unassigned" ]; then
- #NOT VPC
- 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}'`
- else
- 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
- else # VPC
- if [ "$instanceProfile" = "" ] || [ "$instanceProfile" = "default" ]; then
- if [ "$group" != "default" ]; then
- 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
+ #get Subnet
+ getSubnet >/dev/null 2>&1
+
+ #get IAM Role
+ getRole >/dev/null 2>&1
+
+ if [ "$Role" = "" ] || [ "$Role" = "default" ]; then
+ 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 --subnet-id $subnet --image-id $ami --security-group-ids $groupid --query 'Instances[*].InstanceId' --output text`
else
- if [ "$IPaddress" = "autoassign" ]; then
- 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
+ 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`
fi
else
- if [ "$group" != "default" ]; then
- if [ "$IPaddress" = "autoassign" ]; then
- 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
+ if [ "$IPaddress" = "autoassign" ] || [ "$IPaddress" = "unassigned" ]; 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`
else
- if [ "$IPaddress" = "autoassign" ]; then
- 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}'`
- else
- 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}'`
- fi
+ 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`
+ fi
+ fi
+ else
+ 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
+
echo $newInstance
return
}
terminateInstance() {
+ #get region
+ getRegion >/dev/null 2>&1
+
#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
}
stopInstance() {
+ #get region
+ getRegion >/dev/null 2>&1
+
#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
}
startInstance() {
- #terminate Instance
- ec2-start-instances -O $AmazonAccessKey -W $AmazonSecretKey --region $Region $instanceName > /tmp/startInstanceInfo_$instanceName 2>&1
+ #get region
+ 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
echo "Failed, check /tmp/startInstanceInfo_$instanceName"
exit 1
@@ -466,17 +335,15 @@ startInstance() {
}
assignElasticIP() {
- #terminate Instance
+ #get region
+ getRegion >/dev/null 2>&1
- if [ "$subnet" == "unassigned" ]; then
- ec2-associate-address -O $AmazonAccessKey -W $AmazonSecretKey -i $instanceName $IPAddress > /tmp/assignElasticIPInfo_$IPAddress 2>&1
- else
- 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
+ EIP=`$AWSCLI describe-addresses --region $Region --public-ips $IPAddress --query 'Addresses[*].AllocationId' --output text`
+
+ $AWSCLI associate-address --region $Region --instance-id $instanceName --allocation-id $EIP > /tmp/assignElasticIPInfo_$IPAddress 2>&1
- cat /tmp/assignElasticIPInfo_$IPAddress | grep ADDRESS > /tmp/assignElasticIPStatus_$IPAddress
- if [ `cat /tmp/assignElasticIPStatus_$IPAddress | wc -c` -eq 0 ]; then
+ cat /tmp/assignElasticIPInfo_$IPAddress | grep error > /tmp/assignElasticIPStatus_$IPAddress
+ if [ `cat /tmp/assignElasticIPStatus_$IPAddress | wc -c` -ne 0 ]; then
echo "Failed, check /tmp/assignElasticIPInfo_$IPAddress"
exit 1
fi
@@ -486,11 +353,14 @@ assignElasticIP() {
}
deassignElasticIP() {
- #terminate Instance
- ec2-disassociate-address -O $AmazonAccessKey -W $AmazonSecretKey $IPAddress > /tmp/deassignElasticIPInfo_$IPAddress 2>&1
+ #get region
+ getRegion >/dev/null 2>&1
- cat /tmp/deassignElasticIPInfo_$IPAddress | grep ADDRESS > /tmp/deassignElasticIPStatus_$IPAddress
- if [ `cat /tmp/deassignElasticIPStatus_$IPAddress | wc -c` -eq 0 ]; then
+ EIP=`$AWSCLI describe-addresses --region $Region --public-ips $IPAddress --query 'Addresses[*].AssociationId' --output text`
+
+ $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"
exit 1
fi
@@ -500,14 +370,13 @@ deassignElasticIP() {
}
getSubnet() {
+ #get region
+ getRegion >/dev/null 2>&1
+
#get local Instance ID
- getInstancePrivate >/dev/null 2>&1
+ getInstance >/dev/null 2>&1
#get Subnet
- subnet=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $16}'`
- if [ "$subnet" == "" ]; then
- describeInstance
- fi
- 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 == *"subnet"* ]]
then
@@ -566,8 +435,17 @@ case "$1" in
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
esac
diff --git a/oam/cloud/MCSVolumeCmds.sh b/oam/cloud/MCSVolumeCmds.sh
old mode 100644
new mode 100755
index 7bac1a7dc..cb87ae039
--- a/oam/cloud/MCSVolumeCmds.sh
+++ b/oam/cloud/MCSVolumeCmds.sh
@@ -95,48 +95,12 @@ fi
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
- 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`
+$prefix/mariadb/columnstore/bin/MCSgetCredentials.sh >/dev/null 2>&1
+#get Region
+Region=`$prefix/mariadb/columnstore/bin/MCSInstanceCmds.sh getRegion`
checkInfostatus() {
#check if attached
@@ -209,9 +173,9 @@ createvolume() {
#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}'`
+ volume=`$AWSCLI create-volume --region $Region --availability-zone $zone --size $volumeSize --volume-type $volumeType --iops $volumeIOPS --output text --query VolumeId`
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
echo $volume
@@ -220,7 +184,7 @@ createvolume() {
describevolume() {
#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
echo $STATUS
@@ -229,14 +193,14 @@ describevolume() {
detachvolume() {
#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
if [ $STATUS == "detaching" ]; then
retries=1
while [ $retries -ne 60 ]; do
#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
if [ $STATUS == "available" ]; then
@@ -266,7 +230,7 @@ detachvolume() {
attachvolume() {
#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
if [ $STATUS == "attaching" -o $STATUS == "already-attached" ]; then
@@ -300,13 +264,13 @@ attachvolume() {
deletevolume() {
#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
}
createTag() {
#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
}
diff --git a/oam/cloud/MCSgetCredentials.sh b/oam/cloud/MCSgetCredentials.sh
new file mode 100644
index 000000000..9660653f0
--- /dev/null
+++ b/oam/cloud/MCSgetCredentials.sh
@@ -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
diff --git a/oam/etc/Columnstore.xml b/oam/etc/Columnstore.xml
index 940e2ee77..f9ecbc116 100644
--- a/oam/etc/Columnstore.xml
+++ b/oam/etc/Columnstore.xml
@@ -443,20 +443,15 @@
unassigned
mariadb1
unassigned
- unassigned
- unassigned
- us-east-1
- unassigned
- unassigned
autoassign
unassigned
unassigned
unassigned
- standard
+ gp2
unassigned
unassigned
unassigned
- standard
+ gp2
unassigned
y
y
@@ -467,8 +462,6 @@
0
unassigned
n
- unassigned
- unassigned
3306
unassigned
/dev/xvd
diff --git a/oam/install_scripts/module_installer.sh b/oam/install_scripts/module_installer.sh
index 74c53d833..1bce1f049 100755
--- a/oam/install_scripts/module_installer.sh
+++ b/oam/install_scripts/module_installer.sh
@@ -54,10 +54,10 @@ fi
export COLUMNSTORE_INSTALL_DIR=$installdir
cloud=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation Cloud`
-if [ $module = "pm" ]; then
- if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
- cp $COLUMNSTORE_INSTALL_DIR/local/etc/*.pem /root/. > /dev/null 2>&1
-
+if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
+ cp $COLUMNSTORE_INSTALL_DIR/local/etc/*.pem $HOME/. > /dev/null 2>&1
+
+ if [ $module = "pm" ]; then
if test -f $COLUMNSTORE_INSTALL_DIR/local/etc/pm1/fstab ; then
echo "Setup fstab on Module"
touch /etc/fstab
diff --git a/oam/install_scripts/post-install b/oam/install_scripts/post-install
index 966e40aa6..160cacc97 100755
--- a/oam/install_scripts/post-install
+++ b/oam/install_scripts/post-install
@@ -249,15 +249,10 @@ if [ $rc1 -ne 0 -a $rc2 -ne 0 ]; then
echo " " >> ${bashFile}
fi
-#check and get amazon EC2 env variables
-if [ -n "$EC2_HOME" ]; then
- $installdir/bin/setConfig -d Installation EC2_HOME $EC2_HOME
-
- 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
+#check and get amazon env variables
+aws=`which aws 2>/dev/null`
+if [ -z "aws" ]; then
+ $installdir/bin/MCSgetCredentials.sh >/dev/null 2>&1
fi
#log install message
diff --git a/oam/install_scripts/rsync.sh b/oam/install_scripts/rsync.sh
index d7d73d2d0..d11720344 100755
--- a/oam/install_scripts/rsync.sh
+++ b/oam/install_scripts/rsync.sh
@@ -22,7 +22,6 @@ if {[info exists env(USER)]} {
if { $PASSWORD == "ssh" } {
- set USERNAME ""
set PASSWORD ""
}
diff --git a/oam/install_scripts/syslogSetup.sh b/oam/install_scripts/syslogSetup.sh
index 5accb84a6..1fd71023a 100755
--- a/oam/install_scripts/syslogSetup.sh
+++ b/oam/install_scripts/syslogSetup.sh
@@ -176,7 +176,7 @@ if [ ! -z "$syslog_conf" ] ; then
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-ng restart > /dev/null 2>&1
@@ -212,7 +212,7 @@ if [ ! -z "$syslog_conf" ] ; then
$SUDO rm -f "$syslog_conf"
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-ng restart > /dev/null 2>&1
diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp
index 7ef10b1cb..fc40b5462 100644
--- a/oam/oamcpp/liboamcpp.cpp
+++ b/oam/oamcpp/liboamcpp.cpp
@@ -5964,11 +5964,25 @@ namespace oam
catch(...) {}
writeLog("addUMdisk - Create new Volume for um" + itoa(moduleID), LOG_TYPE_DEBUG);
- volumeName = createEC2Volume(UMVolumeSize, "um");
- if ( volumeName == "failed" ) {
- writeLog("addModule: create volume failed", LOG_TYPE_CRITICAL);
- exceptionControl("addUMdisk", API_FAILURE);
- }
+
+ cout << " Create AWS Volume for UM #" << itoa(moduleID) << endl;
+
+ 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
device = "/dev/sdf";
@@ -5976,14 +5990,26 @@ namespace oam
string localInstance = getEC2LocalInstance();
//attach volumes to local instance
- 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);
- exceptionControl("addUMdisk", API_FAILURE);
- }
+ writeLog("addUMdisk - Attach new Volume to local instance: " + volumeName, LOG_TYPE_DEBUG);
+
+ retry = 0;
+ 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
writeLog("addUMdisk - Format new Volume for: " + volumeName, LOG_TYPE_DEBUG);
+ cout << " Formatting disk for UM #" << itoa(moduleID) << ", please wait..." << endl;
string cmd;
int user;
diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp
index 3d65d45ed..1229f24c2 100644
--- a/oamapps/mcsadmin/mcsadmin.cpp
+++ b/oamapps/mcsadmin/mcsadmin.cpp
@@ -176,7 +176,7 @@ bool waitForStop()
//------------------------------------------------------------------------------
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
{
- cout << endl << "MariaDB Columnstore Admin Console" << endl;
+ cout << endl << "MariaDB ColumnStore Admin Console" << 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;
// output current active alarm stats
@@ -707,7 +707,7 @@ int processCommand(string* arguments)
// close the log file
writeLog("End of a command session!!!");
logFile.close();
- cout << "Exiting the MariaDB Columnstore Admin Console" << endl;
+ cout << "Exiting the MariaDB ColumnStore Admin Console" << endl;
exit (0);
}
@@ -2148,7 +2148,7 @@ int processCommand(string* arguments)
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
{
@@ -2265,7 +2265,7 @@ int processCommand(string* arguments)
bool bDBRMReady = dbrm.isDBRMReady();
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
{
@@ -2367,7 +2367,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1";
system(cmd.c_str());
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
@@ -2412,7 +2412,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1";
system(cmd.c_str());
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;
}
}
@@ -2508,7 +2508,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1";
system(cmd.c_str());
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;
}
}
@@ -2727,7 +2727,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1";
system(cmd.c_str());
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;
}
}
@@ -3414,7 +3414,7 @@ int processCommand(string* arguments)
if ( MySQLRep == "y" && MySQLPasswordConfig == oam::UnassignedName ) {
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);
}
@@ -3582,7 +3582,7 @@ int processCommand(string* arguments)
string 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;
@@ -3903,7 +3903,7 @@ int processCommand(string* arguments)
BRM::DBRM dbrm;
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
{
@@ -3984,7 +3984,7 @@ int processCommand(string* arguments)
break;
}
- // stop writes to MariaDB Columnstore Database
+ // stop writes to MariaDB ColumnStore Database
oam.SuspendWrites(gracefulTemp, ackTemp);
}
catch (exception& e)
@@ -4002,11 +4002,11 @@ int processCommand(string* arguments)
case 33: // resumeDatabaseWrites
{
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;
}
- // resume writes to MariaDB Columnstore Database
+ // resume writes to MariaDB ColumnStore Database
try{
SystemProcessStatus systemprocessstatus;
@@ -4031,7 +4031,7 @@ int processCommand(string* arguments)
}
}
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)
{
@@ -4593,7 +4593,7 @@ int processCommand(string* arguments)
}
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;
}
@@ -4707,7 +4707,7 @@ int processCommand(string* arguments)
}
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;
}
}
@@ -4920,16 +4920,6 @@ int processCommand(string* arguments)
}
catch(...) {}
- if ( cloud == "amazon-vpc" )
- {
- string AmazonSubNetID = oam::UnassignedName;
- try{
- oam.getSystemConfig("AmazonSubNetID", AmazonSubNetID);
-
- cout << "AmazonSubNetID = " << AmazonSubNetID << endl;
- }
- catch(...) {}
- }
}
cout << endl;
@@ -4946,7 +4936,7 @@ int processCommand(string* arguments)
catch(...) {}
if ( MySQLRep == "y" ) {
- string warning = "MariaDB Columnstore Replication Feature is already enabled";
+ string warning = "MariaDB ColumnStore Replication Feature is already enabled";
// confirm request
if (confirmPrompt(warning))
break;
@@ -4972,7 +4962,7 @@ int processCommand(string* arguments)
if ( MySQLPasswordConfig == oam::UnassignedName ) {
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);
}
@@ -4994,7 +4984,7 @@ int processCommand(string* arguments)
try
{
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
string PrimaryUMModuleName;
@@ -5003,7 +4993,7 @@ int processCommand(string* arguments)
}
catch(...) {}
- cout << " MariaDB Columnstore Replication Master Node is " << PrimaryUMModuleName << endl << endl;
+ cout << " MariaDB ColumnStore Replication Master Node is " << PrimaryUMModuleName << endl << endl;
}
catch (exception& e)
{
@@ -5626,7 +5616,7 @@ int processCommand(string* arguments)
if ( localModule != parentOAMModule ) {
// 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;
}
@@ -5653,7 +5643,7 @@ int processCommand(string* arguments)
if ( arguments[3] != "y") {
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
if (confirmPrompt(warning))
break;
@@ -5718,7 +5708,7 @@ int processCommand(string* arguments)
if ( arguments[2] != "y") {
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
if (confirmPrompt(warning))
break;
@@ -5926,7 +5916,7 @@ int processCommand(string* arguments)
catch(...) {}
if ( MySQLRep == "n" ) {
- string warning = "MariaDB Columnstore Replication Feature is already disable";
+ string warning = "MariaDB ColumnStore Replication Feature is already disable";
// confirm request
if (confirmPrompt(warning))
break;
@@ -5940,7 +5930,7 @@ int processCommand(string* arguments)
if ( MySQLPasswordConfig == oam::UnassignedName ) {
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);
}
@@ -5962,7 +5952,7 @@ int processCommand(string* arguments)
try
{
oam.disableMySQLRep();
- cout << endl << " Successful Disable of MariaDB Columnstore Replication " << endl;
+ cout << endl << " Successful Disable of MariaDB ColumnStore Replication " << endl;
}
catch (exception& e)
{
@@ -6719,7 +6709,7 @@ int processCommand(string* arguments)
{
// confirm request
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;
}
}
@@ -6845,7 +6835,7 @@ int processCommand(string* arguments)
// confirm request
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;
}
@@ -6991,7 +6981,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
// give warning for Process-Monitor
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;
}
else
@@ -6999,7 +6989,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
if ( arguments[3] != "y" ) {
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
// 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;
}
}
@@ -7054,7 +7044,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
if (arguments[3] != "y")
{
// 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;
}
@@ -7119,7 +7109,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
string password = arguments[1];
if ( arguments[2] != "y") {
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
if (confirmPrompt(warning))
break;
@@ -7211,7 +7201,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
// close the log file
writeLog("End of a command session!!!");
logFile.close();
- cout << endl << "Exiting the MariaDB Columnstore Command Console" << endl;
+ cout << endl << "Exiting the MariaDB ColumnStore Command Console" << endl;
exit (0);
}
}
@@ -7242,7 +7232,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
string password = arguments[2];
if ( arguments[3] != "y") {
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
if (confirmPrompt(warning))
break;
@@ -7281,7 +7271,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
// close the log file
writeLog("End of a command session!!!");
logFile.close();
- cout << endl << "Exiting the MariaDB Columnstore Command Console" << endl;
+ cout << endl << "Exiting the MariaDB ColumnStore Command Console" << endl;
exit (0);
}
}
@@ -7315,7 +7305,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// 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;
}
@@ -7349,7 +7339,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// 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;
}
@@ -7383,7 +7373,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
}
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;
}
@@ -7415,7 +7405,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
}
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);
}
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" ) {
// 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;
}
@@ -7460,7 +7450,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// 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;
}
@@ -7480,7 +7470,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// 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;
}
@@ -7514,7 +7504,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// 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;
}
@@ -7546,11 +7536,11 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
try
{
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)
{
- 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;
@@ -8083,13 +8073,13 @@ void printSystemStatus()
if ( moduletypeconfig.ModuleCount > 1 )
{
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
{
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(...) {}
if ( MySQLRep == "y" )
- cout << "MariaDB Columnstore Replication Feature is enabled" << endl << endl;
+ cout << "MariaDB ColumnStore Replication Feature is enabled" << endl << endl;
}
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 << "------------------ ------ --------------- ------------------------ ----------" << endl;
try
diff --git a/oamapps/postConfigure/helpers.cpp b/oamapps/postConfigure/helpers.cpp
index ea1a50343..8638bebba 100644
--- a/oamapps/postConfigure/helpers.cpp
+++ b/oamapps/postConfigure/helpers.cpp
@@ -436,7 +436,7 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, std::st
returnStatus = sendMsgProcMon( (*pt).DeviceName, msg1, requestID, 600 );
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;
}
@@ -448,7 +448,7 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, std::st
returnStatus = sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 );
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;
}
@@ -479,7 +479,7 @@ int sendReplicationRequest(int IserverTypeInstall, std::string password, std::st
returnStatus = sendMsgProcMon( (*pt).DeviceName, msg, requestID, 30 );
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;
}
@@ -677,12 +677,12 @@ void checkMysqlPort( std::string& mysqlPort, Config* sysConfig )
int size = oldFile.tellg();
if ( size != 0 ) {
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;
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)
{
@@ -697,7 +697,7 @@ void checkMysqlPort( std::string& mysqlPort, Config* sysConfig )
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
break;
@@ -755,7 +755,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
int size = oldFile.tellg();
if ( size != 0 ) {
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;
exit(1);
}
@@ -786,7 +786,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) == 0) {
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 << "exiting..." << endl;
exit(1);
@@ -804,7 +804,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
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)
{
@@ -819,7 +819,7 @@ void checkSystemMySQLPort(std::string& mysqlPort, Config* sysConfig, std::string
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
break;
diff --git a/oamapps/postConfigure/installer.cpp b/oamapps/postConfigure/installer.cpp
index fcf87df2e..8ea9af62f 100644
--- a/oamapps/postConfigure/installer.cpp
+++ b/oamapps/postConfigure/installer.cpp
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
}
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);
}
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
{
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);
}
@@ -214,7 +214,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -225,7 +225,7 @@ int main(int argc, char *argv[])
}
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;
}
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
}
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);
}
}
@@ -286,7 +286,7 @@ int main(int argc, char *argv[])
}
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);
}
}
@@ -297,13 +297,13 @@ int main(int argc, char *argv[])
}
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);
}
}
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);
}
@@ -330,7 +330,7 @@ int main(int argc, char *argv[])
}
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);
}
}
@@ -349,13 +349,13 @@ int main(int argc, char *argv[])
}
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);
}
}
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);
}
@@ -365,7 +365,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -418,7 +418,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -700,17 +700,17 @@ int main(int argc, char *argv[])
if ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM )
{
//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
mysqlSetup();
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();
@@ -733,9 +733,9 @@ int main(int argc, char *argv[])
//start on local module
int rtnCode = system(idbstartcmd.c_str());
if (rtnCode != 0)
- cout << "Error starting MariaDB Columnstore local module" << endl;
+ cout << "Error starting MariaDB ColumnStore local module" << endl;
else
- cout << "Start MariaDB Columnstore request successful" << endl;
+ cout << "Start MariaDB ColumnStore request successful" << endl;
}
else
{
@@ -745,7 +745,7 @@ int main(int argc, char *argv[])
if ( calpont_rpm1 != "dummy.rpm" ) {
//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
mysqlSetup();
@@ -754,9 +754,9 @@ int main(int argc, char *argv[])
//start on local module
int rtnCode = system(idbstartcmd.c_str());
if (WEXITSTATUS(rtnCode) != 0)
- cout << "Error starting MariaDB Columnstore local module" << endl;
+ cout << "Error starting MariaDB ColumnStore local module" << endl;
else
- cout << "Start MariaDB Columnstore request successful" << endl;
+ cout << "Start MariaDB ColumnStore request successful" << endl;
}
else
{
@@ -765,7 +765,7 @@ int main(int argc, char *argv[])
//
//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
mysqlSetup();
@@ -781,7 +781,7 @@ int main(int argc, char *argv[])
// check for system going ACTIVE
sleep(5);
- cout << endl << "MariaDB Columnstore Database Platform Starting, please wait .";
+ cout << endl << "MariaDB ColumnStore Database Platform Starting, please wait .";
cout.flush();
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 << "Enter 'mcsmysql' to access the MariaDB Columnstore SQL console" << endl;
- cout << "Enter 'mcsadmin' to access the MariaDB Columnstore Admin console" << endl << endl;
+ cout << "Enter 'mcsmysql' to access the MariaDB ColumnStore SQL console" << endl;
+ cout << "Enter 'mcsadmin' to access the MariaDB ColumnStore Admin console" << endl << endl;
}
else
{
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;
}
}
diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp
index e60a4a4b0..3a9a7a2d8 100644
--- a/oamapps/postConfigure/postConfigure.cpp
+++ b/oamapps/postConfigure/postConfigure.cpp
@@ -101,12 +101,9 @@ bool createDbrootDirs(string DBRootStorageType);
bool pkgCheck();
bool storageSetup(bool amazonInstall);
void setSystemName();
-bool checkInstanceRunning(string instanceName, string AmazonAccessKey, string AmazonSecretKey);
-string getInstanceIP(string instanceName, string AmazonAccessKey, string AmazonSecretKey);
-bool attachVolume(string instanceName, string volumeName, string deviceName, string dbrootPath);
bool singleServerDBrootSetup();
bool copyFstab(string moduleName);
-bool copyKeyfiles();
+bool attachVolume(string instanceName, string volumeName, string deviceName, string dbrootPath);
void remoteInstallThread(void *);
@@ -156,9 +153,6 @@ bool thread_remote_installer = true;
string singleServerInstall = "1";
string reuseConfig ="n";
string oldFileName;
-string AmazonAccessKey;
-string AmazonSecretKey;
-string AmazonRegion;
string glusterCopies;
string glusterInstalled = "n";
string hadoopInstalled = "n";
@@ -172,7 +166,7 @@ bool hdfs = false;
bool gluster = false;
bool pmwithum = false;
bool mysqlRep = false;
-string MySQLRep = "n";
+string MySQLRep = "y";
string PMwithUM = "n";
bool amazonInstall = false;
@@ -263,8 +257,8 @@ int main(int argc, char *argv[])
{
if( string("-h") == argv[i] ) {
cout << endl;
- cout << "This is the MariaDB Columnstore System Configuration and Installation tool." << endl;
- cout << "It will Configure the MariaDB Columnstore System based on Operator inputs and" << endl;
+ cout << "This is the MariaDB ColumnStore System Configuration and Installation tool." << endl;
+ cout << "It will Configure the MariaDB ColumnStore System based on Operator inputs and" << endl;
cout << "will perform a Package Installation of all of the Modules within the" << endl;
cout << "System that is being configured." << endl;
cout << endl;
@@ -276,15 +270,14 @@ int main(int argc, char *argv[])
cout << " Enter one of the options within [], if available, or" << endl;
cout << " Enter a new value" << endl << endl;
cout << endl;
- cout << "Usage: postConfigure [-h][-c][-u][-p][-mp][-s][-port][-i]" << endl;
+ cout << "Usage: postConfigure [-h][-c][-u][-p][-s][-port][-i]" << endl;
cout << " -h Help" << endl;
cout << " -c Config File to use to extract configuration data, default is Columnstore.xml.rpmsave" << endl;
cout << " -u Upgrade, Install using the Config File from -c, default to Columnstore.xml.rpmsave" << endl;
cout << " If ssh-keys aren't setup, you should provide passwords as command line arguments" << endl;
cout << " -p Unix Password, used with no-prompting option" << endl;
- cout << " -mp MariaDB Columnstore Password" << endl;
cout << " -s Single Threaded Remote Install" << endl;
- cout << " -port MariaDB Columnstore Port Address" << endl;
+ cout << " -port MariaDB ColumnStore Port Address" << endl;
cout << " -i Non-root Install directory, Only use for non-root installs" << endl;
exit (0);
}
@@ -318,20 +311,6 @@ int main(int argc, char *argv[])
exit (1);
}
}
- else if( string("-mp") == argv[i] ) {
- i++;
- if (i >= argc ) {
- cout << " ERROR: MariaDB Columnstore Password not provided" << endl;
- exit (1);
- }
- mysqlpw = argv[i];
- if ( mysqlpw.find("-") != string::npos ) {
- cout << " ERROR: Valid MariaDB Columnstore Password not provided" << endl;
- exit (1);
- }
- if ( mysqlpw == "dummymysqlpw" )
- mysqlpw = " ";
- }
else if( string("-u") == argv[i] )
noPrompting = true;
// for backward compatibility
@@ -340,13 +319,13 @@ int main(int argc, char *argv[])
else if( string("-port") == argv[i] ) {
i++;
if (i >= argc ) {
- cout << " ERROR: MariaDB Columnstore Port ID not supplied" << endl;
+ cout << " ERROR: MariaDB ColumnStore Port ID not supplied" << endl;
exit (1);
}
mysqlPort = argv[i];
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;
exit (1);
}
}
@@ -361,7 +340,7 @@ int main(int argc, char *argv[])
else
{
cout << " ERROR: Invalid Argument = " << argv[i] << endl;
- cout << " Usage: postConfigure [-h][-c][-u][-p][-mp][-s][-port][-i]" << endl;
+ cout << " Usage: postConfigure [-h][-c][-u][-p][-s][-port][-i]" << endl;
exit (1);
}
}
@@ -375,8 +354,8 @@ int main(int argc, char *argv[])
oldFileName = installDir + "/etc/Columnstore.xml.rpmsave";
cout << endl;
- cout << "This is the MariaDB Columnstore System Configuration and Installation tool." << endl;
- cout << "It will Configure the MariaDB Columnstore System and will perform a Package" << endl;
+ cout << "This is the MariaDB ColumnStore System Configuration and Installation tool." << endl;
+ cout << "It will Configure the MariaDB ColumnStore System and will perform a Package" << endl;
cout << "Installation of all of the Servers within the System that is being configured." << endl;
cout << endl;
@@ -415,9 +394,9 @@ int main(int argc, char *argv[])
// redirectStandardOutputToFile(postConfigureLog, false );
}
- //check if MariaDB Columnstore is up and running
+ //check if MariaDB ColumnStore is up and running
if (oam.checkSystemRunning()) {
- cout << "MariaDB Columnstore is running, can't run postConfigure while MariaDB Columnstore is running. Exiting.." << endl;
+ cout << "MariaDB ColumnStore is running, can't run postConfigure while MariaDB ColumnStore is running. Exiting.." << endl;
exit (0);
}
@@ -575,7 +554,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot Count in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot Count in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -590,11 +569,11 @@ int main(int argc, char *argv[])
checkMysqlPort(mysqlPort, 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);
}
- cout << endl << "===== Performing Configuration Setup and MariaDB Columnstore Startup =====" << endl;
+ cout << endl << "===== Performing Configuration Setup and MariaDB ColumnStore Startup =====" << endl;
cmd = installDir + "/bin/installer dummy.rpm dummy.rpm dummy.rpm dummy.rpm dummy.rpm initial dummy " + reuseConfig + " --nodeps ' ' 1 " + installDir;
system(cmd.c_str());
@@ -621,12 +600,12 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting SingleServerInstall from the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting SingleServerInstall from the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
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);
}
@@ -652,7 +631,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -683,16 +662,86 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting ServerTypeInstall in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting ServerTypeInstall in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
+ cout << "NOTE: MySQL Replication feature can be enabled to have MariaDB ColumnStore" << endl;
+ cout << " setup the functionality of MySQL Replication on the system." << endl;
+ cout << " Or the feature can be disabled, if for example, if you have replication" << endl;
+ cout << " handled by another application" << endl << endl;
+
+ try {
+ MySQLRep = sysConfig->getConfig(InstallSection, "MySQLRep");
+ }
+ catch(...)
+ {}
+
+ if ( MySQLRep == "y" )
+ mysqlRep = true;
+
+ string answer = "y";
+
+ while(true) {
+ if ( mysqlRep )
+ prompt = "MariaDB ColumnStore MySQL Replication feature is Enabled, do you want to leave enabled? [y,n] (y) > ";
+ else
+ prompt = "MariaDB ColumnStore MySQL Replication feature, do you want to enable? [y,n] (y) > ";
+
+ pcommand = callReadline(prompt.c_str());
+ if (pcommand) {
+ if (strlen(pcommand) > 0) answer = pcommand;
+ callFree(pcommand);
+ }
+
+ if ( answer == "y" || answer == "n" ) {
+ cout << endl;
+ break;
+ }
+ else
+ cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
+ if ( noPrompting )
+ exit(1);
+ }
+
+ if ( mysqlRep )
+ { // current enabled
+ if ( answer == "y" ) {
+ mysqlRep = true;
+ MySQLRep = "y";
+ }
+ else
+ {
+ mysqlRep = false;
+ MySQLRep = "n";
+ }
+ }
+ else
+ { // currently disabled
+ if ( answer == "y" ) {
+ mysqlRep = false;
+ MySQLRep = "n";
+ }
+ else
+ {
+ mysqlRep = true;
+ MySQLRep = "y";
+ }
+ }
+
+ try {
+ sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
+ }
+ catch(...)
+ {}
+
+
switch ( IserverTypeInstall ) {
case (oam::INSTALL_COMBINE_DM_UM_PM): // combined #1 - dm/um/pm on a single server
{
cout << "Combined Server Installation will be performed." << endl;
cout << "The Server will be configured as a Performance Module." << endl;
- cout << "All MariaDB Columnstore Processes will run on the Performance Modules." << endl << endl;
+ cout << "All MariaDB ColumnStore Processes will run on the Performance Modules." << endl << endl;
//module ProcessConfig.xml to setup all apps on the dm
if( !updateProcessConfig(IserverTypeInstall) )
@@ -707,16 +756,6 @@ int main(int argc, char *argv[])
pmwithum = false;
- //MySQL replication
- try {
- MySQLRep = sysConfig->getConfig(InstallSection, "MySQLRep");
- }
- catch(...)
- {}
-
- if ( MySQLRep == "y" )
- mysqlRep = true;
-
break;
}
default: // normal, separate UM and PM
@@ -732,20 +771,10 @@ int main(int argc, char *argv[])
if ( PMwithUM == "y" )
pmwithum = true;
- //MySQL replication
- try {
- MySQLRep = sysConfig->getConfig(InstallSection, "MySQLRep");
- }
- catch(...)
- {}
-
- if ( MySQLRep == "y" )
- mysqlRep = true;
-
string answer = "n";
cout << "NOTE: Local Query Feature allows the ability to query data from a single Performance" << endl;
- cout << " Module. Check MariaDB Columnstore Admin Guide for additional information." << endl << endl;
+ cout << " Module. Check MariaDB ColumnStore Admin Guide for additional information." << endl << endl;
while(true) {
if ( pmwithum )
@@ -781,8 +810,6 @@ int main(int argc, char *argv[])
if ( answer == "y" ) {
pmwithum = true;
PMwithUM = "y";
- mysqlRep = true;
- MySQLRep = "y";
}
}
@@ -792,12 +819,6 @@ int main(int argc, char *argv[])
catch(...)
{}
- try {
- sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
- }
- catch(...)
- {}
-
break;
}
}
@@ -805,15 +826,14 @@ int main(int argc, char *argv[])
}
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);
}
//amazon install setup check
bool amazonInstall = false;
- string amazonSubNet = oam::UnassignedName;
string cloud = oam::UnassignedName;
- system("ec2-version > /tmp/amazon.log 2>&1");
+ system("aws --version > /tmp/amazon.log 2>&1");
ifstream in("/tmp/amazon.log");
@@ -836,221 +856,82 @@ int main(int argc, char *argv[])
catch(...)
{
cloud = oam::UnassignedName;
- }
+ }
- if ( cloud == "disable" )
- amazonInstall = false;
+ if ( cloud == "disable" )
+ amazonInstall = false;
if ( amazonInstall )
{
if ( cloud == oam::UnassignedName )
{
- while(true) {
- string enable = "y";
- prompt = "Amazon AMI Tools installed, do you want to have ColumnStore utilize them [y,n] (y) > ";
- pcommand = callReadline(prompt.c_str());
+ cout << "NOTE: Amazon AWS CLI Tools are installed and allow MariaDB ColumnStore to create Instances and ABS Volumes" << endl << endl;
- if (pcommand) {
- if (strlen(pcommand) > 0) enable = pcommand;
- callFree(pcommand);
-
- if (enable == "n") {
- amazonInstall = false;
+ while(true) {
+ string enable = "y";
+ prompt = "Do you want to have ColumnStore use the Amazon AWS CLI Tools [y,n] (y) > ";
+ pcommand = callReadline(prompt.c_str());
+
+ if (pcommand) {
+ if (strlen(pcommand) > 0) enable = pcommand;
+ callFree(pcommand);
+
+ if (enable == "n") {
+ amazonInstall = false;
+
+ try {
+ sysConfig->setConfig(InstallSection, "Cloud", "disable");
+ }
+ catch(...)
+ {};
- try {
- sysConfig->setConfig(InstallSection, "Cloud", "disable");
- }
- catch(...)
- {};
-
break;
- }
- }
+ }
+ }
+
+ if ( enable != "y" )
+ {
+ cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
+ if ( noPrompting )
+ exit(1);
+ }
+ else
+ {
+ try {
+ sysConfig->setConfig(InstallSection, "Cloud", "amazon-vpc");
+ }
+ catch(...)
+ {}
+ }
- if ( enable != "y" )
- {
- cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
- if ( noPrompting )
- exit(1);
- }
break;
- }
- }
+ }
+ }
+ else
+ cout << "NOTE: Configured to have ColumnStore use the Amazon AWS CLI Tools" << endl << endl;
if ( amazonInstall )
{
- try {
- AmazonAccessKey = sysConfig->getConfig(InstallSection, "AmazonAccessKey");
- AmazonSecretKey = sysConfig->getConfig(InstallSection, "AmazonSecretKey");
- }
- catch(...)
- {}
-
- cout << endl << "Amazon API Tools usage, these files will need to be installed on the local instance:" << endl << endl;
- cout << " 1. File containing the Amazon Access Key" << endl;
- cout << " 2. File containing the Amazon Secret Key" << endl << endl;
-
- while(true) {
- string ready = "y";
- prompt = "Are these files installed and ready to continue [y,n] (y) > ";
- pcommand = callReadline(prompt.c_str());
- if (pcommand) {
- if (strlen(pcommand) > 0) ready = pcommand;
- callFree(pcommand);
- if (ready == "n") {
- cout << endl << "Please Install these files and re-run postConfigure. exiting..." << endl;
- exit(0);
- }
-
- if ( ready != "y" )
- {
- cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl;
- if ( noPrompting )
- exit(1);
- }
+ string cmd = installDir + "/bin/MCSgetCredentials.sh >/dev/null 2>&1";
+ int rtnCode = system(cmd.c_str());
+ if ( WEXITSTATUS(rtnCode) != 0 ) {
+ cout << endl << "Error: No IAM Profile with Security Certificates used or AWS CLI Certificate file configured" << endl;
+ cout << "Check Amazon Install Documenation for additional information, exiting..." << endl;
+ exit (1);
}
-
- try {
- AmazonAccessKey = sysConfig->getConfig(InstallSection, "AmazonAccessKey");
- AmazonSecretKey = sysConfig->getConfig(InstallSection, "AmazonSecretKey");
- }
- catch(...)
- {}
-
- cout << endl;
-
- while(true)
- {
- prompt = "Enter file name containing the Access Key (" + AmazonAccessKey + ") > ";
- pcommand = callReadline(prompt.c_str());
- if (pcommand) {
- if (strlen(pcommand) > 0) AmazonAccessKey = pcommand;
- callFree(pcommand);
- }
- ifstream File (AmazonAccessKey.c_str());
- if (!File) {
- cout << "Error: file not found, please re-enter" << endl;
- if ( noPrompting )
- exit(1);
- }
- else
- break;
- }
-
- while(true)
- {
- prompt = "Enter file name containing the Secret Key (" + AmazonSecretKey + ") > ";
- pcommand = callReadline(prompt.c_str());
- if (pcommand) {
- if (strlen(pcommand) > 0) AmazonSecretKey = pcommand;
- callFree(pcommand);
- }
- ifstream File (AmazonSecretKey.c_str());
- if (!File)
- {
- cout << "Error: file not found, please re-enter" << endl;
- if ( noPrompting )
- exit(1);
- }
- else
- break;
- }
-
- try {
- sysConfig->setConfig(InstallSection, "AmazonAccessKey", AmazonAccessKey);
- sysConfig->setConfig(InstallSection, "AmazonSecretKey", AmazonSecretKey);
- }
- catch(...)
- {}
-
- if( !copyKeyfiles() )
- cout << "copyKeyfiles error" << endl;
-
- break;
}
-
- try {
- AmazonRegion = sysConfig->getConfig(InstallSection, "AmazonRegion");
- }
- catch(...)
- {}
-
- cout << endl;
-
- prompt = "Enter Amazon Region you are running in (" + AmazonRegion + ") > ";
- pcommand = callReadline(prompt.c_str());
- if (pcommand) {
- if (strlen(pcommand) > 0) AmazonRegion = pcommand;
- callFree(pcommand);
- }
-
- try {
- sysConfig->setConfig(InstallSection, "AmazonRegion", AmazonRegion);
- }
- catch(...)
- {}
-
+
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);
}
-
- sleep(1);
-
- //get subnetID
- try {
- amazonSubNet = sysConfig->getConfig(InstallSection, "AmazonSubNetID");
- }
- catch(...)
- {}
-
- if ( amazonSubNet == oam::UnassignedName )
- {
- //check if this is a vpc system by checking for subnet setup
- amazonSubNet = oam.getEC2LocalInstanceSubnet();
- // cout << "amazonSubNet = " << amazonSubNet << endl;
- if ( amazonSubNet == "failed" || amazonSubNet == "" )
- {
- amazonSubNet = oam::UnassignedName;
- cloud = "amazon-ec2";
- }
- else
- {
- cloud = "amazon-vpc";
- }
-
- //set subnetID
- try {
- sysConfig->setConfig(InstallSection, "AmazonSubNetID", amazonSubNet);
- }
- catch(...)
- {}
- }
- else
- cloud = "amazon-vpc";
-
- try {
- sysConfig->setConfig(InstallSection, "Cloud", cloud);
- }
- catch(...)
- {}
}
- else
- {
- try {
- sysConfig->setConfig(InstallSection, "Cloud", oam::UnassignedName);
- }
- catch(...)
- {}
- }
-
- }
-
+
if ( pmwithum )
cout << endl << "NOTE: Local Query Feature is enabled" << endl;
if ( mysqlRep )
- cout << endl << "NOTE: MariaDB Columnstore Replication Feature is enabled" << endl;
+ cout << endl << "NOTE: MariaDB ColumnStore Replication Feature is enabled" << endl;
//Write out Updated System Configuration File
try {
@@ -1058,17 +939,18 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting InitialInstallFlag from the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting InitialInstallFlag from the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
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);
}
cout << endl;
+ // prompt for system name
setSystemName();
cout << endl;
@@ -1095,7 +977,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting ParentOAMModuleName the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting ParentOAMModuleName the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -1106,7 +988,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting ParentStandbyOAMModuleName the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting ParentStandbyOAMModuleName the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -1140,7 +1022,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -1194,7 +1076,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -1211,12 +1093,12 @@ int main(int argc, char *argv[])
}
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);
}
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);
}
}
@@ -1237,7 +1119,7 @@ int main(int argc, char *argv[])
}
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);
}
}
@@ -1268,7 +1150,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -1284,12 +1166,12 @@ int main(int argc, char *argv[])
}
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);
}
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);
}
}
@@ -1309,7 +1191,7 @@ int main(int argc, char *argv[])
}
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);
}
}
@@ -1323,12 +1205,12 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting InitialInstallFlag from the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting InitialInstallFlag from the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
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);
}
@@ -1396,7 +1278,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting Module Count in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting Module Count in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
}
@@ -1441,40 +1323,16 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting Module Count in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting Module Count in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
}
- if ( moduleType == "pm" ) {
+ if ( moduleType == "pm" )
pmNumber = moduleCount;
- if ( pmNumber > 1 && ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) )
- {
- mysqlRep = true;
- MySQLRep = "y";
- try {
- sysConfig->setConfig(InstallSection, "MySQLRep", "y");
- }
- catch(...)
- {}
- }
- }
-
- if ( moduleType == "um" ) {
+ if ( moduleType == "um" )
umNumber = moduleCount;
-
- if ( umNumber > 1 )
- {
- mysqlRep = true;
- MySQLRep = "y";
- try {
- sysConfig->setConfig(InstallSection, "MySQLRep", "y");
- }
- catch(...)
- {}
- }
- }
int moduleID = 1;
@@ -1588,7 +1446,7 @@ int main(int argc, char *argv[])
else
{
string enable = "y";
- cout << "Module '" + newModuleName + "' is Disabled. It needs to be enabled to startup MariaDB Columnstore." << endl;
+ cout << "Module '" + newModuleName + "' is Disabled. It needs to be enabled to startup MariaDB ColumnStore." << endl;
prompt = "Do you want to Enable it or exit? [y,exit] (y) > ";
pcommand = callReadline(prompt.c_str());
if (pcommand)
@@ -1629,12 +1487,12 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting ModuleDisableState in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting ModuleDisableState in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
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);
}
@@ -1810,7 +1668,7 @@ int main(int argc, char *argv[])
else
{
if (newModuleIPAddr == "terminated") {
- cout << "ERROR: Instance " + newModuleHostName + " doesn't have an Private IP Address, please correct and hit 'enter'" << endl << endl;
+ cout << "ERROR: Instance " + newModuleHostName + " doesn't have an Private IP Address, retrying" << endl << endl;
if ( noPrompting )
exit(1);
continue;
@@ -1837,7 +1695,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting Host Name in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting Host Name in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -1952,7 +1810,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting IP address in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting IP address in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -2087,7 +1945,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -2186,7 +2044,6 @@ int main(int argc, char *argv[])
{
//create new UM volume
try{
-
oam.addUMdisk(moduleID, volumeName, deviceName, UMVolumeSize);
}
catch(...) {
@@ -2202,12 +2059,12 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting Volume/Device Names in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting Volume/Device Names in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
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);
}
@@ -2241,7 +2098,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot count in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot count in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -2268,7 +2125,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot ID in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot ID in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
}
@@ -2446,7 +2303,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot ID in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot ID in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -2458,7 +2315,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -2582,12 +2439,12 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting Volume/Device Names in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting Volume/Device Names in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
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);
}
@@ -2606,7 +2463,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot count in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot count in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
//total dbroots on the system
@@ -2614,7 +2471,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -2631,7 +2488,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -2642,7 +2499,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot Count in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot Count in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -2658,7 +2515,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting ConnectionsPerPrimProc in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting ConnectionsPerPrimProc in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -2713,7 +2570,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -2730,7 +2587,7 @@ int main(int argc, char *argv[])
}
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);
}
@@ -2739,7 +2596,7 @@ int main(int argc, char *argv[])
if ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM && pmNumber == 1) {
//run the mysql / mysqld setup scripts
- cout << endl << "===== Running the MariaDB Columnstore MariaDB Columnstore setup scripts =====" << endl << endl;
+ cout << endl << "===== Running the MariaDB ColumnStore MariaDB ColumnStore setup scripts =====" << endl << endl;
checkMysqlPort(mysqlPort, sysConfig);
@@ -2807,7 +2664,7 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem getting EEPackageType from the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem getting EEPackageType from the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
}
@@ -2833,19 +2690,19 @@ int main(int argc, char *argv[])
if ( EEPackageType == "rpm" )
{
- cout << "Performing an MariaDB Columnstore System install using RPM packages" << endl;
+ cout << "Performing an MariaDB ColumnStore System install using RPM packages" << endl;
cout << "located in the " + HOME + " directory." << endl << endl;
}
else
{
if ( EEPackageType == "binary" )
{
- cout << "Performing an MariaDB Columnstore System install using a Binary package" << endl;
+ cout << "Performing an MariaDB ColumnStore System install using a Binary package" << endl;
cout << "located in the " + HOME + " directory." << endl << endl;
}
else
{
- cout << "Performing an MariaDB Columnstore System install using using DEB packages" << endl;
+ cout << "Performing an MariaDB ColumnStore System install using using DEB packages" << endl;
cout << "located in the " + HOME + " directory." << endl;
}
}
@@ -2856,12 +2713,12 @@ int main(int argc, char *argv[])
}
catch(...)
{
- cout << "ERROR: Problem setting EEPackageType from the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting EEPackageType from the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
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);
}
@@ -2974,7 +2831,7 @@ int main(int argc, char *argv[])
if ( ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) ||
( (IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM) && pmwithum ) )
{
- cout << endl << "===== Running the MariaDB Columnstore MariaDB Columnstore setup scripts =====" << endl << endl;
+ cout << endl << "===== Running the MariaDB ColumnStore MariaDB ColumnStore setup scripts =====" << endl << endl;
// call the mysql setup scripts
mysqlSetup();
@@ -3064,8 +2921,8 @@ int main(int argc, char *argv[])
cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "bin/getMySQLpw > /tmp/mysqlpw.log 2>&1";
rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
- cout << endl << "MariaDB Columnstore login failure, MySQL Root password is set." << endl;
- cout << "Need MariaDB Columnstore password configuration file " + HOME + "/.my.cnf on " << remoteModuleName << endl;
+ cout << endl << "MariaDB ColumnStore login failure, MySQL Root password is set." << endl;
+ cout << "Need MariaDB ColumnStore password configuration file " + HOME + "/.my.cnf on " << remoteModuleName << endl;
exit(1);
}
@@ -3081,20 +2938,20 @@ int main(int argc, char *argv[])
cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "/mysql/bin/mysql --defaults-file=" + installDir + "/mysql/my.cnf -u root " + pwprompt + " -e status' 1 > /tmp/idbmysql.log 2>&1";
rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
- cout << endl << "MariaDB Columnstore login failure, password mismatch in " + HOME + ".my.cnf on " << remoteModuleName << endl;
+ cout << endl << "MariaDB ColumnStore login failure, password mismatch in " + HOME + ".my.cnf on " << remoteModuleName << endl;
exit(1);
}
}
else
{
if (!oam.checkLogStatus("/tmp/idbmysql.log", "Columnstore") ) {
- cout << endl << "ERROR: MariaDB Columnstore runtime error, exit..." << endl << endl;
+ cout << endl << "ERROR: MariaDB ColumnStore runtime error, exit..." << endl << endl;
system("cat /tmp/idbmysql.log");
exit (1);
}
else
{
- cout << endl << "Additional MariaDB Columnstore Installation steps Successfully Completed on '" + remoteModuleName + "'" << endl << endl;
+ cout << endl << "Additional MariaDB ColumnStore Installation steps Successfully Completed on '" + remoteModuleName + "'" << endl << endl;
cmd = installDir + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '" + installDir + "/mysql/mysql-Columnstore stop'";
int rtnCode = system(cmd.c_str());
@@ -3232,7 +3089,7 @@ int main(int argc, char *argv[])
if ( thread_remote_installer ) {
//wait until remove install Thread Count is at zero or hit timeout
- cout << endl << "MariaDB Columnstore Package being installed, please wait ...";
+ cout << endl << "MariaDB ColumnStore Package being installed, please wait ...";
cout.flush();
/* block until all threads complete */
@@ -3257,7 +3114,7 @@ int main(int argc, char *argv[])
while(true)
{
- pcommand = callReadline("Would you like to configure MariaDB Columnstore GlusterFS Data Redundancy? [y,n] (" + start + ") > ");
+ pcommand = callReadline("Would you like to configure MariaDB ColumnStore GlusterFS Data Redundancy? [y,n] (" + start + ") > ");
if (pcommand)
{
if (strlen(pcommand) > 0) start = pcommand;
@@ -3273,7 +3130,7 @@ int main(int argc, char *argv[])
}
if ( start == "y" ) {
- cout << endl << "===== Configuring MariaDB Columnstore Data Redundancy Functionality =====" << endl << endl;
+ cout << endl << "===== Configuring MariaDB ColumnStore Data Redundancy Functionality =====" << endl << endl;
int ret = system(glusterconfig.c_str());
if ( WEXITSTATUS(ret) != 0 )
{
@@ -3283,20 +3140,13 @@ int main(int argc, char *argv[])
}
}
- //store mysql rep enable flag
- try {
- sysConfig->setConfig(InstallSection, "MySQLRep", MySQLRep);
- }
- catch(...)
- {}
-
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);
}
- //check if local MariaDB Columnstore system logging is working
- cout << endl << "===== Checking MariaDB Columnstore System Logging Functionality =====" << endl << endl;
+ //check if local MariaDB ColumnStore system logging is working
+ cout << endl << "===== Checking MariaDB ColumnStore System Logging Functionality =====" << endl << endl;
if ( rootUser)
cmd = installDir + "/bin/syslogSetup.sh install > /dev/null 2>&1";
@@ -3312,29 +3162,29 @@ int main(int argc, char *argv[])
int ret = system(cmd.c_str());
if ( WEXITSTATUS(ret) != 0)
- cerr << "WARNING: The MariaDB Columnstore system logging not correctly setup and working" << endl;
+ cerr << "WARNING: The MariaDB ColumnStore system logging not correctly setup and working" << endl;
else
- cout << "The MariaDB Columnstore system logging is setup and working on local server" << endl;
+ cout << "The MariaDB ColumnStore system logging is setup and working on local server" << endl;
- cout << endl << "MariaDB Columnstore System Configuration and Installation is Completed" << endl;
+ cout << endl << "MariaDB ColumnStore System Configuration and Installation is Completed" << endl;
//
- // startup MariaDB Columnstore
+ // startup MariaDB ColumnStore
//
if ( IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM ||
pmNumber > 1 ) {
//
- // perform MariaDB Columnstore system startup
+ // perform MariaDB ColumnStore system startup
//
- cout << endl << "===== MariaDB Columnstore System Startup =====" << endl << endl;
+ cout << endl << "===== MariaDB ColumnStore System Startup =====" << endl << endl;
string start = "y";
cout << "System Installation is complete. If any part of the install failed," << endl;
cout << "the problem should be investigated and resolved before continuing." << endl << endl;
while(true)
{
- pcommand = callReadline("Would you like to startup the MariaDB Columnstore System? [y,n] (y) > ");
+ pcommand = callReadline("Would you like to startup the MariaDB ColumnStore System? [y,n] (y) > ");
if (pcommand)
{
if (strlen(pcommand) > 0) start = pcommand;
@@ -3353,11 +3203,11 @@ int main(int argc, char *argv[])
if (hdfs)
{
- cout << endl << "----- Starting MariaDB Columnstore Service on all Modules -----" << endl << endl;
+ cout << endl << "----- Starting MariaDB ColumnStore Service on all Modules -----" << endl << endl;
string cmd = "pdsh -a '" + installDir + "/bin/columnstore restart' > /tmp/postConfigure.pdsh 2>&1";
system(cmd.c_str());
if (oam.checkLogStatus("/tmp/postConfigure.pdsh", "exit") ) {
- cout << endl << "ERROR: Starting MariaDB Columnstore Service failue, check /tmp/postConfigure.pdsh. exit..." << endl;
+ cout << endl << "ERROR: Starting MariaDB ColumnStore Service failue, check /tmp/postConfigure.pdsh. exit..." << endl;
exit (1);
}
}
@@ -3414,7 +3264,7 @@ int main(int argc, char *argv[])
string remoteHostName = (*list1).hostName;
//run remote command script
- cout << endl << "----- Starting MariaDB Columnstore on '" + remoteModuleName + "' -----" << endl << endl;
+ cout << endl << "----- Starting MariaDB ColumnStore on '" + remoteModuleName + "' -----" << endl << endl;
if ( install == "n" )
{ // didnt do a full install, push the config file
@@ -3428,39 +3278,39 @@ int main(int argc, char *argv[])
if (WEXITSTATUS(rtnCode) != 0)
cout << "Error with running remote_command.sh" << endl;
else
- cout << "MariaDB Columnstore successfully started" << endl;
+ cout << "MariaDB ColumnStore successfully started" << endl;
}
- //start MariaDB Columnstore on local server
- cout << endl << "----- Starting MariaDB Columnstore on local server -----" << endl << endl;
+ //start MariaDB ColumnStore on local server
+ cout << endl << "----- Starting MariaDB ColumnStore on local server -----" << endl << endl;
cmd = installDir + "/bin/columnstore restart > /dev/null 2>&1";
int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
- cout << "Error Starting MariaDB Columnstore local module" << endl;
+ cout << "Error Starting MariaDB ColumnStore local module" << endl;
cout << "Installation Failed, exiting" << endl;
exit (1);
}
else
- cout << "MariaDB Columnstore successfully started" << endl;
+ cout << "MariaDB ColumnStore successfully started" << endl;
}
}
else
{
- cout << endl << "You choose not to Start the MariaDB Columnstore Software at this time." << endl;
+ cout << endl << "You choose not to Start the MariaDB ColumnStore Software at this time." << endl;
exit (1);
}
}
else // Single Server start
{
- cout << endl << "===== MariaDB Columnstore System Startup =====" << endl << endl;
+ cout << endl << "===== MariaDB ColumnStore System Startup =====" << endl << endl;
string start = "y";
cout << "System Installation is complete." << endl;
- cout << "If an error occurred while running the MariaDB Columnstore setup scripts," << endl;
+ cout << "If an error occurred while running the MariaDB ColumnStore setup scripts," << endl;
cout << "this will need to be corrected and postConfigure will need to be re-run." << endl << endl;
while(true)
{
- pcommand = callReadline("Would you like to startup the MariaDB Columnstore System? [y,n] (y) > ");
+ pcommand = callReadline("Would you like to startup the MariaDB ColumnStore System? [y,n] (y) > ");
if (pcommand)
{
if (strlen(pcommand) > 0) start = pcommand;
@@ -3476,26 +3326,26 @@ int main(int argc, char *argv[])
}
if ( start == "y" ) {
- //start MariaDB Columnstore on local server
- cout << endl << "----- Starting MariaDB Columnstore on local Server '" + parentOAMModuleName + "' -----" << endl << endl;
+ //start MariaDB ColumnStore on local server
+ cout << endl << "----- Starting MariaDB ColumnStore on local Server '" + parentOAMModuleName + "' -----" << endl << endl;
string cmd = installDir + "/bin/columnstore restart > /dev/null 2>&1";
int rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) {
- cout << "Error Starting MariaDB Columnstore local module" << endl;
+ cout << "Error Starting MariaDB ColumnStore local module" << endl;
cout << "Installation Failed, exiting" << endl;
exit (1);
}
else
- cout << endl << "MariaDB Columnstore successfully started" << endl;
+ cout << endl << "MariaDB ColumnStore successfully started" << endl;
}
else
{
- cout << endl << "You choose not to Start the MariaDB Columnstore Software at this time." << endl;
+ cout << endl << "You choose not to Start the MariaDB ColumnStore Software at this time." << endl;
exit (1);
}
}
- cout << endl << "MariaDB Columnstore Database Platform Starting, please wait .";
+ cout << endl << "MariaDB ColumnStore Database Platform Starting, please wait .";
cout.flush();
if ( waitForActive() ) {
@@ -3521,7 +3371,7 @@ int main(int argc, char *argv[])
// int status = sendUpgradeRequest(IserverTypeInstall, pmwithum);
// if ( status != 0 ) {
-// cout << endl << "MariaDB Columnstore Install Failed" << endl << endl;
+// cout << endl << "MariaDB ColumnStore Install Failed" << endl << endl;
// exit(1);
// }
// else
@@ -3540,33 +3390,33 @@ int main(int argc, char *argv[])
( mysqlRep && (umNumber > 1) ) ||
( mysqlRep && (pmNumber > 1) && (IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM) ) )
{
- cout << endl << "Run MariaDB Columnstore Replication Setup.. ";
+ cout << endl << "Run MariaDB ColumnStore Replication Setup.. ";
cout.flush();
//send message to procmon's to run upgrade script
int status = sendReplicationRequest(IserverTypeInstall, password, mysqlPort, pmwithum);
if ( status != 0 ) {
- cout << endl << " MariaDB Columnstore Install Failed" << endl << endl;
+ cout << endl << " MariaDB ColumnStore Install Failed" << endl << endl;
exit(1);
}
else
cout << " DONE" << endl;
}
- 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 << "Enter 'mcsmysql' to access the MariaDB Columnstore SQL console" << endl;
- cout << "Enter 'mcsadmin' to access the MariaDB Columnstore Admin console" << endl << endl;
+ cout << "Enter 'mcsmysql' to access the MariaDB ColumnStore SQL console" << endl;
+ cout << "Enter 'mcsadmin' to access the MariaDB ColumnStore Admin console" << endl << endl;
}
else
{
cout << " FAILED" << endl;
- cout << endl << "MariaDB Columnstore System failed to start, check log files in /var/log/mariadb/columnstore" << endl;
+ cout << endl << "MariaDB ColumnStore System failed to start, check log files in /var/log/mariadb/columnstore" << endl;
exit(1);
}
@@ -3624,14 +3474,14 @@ bool checkSaveConfigFile()
singleServerInstall = "2";
if ( !noPrompting ) {
- cout << endl << "A copy of the MariaDB Columnstore Configuration file has been saved during Package install." << endl;
+ cout << endl << "A copy of the MariaDB ColumnStore Configuration file has been saved during Package install." << endl;
if ( singleServerInstall == "1")
cout << "It's Configured for a Single Server Install." << endl;
else
cout << "It's Configured for a Multi-Server Install." << endl;
cout << "You have an option of utilizing the configuration data from that file or starting" << endl;
- cout << "with the MariaDB Columnstore Configuration File that comes with the MariaDB Columnstore Package." << endl;
+ cout << "with the MariaDB ColumnStore Configuration File that comes with the MariaDB ColumnStore Package." << endl;
cout << "You will only want to utilize the old configuration data when performing the same" << endl;
cout << "type of install, i.e. Single or Multi-Server" << endl;
}
@@ -4146,7 +3996,7 @@ bool pkgCheck()
while(true)
{
- pcommand = callReadline("Please place a copy of the MariaDB Columnstore Packages in directory " + HOME + " and press to continue or enter 'exit' to exit the install > ");
+ pcommand = callReadline("Please place a copy of the MariaDB ColumnStore Packages in directory " + HOME + " and press to continue or enter 'exit' to exit the install > ");
if (pcommand) {
if (strcmp(pcommand, "exit") == 0)
{
@@ -4180,7 +4030,7 @@ bool storageSetup(bool amazonInstall)
}
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;
}
@@ -4233,7 +4083,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting DataFilePlugin in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DataFilePlugin in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4242,12 +4092,12 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
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;
return false;
}
@@ -4292,18 +4142,18 @@ bool storageSetup(bool amazonInstall)
// get Frontend Data storage type
//
- cout << "----- Setup User Module MariaDB Columnstore Data Storage Mount Configuration -----" << endl << endl;
+ cout << "----- Setup User Module MariaDB ColumnStore Data Storage Mount Configuration -----" << endl << endl;
cout << "There are 2 options when configuring the storage: internal and external" << endl << endl;
cout << " 'internal' - This is specified when a local disk is used for the Data storage." << endl << endl;
- cout << " 'external' - This is specified when the MariaDB Columnstore Data directory is externally mounted." << endl << endl;
+ cout << " 'external' - This is specified when the MariaDB ColumnStore Data directory is externally mounted." << endl << endl;
try {
UMStorageType = sysConfig->getConfig(InstallSection, "UMStorageType");
}
catch(...)
{
- cout << "ERROR: Problem getting UM DB Storage Data from the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem getting UM DB Storage Data from the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4331,6 +4181,11 @@ bool storageSetup(bool amazonInstall)
UMStorageType = "internal";
else
{
+
+ cout << endl << "NOTE: The volume type. This can be gp2 for General Purpose SSD, io1 for" << endl;
+ cout << " Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold" << endl;
+ cout << " HDD, or standard for Magnetic volumes." << endl;
+
UMStorageType = "external";
cout << endl;
@@ -4341,11 +4196,11 @@ bool storageSetup(bool amazonInstall)
{}
if ( UMVolumeType.empty() || UMVolumeType == "")
- UMVolumeType = "standard";
+ UMVolumeType = "gp2";
while(true)
{
- string prompt = "Enter EBS Volume Type (standard, gp2, io1) : (" + UMVolumeType + ") > ";
+ string prompt = "Enter EBS Volume Type (gp2, io1, sc1, st1, standard) : (" + UMVolumeType + ") > ";
pcommand = callReadline(prompt);
if (pcommand)
{
@@ -4353,7 +4208,7 @@ bool storageSetup(bool amazonInstall)
callFree(pcommand);
}
- if ( UMVolumeType == "standard" || UMVolumeType == "gp2" || UMVolumeType == "io1" )
+ if ( UMVolumeType == "standard" || UMVolumeType == "gp2" || UMVolumeType == "io1" || UMVolumeType == "sc1" || UMVolumeType == "st1")
break;
else
{
@@ -4369,7 +4224,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting UMVolumeType in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting UMVolumeType in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4379,6 +4234,12 @@ bool storageSetup(bool amazonInstall)
if (UMVolumeType == "io1")
minSize = "4";
+ if (UMVolumeType == "sc1" || UMVolumeType == "st1")
+ minSize = "500";
+
+ if (UMVolumeType == "standard")
+ maxSize = "1024";
+
cout << endl;
try {
oam.getSystemConfig("UMVolumeSize", UMVolumeSize);
@@ -4415,7 +4276,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting UMVolumeSize in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting UMVolumeSize in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4461,7 +4322,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting UMVolumeIOPS in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting UMVolumeIOPS in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
}
@@ -4472,7 +4333,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting UMStorageType in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting UMStorageType in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
}
@@ -4483,7 +4344,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting UMStorageType in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting UMStorageType in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
}
@@ -4651,7 +4512,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting DBRootStorageType in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRootStorageType in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4666,6 +4527,10 @@ bool storageSetup(bool amazonInstall)
// if external and amazon, prompt for storage size
if ( storageType == "2" && amazonInstall)
{
+ cout << endl << "NOTE: The volume type. This can be gp2 for General Purpose SSD, io1 for" << endl;
+ cout << " Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold" << endl;
+ cout << " HDD, or standard for Magnetic volumes." << endl;
+
cout << endl;
try {
oam.getSystemConfig("PMVolumeType", PMVolumeType);
@@ -4674,11 +4539,11 @@ bool storageSetup(bool amazonInstall)
{}
if ( PMVolumeType.empty() || PMVolumeType == "")
- PMVolumeType = "standard";
+ PMVolumeType = "gp2";
while(true)
{
- string prompt = "Enter EBS Volume Type (standard, gp2, io1) : (" + PMVolumeType + ") > ";
+ string prompt = "Enter EBS Volume Type (gp2, io1, sc1, st1, standard) : (" + PMVolumeType + ") > ";
pcommand = callReadline(prompt);
if (pcommand)
{
@@ -4686,7 +4551,7 @@ bool storageSetup(bool amazonInstall)
callFree(pcommand);
}
- if ( PMVolumeType == "standard" || PMVolumeType == "gp2" || PMVolumeType == "io1" )
+ if ( PMVolumeType == "standard" || PMVolumeType == "gp2" || PMVolumeType == "io1" || PMVolumeType == "gp2" || PMVolumeType == "io1")
break;
else
{
@@ -4702,7 +4567,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting PMVolumeType in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting PMVolumeType in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4722,6 +4587,12 @@ bool storageSetup(bool amazonInstall)
if (PMVolumeType == "io1")
minSize = "4";
+ if (PMVolumeType == "sc1" || PMVolumeType == "st1")
+ minSize = "500";
+
+ if (PMVolumeType == "standard")
+ maxSize = "1024";
+
while(true)
{
string prompt = "Enter EBS Volume storage size in GB: [" + minSize + "," + maxSize + "] (" + PMVolumeSize + ") > ";
@@ -4748,7 +4619,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting PMVolumeSize in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting PMVolumeSize in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4794,7 +4665,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting PMVolumeIOPS in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting PMVolumeIOPS in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
}
@@ -4805,7 +4676,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting PMVolumeSize in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting PMVolumeSize in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
}
@@ -4898,7 +4769,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting DataFilePlugin in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DataFilePlugin in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4907,7 +4778,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4916,7 +4787,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting DataFileLog in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DataFileLog in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4925,7 +4796,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting ExtentsPerSegmentFile in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting ExtentsPerSegmentFile in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
}
@@ -4938,7 +4809,7 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting DataFilePlugin in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DataFilePlugin in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
@@ -4947,18 +4818,18 @@ bool storageSetup(bool amazonInstall)
}
catch(...)
{
- cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DataFileEnvFile in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
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;
return false;
}
}
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;
return false;
}
@@ -4993,12 +4864,12 @@ void setSystemName()
}
catch(...)
{
- cout << "ERROR: Problem setting SystemName from the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting SystemName from the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
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);
}
}
@@ -5019,20 +4890,6 @@ bool copyFstab(string moduleName)
return true;
}
-/*
- * Copy x.509 file
- */
-bool copyKeyfiles()
-{
- string cmd = "/bin/cp -f " + AmazonAccessKey + " " + installDir + "/local/etc/. > /dev/null 2>&1";
- system(cmd.c_str());
-
- cmd = "/bin/cp -f " + AmazonSecretKey + " " + installDir + "/local/etc/. > /dev/null 2>&1";
- system(cmd.c_str());
-
- return true;
-}
-
/*
* Create a module file
@@ -5095,7 +4952,7 @@ void offLineAppCheck()
}
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;
exit(1);
}
@@ -5129,7 +4986,7 @@ void offLineAppCheck()
}
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);
}
}
@@ -5215,7 +5072,7 @@ bool singleServerDBrootSetup()
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot count in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot count in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -5238,7 +5095,7 @@ bool singleServerDBrootSetup()
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot ID in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot ID in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
}
@@ -5312,7 +5169,7 @@ bool singleServerDBrootSetup()
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot ID in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot ID in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -5324,7 +5181,7 @@ bool singleServerDBrootSetup()
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot in the MariaDB ColumnStore System Configuration file" << endl;
return false;
}
}
@@ -5336,7 +5193,7 @@ bool singleServerDBrootSetup()
}
catch(...)
{
- cout << "ERROR: Problem setting DBRoot count in the MariaDB Columnstore System Configuration file" << endl;
+ cout << "ERROR: Problem setting DBRoot count in the MariaDB ColumnStore System Configuration file" << endl;
exit(1);
}
@@ -5344,7 +5201,7 @@ bool singleServerDBrootSetup()
DBRootCount = DBRootCount + dbroots.size();
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);
}
diff --git a/procmgr/processmanager.cpp b/procmgr/processmanager.cpp
index 0d7f2c64c..c5efc3c31 100644
--- a/procmgr/processmanager.cpp
+++ b/procmgr/processmanager.cpp
@@ -4816,14 +4816,10 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
sysConfig->setConfig(Section, "Port", "8622");
}
- bool setMysqlRep = false;
-
if ( moduleType == "um" ||
( moduleType == "pm" && config.ServerInstallType() == oam::INSTALL_COMBINE_DM_UM_PM ) ||
( moduleType == "pm" && PMwithUM == "y") ) {
- setMysqlRep = true;
-
listPT = devicenetworklist.begin();
for( ; listPT != devicenetworklist.end() ; listPT++)
{
@@ -5313,22 +5309,6 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
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
distributeConfigFile("system");
diff --git a/tools/configMgt/autoConfigure.cpp b/tools/configMgt/autoConfigure.cpp
index bb02d6d43..6dcc59487 100644
--- a/tools/configMgt/autoConfigure.cpp
+++ b/tools/configMgt/autoConfigure.cpp
@@ -147,20 +147,7 @@ int main(int argc, char *argv[])
{}
bool build40 = false;
- if ( !CoreFileFlag.empty() )
- build40 = true;
-
- //build 4.0.1 flag
- string AmazonSubNetID;
- try {
- AmazonSubNetID = sysConfigNew->getConfig(InstallSection, "AmazonSubNetID");
- }
- catch(...)
- {}
-
- bool build401 = false;
- if ( !AmazonSubNetID.empty() )
- build401 = true;
+ bool build401 = true;
//set install config flag
try {
@@ -1283,18 +1270,13 @@ int main(int argc, char *argv[])
//
if (build3) {
//setup cloud parameters
- string x509Cert;
- string x509PriKey;
string UMStorageType;
- string rpw;
string PMInstanceType;
string UMInstanceType;
string UMSecurityGroup;
string UMVolumeSize;
string PMVolumeSize;
string AmazonAutoTagging;
- string AmazonRegion;
- string AmazonZone;
string AmazonVPCNextPrivateIP;
string AmazonDeviceName;
string UMVolumeType;
@@ -1305,20 +1287,14 @@ int main(int argc, char *argv[])
try {
cloud = sysConfigOld->getConfig(InstallSection, "Cloud");
- x509Cert = sysConfigOld->getConfig(InstallSection, "AmazonX509Certificate");
- x509PriKey = sysConfigOld->getConfig(InstallSection, "AmazonX509PrivateKey");
UMStorageType = sysConfigOld->getConfig(InstallSection, "UMStorageType");
- rpw = sysConfigOld->getConfig(InstallSection, "rpw");
PMInstanceType = sysConfigOld->getConfig(InstallSection, "PMInstanceType");
UMInstanceType = sysConfigOld->getConfig(InstallSection, "UMInstanceType");
UMSecurityGroup = sysConfigOld->getConfig(InstallSection, "UMSecurityGroup");
UMVolumeSize = sysConfigOld->getConfig(InstallSection, "UMVolumeSize");
PMVolumeSize = sysConfigOld->getConfig(InstallSection, "PMVolumeSize");
AmazonAutoTagging = sysConfigOld->getConfig(InstallSection, "AmazonAutoTagging");
- AmazonRegion = sysConfigOld->getConfig(InstallSection, "AmazonRegion");
- AmazonZone = sysConfigOld->getConfig(InstallSection, "AmazonZone");
AmazonVPCNextPrivateIP = sysConfigOld->getConfig(InstallSection, "AmazonVPCNextPrivateIP");
- AmazonSubNetID = sysConfigOld->getConfig(InstallSection, "AmazonSubNetID");
AmazonDeviceName = sysConfigOld->getConfig(InstallSection, "AmazonDeviceName");
UMVolumeType = sysConfigOld->getConfig(InstallSection, "UMVolumeType");
UMVolumeIOPS = sysConfigOld->getConfig(InstallSection, "UMVolumeIOPS");
@@ -1355,13 +1331,10 @@ int main(int argc, char *argv[])
cloud = oam::UnassignedName;
if ( cloud == "amazon")
cloud = "amazon-ec2";
- if ( AmazonSubNetID.empty() )
- AmazonSubNetID = oam::UnassignedName;
if ( AmazonVPCNextPrivateIP.empty() )
AmazonVPCNextPrivateIP = oam::UnassignedName;
try {
- sysConfigNew->setConfig(InstallSection, "AmazonSubNetID", AmazonSubNetID);
sysConfigNew->setConfig(InstallSection, "AmazonVPCNextPrivateIP", AmazonVPCNextPrivateIP);
}
catch(...)
@@ -1373,18 +1346,13 @@ int main(int argc, char *argv[])
try {
sysConfigNew->setConfig(InstallSection, "Cloud", cloud);
- sysConfigNew->setConfig(InstallSection, "AmazonX509Certificate", x509Cert);
- sysConfigNew->setConfig(InstallSection, "AmazonX509PrivateKey", x509PriKey);
sysConfigNew->setConfig(InstallSection, "UMStorageType", UMStorageType);
- sysConfigNew->setConfig(InstallSection, "rpw", rpw);
sysConfigNew->setConfig(InstallSection, "PMInstanceType", PMInstanceType);
sysConfigNew->setConfig(InstallSection, "UMInstanceType", UMInstanceType);
sysConfigNew->setConfig(InstallSection, "UMSecurityGroup", UMSecurityGroup);
sysConfigNew->setConfig(InstallSection, "UMVolumeSize", UMVolumeSize);
sysConfigNew->setConfig(InstallSection, "PMVolumeSize", PMVolumeSize);
sysConfigNew->setConfig(InstallSection, "AmazonAutoTagging", AmazonAutoTagging);
- sysConfigNew->setConfig(InstallSection, "AmazonRegion", AmazonRegion);
- sysConfigNew->setConfig(InstallSection, "AmazonZone", AmazonZone);
sysConfigNew->setConfig(InstallSection, "AmazonDeviceName", AmazonDeviceName);
sysConfigNew->setConfig(InstallSection, "UMVolumeType", UMVolumeType);