You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by ar...@apache.org on 2016/01/16 00:14:50 UTC
[1/2] incubator-trafodion git commit: Addtional fixes for HA support
(AWS)
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 03a697dc1 -> 9c2d9e148
Addtional fixes for HA support (AWS)
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/8197da6e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/8197da6e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/8197da6e
Branch: refs/heads/master
Commit: 8197da6e9578345b0fdb7d5aa4a6a383370390bc
Parents: 9f00dd5
Author: Anuradha Hegde <an...@esgyn.com>
Authored: Thu Jan 14 23:52:20 2016 +0000
Committer: Anuradha Hegde <an...@esgyn.com>
Committed: Thu Jan 14 23:52:20 2016 +0000
----------------------------------------------------------------------
core/sqf/sql/scripts/dcscheck | 2 +-
core/sqf/sql/scripts/dcsstop | 2 +-
dcs/bin/scripts/dcsbind.sh | 6 +++++-
dcs/bin/scripts/dcsunbind.sh | 14 +++++++++-----
install/installer/cloud_cli_setup | 16 +++++-----------
install/installer/dcs_installer | 3 ++-
6 files changed, 23 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8197da6e/core/sqf/sql/scripts/dcscheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcscheck b/core/sqf/sql/scripts/dcscheck
index 52cbac1..270a5d6 100755
--- a/core/sqf/sql/scripts/dcscheck
+++ b/core/sqf/sql/scripts/dcscheck
@@ -84,7 +84,7 @@ if [[ $sq_stat == 0 ]]; then
### Get the node where the active master is running
if [[ ! -z $CLUSTERNAME ]]; then
- if [[ ! -z $ENABLE_HA ]]; then
+ if [[ $ENABLE_HA == "true" ]]; then
echo "Cluster Configuration: HA"
floatip_interface=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f1`
floatip_port=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f3`
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8197da6e/core/sqf/sql/scripts/dcsstop
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcsstop b/core/sqf/sql/scripts/dcsstop
index a102e6f..5b37e91 100755
--- a/core/sqf/sql/scripts/dcsstop
+++ b/core/sqf/sql/scripts/dcsstop
@@ -34,7 +34,7 @@ if [ ! -e ${DCS_STOP_CMD} ]; then
exit 1;
fi
-if [[ ! -z $ENABLE_HA ]]; then
+if [[ $ENABLE_HA == "true" ]]; then
${DCS_INSTALL_DIR}/bin/scripts/dcsunbind.sh
fi
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8197da6e/dcs/bin/scripts/dcsbind.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/dcsbind.sh b/dcs/bin/scripts/dcsbind.sh
index f9f20cb..d791034 100755
--- a/dcs/bin/scripts/dcsbind.sh
+++ b/dcs/bin/scripts/dcsbind.sh
@@ -329,12 +329,15 @@ gv_float_external_interface=""
gv_float_external_ip=""
gv_float_internal_ip=""
gv_port=0
-awscmd="/usr/local/bin/aws ec2 --output text "
gv_ok=0
gv_warn=1
gv_error=-1
+if [[ $ENABLE_HA != "true" ]]; then
+ exit $gv_ok
+fi
+
gv_externalip_set=1
gv_internalip_set=1
@@ -358,6 +361,7 @@ if [[ $AWS_CLOUD != "true" ]]; then
Check_VirtualIP_InUse_Unbind
BindFloatIp
else
+ awscmd="/usr/local/bin/aws ec2 --output text "
device_index_to_use=`echo $gv_float_external_interface | sed -e "s@eth\([0-9][0-9]*\)@\1@"`
dcsEcho "Using device index $device_index_to_use for $gv_float_external_interface"
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8197da6e/dcs/bin/scripts/dcsunbind.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/dcsunbind.sh b/dcs/bin/scripts/dcsunbind.sh
index 65c661d..e58f4b3 100755
--- a/dcs/bin/scripts/dcsunbind.sh
+++ b/dcs/bin/scripts/dcsunbind.sh
@@ -66,6 +66,10 @@ function Check_VirtualIP_InUse_And_Unbind {
#Main program
+if [[ $ENABLE_HA == "false" ]]; then
+ exit 0
+fi
+
gv_float_internal_ip=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f2`
gv_float_external_ip=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f2`
gv_float_interface=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f1`
@@ -73,20 +77,20 @@ gv_port=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f3`
if [[ -z $gv_port ]]; then
gv_port=23400
fi
-awscmd=/usr/local/bin/aws
gv_externalip_set=1
gv_internalip_set=1
-if [[ ! -z $AWS_CLOUD ]]; then
+if [[ $AWS_CLOUD == "true" ]]; then
+ awscmd="/usr/local/bin/aws ec2 --output text "
#Get the network interface
- NETWORKINTERFACE=`$awscmd ec2 describe-network-interfaces| grep -i networkinterfaces| grep -i $gv_float_internal_ip|cut -f5`
+ NETWORKINTERFACE=`$awscmd describe-network-interfaces| grep -i networkinterfaces| grep -i $gv_float_internal_ip|cut -f5`
# Get the attachment id for the network interface
- ATTACH_ID=`$awscmd ec2 describe-network-interfaces --network-interface-ids $NETWORKINTERFACE |grep -i attachment |cut -f3`
+ ATTACH_ID=`$awscmd describe-network-interfaces --network-interface-ids $NETWORKINTERFACE |grep -i attachment |cut -f3`
echo "Detaching attachment Id:" $ATTACH_ID
if [ ! -z "$ATTACH_ID" ]; then
- $awscmd ec2 detach-network-interface --attachment-id $ATTACH_ID
+ $awscmd detach-network-interface --attachment-id $ATTACH_ID
echo "Detached interface :" $NETWORKINTERFACE
fi
else
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8197da6e/install/installer/cloud_cli_setup
----------------------------------------------------------------------
diff --git a/install/installer/cloud_cli_setup b/install/installer/cloud_cli_setup
index 980c61e..ce653b6 100755
--- a/install/installer/cloud_cli_setup
+++ b/install/installer/cloud_cli_setup
@@ -27,8 +27,7 @@ TRAF_CONFIG=/etc/trafodion/trafodion_config
source $TRAF_CONFIG
if [ $node_count -eq 1 ]; then
- TRAF_PDSH=""
- TRAF_PDCP="/bin/cp"
+ exit 0
else
TRAF_PDSH="pdsh $MY_NODES"
TRAF_PDCP="pdcp -r $MY_NODES"
@@ -37,25 +36,20 @@ fi
###### Setting up CLI for AWS as sudo id
if [[ ! -z $AWS_CLOUD ]]; then
-###### Check for existence of aws
+ ###### Check for existence of aws binary
if [[ ! -d /usr/local/aws ]]; then
cd $HOME
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip $HOME/awscli-bundle.zip
- if [[ $node_count -gt "1" ]]; then
- $TRAF_PDCP $HOME/awscli-bundle $HOME
- $TRAF_PDSH "sudo $HOME/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws" | tee -a $INSTALL_LOG
- else
- sudo $HOME/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws | tee -a $INSTALL_LOG
- fi
+ $TRAF_PDCP $HOME/awscli-bundle $HOME
+ $TRAF_PDSH "sudo $HOME/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws" | tee -a $INSTALL_LOG
$TRAF_PDSH "sudo rm -rf $HOME/awscli-bundle"
rm -f $HOME/awscli-bundle.zip
fi
-###### Check for existence of .aws for trafodion id
- ###### Check if aws configuration file exist for Trafodion Id
+ ###### Check if .aws configuration file exist for Trafodion Id
AWSCONFIG_DIR=`sudo su $TRAF_USER --login --command "ls -altr | grep -w ".aws" | wc -l" `
if [[ $AWSCONFIG_DIR == 0 ]]; then
###### Execute 'aws configure' command as a Trafodion Id
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8197da6e/install/installer/dcs_installer
----------------------------------------------------------------------
diff --git a/install/installer/dcs_installer b/install/installer/dcs_installer
index 2e9994e..f1b190d 100755
--- a/install/installer/dcs_installer
+++ b/install/installer/dcs_installer
@@ -233,7 +233,8 @@ if [[ "$ENABLE_HA" == "true" ]]; then
#fi
else
######Configure trafci wrapper script
- sed -i -e "s/HNAME=localhost:23400/$DCS_PRIMARY_MASTER_NODE:23400/g" $SQ_ROOT/trafci/bin/trafci
+ newHName="HNAME=$DCS_PRIMARY_MASTER_NODE:23400"
+ sed -i -e "s/HNAME=localhost:23400/$newHName/g" $SQ_ROOT/trafci/bin/trafci
fi
[2/2] incubator-trafodion git commit: Merge [TRAFODION-1680] Dcs
needs to provide support for HA on AWS
Posted by ar...@apache.org.
Merge [TRAFODION-1680] Dcs needs to provide support for HA on AWS
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/9c2d9e14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/9c2d9e14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/9c2d9e14
Branch: refs/heads/master
Commit: 9c2d9e148e47136721603e24cd5d2473a4d04a91
Parents: 03a697d 8197da6
Author: Arvind Narain <ar...@apache.org>
Authored: Fri Jan 15 23:11:44 2016 +0000
Committer: Arvind Narain <ar...@apache.org>
Committed: Fri Jan 15 23:11:44 2016 +0000
----------------------------------------------------------------------
core/sqf/sql/scripts/dcscheck | 2 +-
core/sqf/sql/scripts/dcsstop | 2 +-
dcs/bin/scripts/dcsbind.sh | 6 +++++-
dcs/bin/scripts/dcsunbind.sh | 14 +++++++++-----
install/installer/cloud_cli_setup | 16 +++++-----------
install/installer/dcs_installer | 3 ++-
6 files changed, 23 insertions(+), 20 deletions(-)
----------------------------------------------------------------------