You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2015/12/22 17:28:32 UTC

[01/13] incubator-trafodion git commit: Floating IP support for AWS cluster

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 1f9b52a63 -> 5746be35a


Floating IP support for AWS cluster


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/1f0d872b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/1f0d872b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/1f0d872b

Branch: refs/heads/master
Commit: 1f0d872bd11262fbd5b66b3e11d3cab059faf050
Parents: ebe876d
Author: Anuradha Hegde <he...@adev04.esgyn.com>
Authored: Mon Dec 14 03:33:33 2015 +0000
Committer: Anuradha Hegde <he...@adev04.esgyn.com>
Committed: Mon Dec 14 03:33:33 2015 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/cleanlogs    |  86 +++++++++++++++++++++
 core/sqf/sql/scripts/dcscheck     |  13 +++-
 core/sqf/sql/scripts/dcsstop      |   4 +
 core/sqf/sql/scripts/sqcheck      |  50 ++++++++++++-
 dcs/bin/scripts/dcsbind.sh        | 132 ++++++++++++++++++++++++++++++++-
 dcs/bin/scripts/dcsunbind.sh      |  93 +++++++++++++++++++++++
 dcs/bin/scripts/parse_dcs_site.py |  39 ++++++++++
 install/installer/setup_ssh_key   |  27 +++++++
 8 files changed, 439 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1f0d872b/core/sqf/sql/scripts/cleanlogs
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/cleanlogs b/core/sqf/sql/scripts/cleanlogs
new file mode 100755
index 0000000..505adb4
--- /dev/null
+++ b/core/sqf/sql/scripts/cleanlogs
@@ -0,0 +1,86 @@
+#!/bin/bash
+#
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+# This script cleans up the log files of various components
+if [ -e $SQ_PDSH ]; then
+   L_PDSH="/usr/bin/pdsh $MY_NODES "
+else
+   L_PDSH=
+fi
+
+function usage() {
+   prog=`basename $0` 
+   echo ""
+   echo "$prog { all | dcs | rest | core }"
+   echo "    all  --- Remove files from core, dcs and rest logs folder"
+   echo "    dcs  --- Remove files from $DCS_INSTALL_DIR/logs folder"
+   echo "    rest --- Remove files from $REST_INSTALL_DIR/logs folder"
+   echo "    core --- Remove log files residing in $MY_SQROOT/logs folder"
+}
+
+function core_logs() {
+   $L_PDSH "rm -rf ${MY_SQROOT}/logs/*.err"
+   $L_PDSH "rm -rf ${MY_SQROOT}/logs/*.log"
+   $L_PDSH "rm -rf ${MY_SQROOT}/logs/*log.[0-9]*"
+}
+
+function dcs_logs() {
+   $L_PDSH "rm -rf ${DCS_INSTALL_DIR}/logs/*.log"
+   $L_PDSH "rm -rf ${DCS_INSTALL_DIR}/logs/*.log.[0-9]*"
+   $L_PDSH "rm -rf ${DCS_INSTALL_DIR}/logs/*.out"
+   $L_PDSH "rm -rf ${DCS_INSTALL_DIR}/logs/*.out.[0-9]*"
+}
+
+function rest_logs() {
+   $L_PDSH "rm -rf ${REST_INSTALL_DIR}/logs/*.log"
+   $L_PDSH "rm -rf ${REST_INSTALL_DIR}/logs/*.log.[0-9]*"
+   $L_PDSH "rm -rf ${REST_INSTALL_DIR}/logs/*.out"
+   $L_PDSH "rm -rf ${REST_INSTALL_DIR}/logs/*.out.[0-9]*"
+}
+
+function all_logs() {
+   core_logs
+   dcs_logs
+   rest_logs
+}
+
+if [ ! -z ${MY_SQROOT} ]; then
+   case "$1" in 
+      core)
+        core_logs
+        ;;
+      dcs)
+        dcs_logs
+        ;;
+      rest)
+        rest_logs
+        ;;
+      all)
+        all_logs
+        ;;
+      *)
+        usage
+        exit 1
+   esac
+fi
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1f0d872b/core/sqf/sql/scripts/dcscheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcscheck b/core/sqf/sql/scripts/dcscheck
index ef132e1..b227e35 100755
--- a/core/sqf/sql/scripts/dcscheck
+++ b/core/sqf/sql/scripts/dcscheck
@@ -31,6 +31,7 @@ down_dcsmaster_cnt=0
 cfg_dcsserver_cnt=0
 actual_dcsserver_cnt=0
 down_dcsserver_cnt=0
+activeMaster=`hostname`
 
 tmp_ps=`mktemp -t`
 if [[ $? != 0 ]]; then
@@ -55,6 +56,7 @@ if [[ $sq_stat == 0 ]]; then
   if [ -s ${DCS_INSTALL_DIR}/conf/backup-masters ]; then
      let backup_dcsmaster_cnt=`/bin/egrep -cv '#|^$' ${DCS_INSTALL_DIR}/conf/backup-masters`
      let cfg_dcsmaster_cnt=$backup_dcsmaster_cnt+1
+     list_of_backups=`cat ${DCS_INSTALL_DIR}/conf/backup-masters | /bin/egrep -v '^#|^$'`
    else
      let cfg_dcsmaster_cnt=1
    fi
@@ -74,6 +76,12 @@ if [[ $sq_stat == 0 ]]; then
      actual_dcsserver_cnt=`$jpscmd |grep DcsServer |wc -l`
    fi
 
+### Get the node where the active master is running
+   if [[ -e $SQ_PDSH && ! -z $ENABLE_HA ]]; then
+        gv_float_interface=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f1`
+        activeMaster=`$SQ_PDSH $MY_NODES /sbin/ip addr show |grep $gv_float_interface$ |cut -d':' -f1`
+   fi
+
    if ( [ "$cfg_dcsserver_cnt" '!=' "$actual_dcsserver_cnt" ] ); then
      let down_dcsserver_cnt=cfg_dcsserver_cnt-actual_dcsserver_cnt
    else
@@ -108,7 +116,10 @@ if [[ $sq_stat == 0 ]]; then
    fi
    masterport=`cat $dcstmp | /usr/bin/tail -n 1 | cut -d ":" -f4`
    if [ ! -z "$masterport" ]; then
-     echo "DcsMaster is listening on port $masterport"
+     echo "DcsMaster is listening host \"$activeMaster\" using port \"$masterport\""
+     if [[ ! -z $list_of_backups ]]; then
+        echo "Backup Masters configured to run on nodes: " $list_of_backups
+     fi
      echo
    fi
    rm -f $dcstmp $tmp_chk $tmp_ps

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1f0d872b/core/sqf/sql/scripts/dcsstop
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcsstop b/core/sqf/sql/scripts/dcsstop
index 70fbdfa..a102e6f 100755
--- a/core/sqf/sql/scripts/dcsstop
+++ b/core/sqf/sql/scripts/dcsstop
@@ -34,6 +34,10 @@ if [ ! -e ${DCS_STOP_CMD} ]; then
    exit 1;
 fi
 
+if [[ ! -z $ENABLE_HA ]]; then
+   ${DCS_INSTALL_DIR}/bin/scripts/dcsunbind.sh
+fi
+
 echo "Shutting down the DCS environment now"
 cd ${DCS_INSTALL_DIR}
 ${DCS_STOP_CMD}

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1f0d872b/core/sqf/sql/scripts/sqcheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/sqcheck b/core/sqf/sql/scripts/sqcheck
index 19d2c80..914ea0e 100755
--- a/core/sqf/sql/scripts/sqcheck
+++ b/core/sqf/sql/scripts/sqcheck
@@ -106,6 +106,49 @@ function fillArray {
     done
 }
 
+function getDcsInfo {
+ dcsznode=/$USER/dcs/master
+ jpscmd=$JAVA_HOME/bin/jps
+
+ if [ -d $DCS_INSTALL_DIR ];then
+
+### Get the configured number of DcsMaster's
+  if [ -s ${DCS_INSTALL_DIR}/conf/backup-masters ]; then
+     let backup_dcsmaster_cnt=`/bin/egrep -cv '#|^$' ${DCS_INSTALL_DIR}/conf/backup-masters`
+     let cfg_dcsmaster_cnt=$backup_dcsmaster_cnt+1
+   else
+     let cfg_dcsmaster_cnt=1
+   fi
+
+### Get the configured number of DcsServer and mxosrvr
+   if [ -f ${DCS_INSTALL_DIR}/conf/servers ]; then
+      let cfg_mxo_cnt=`cat $DCS_INSTALL_DIR/conf/servers|awk '{if ($2=="") k=1;else k=$2;cnt+=k} END {print cnt}'`
+      let cfg_dcsserver_cnt=`cat $DCS_INSTALL_DIR/conf/servers|awk '{if ($2=="") p=1;else p+=1;} END {print p}'`
+   fi
+
+### Check if there are any DcsMaster and DcsServer's that are started 
+   if [ -e $SQ_PDSH ]; then
+     actual_dcsmaster_cnt=`$SQ_PDSH $MY_NODES $jpscmd |grep DcsMaster |wc -l` 
+     actual_dcsserver_cnt=`$SQ_PDSH $MY_NODES $jpscmd |grep DcsServer |wc -l` 
+   else
+     actual_dcsmaster_cnt=`$jpscmd |grep DcsMaster |wc -l`
+     actual_dcsserver_cnt=`$jpscmd |grep DcsServer |wc -l`
+   fi
+
+   if ( [ "$cfg_dcsserver_cnt" '!=' "$actual_dcsserver_cnt" ] ); then
+     let down_dcsserver_cnt=cfg_dcsserver_cnt-actual_dcsserver_cnt
+   else
+     down_dcsserver_cnt=''
+   fi
+
+   if ( [ "$cfg_dcsmaster_cnt" '!=' "$actual_dcsmaster_cnt" ] ); then
+     let down_dcsmaster_cnt=cfg_dcsmaster_cnt-actual_dcsmaster_cnt
+   else
+     down_dcsmaster_cnt=''
+   fi
+ fi
+}
+
 begin_time_seconds=$(date +%s)
 
 declare -i max_checks
@@ -307,6 +350,7 @@ fi
   fi
 
   #MXOSRVR
+  getDcsInfo
   let act_mxo_cnt=`< $sq_tmp_ps egrep -a -i ' mxosrvr' | wc -l`
   if ( [ "$cfg_mxo_cnt" '!=' "$act_mxo_cnt" ] ); then 
     let act_mxo_down_cnt=cfg_mxo_cnt-act_mxo_cnt
@@ -478,13 +522,17 @@ else
     if [[ $sqck_component == "all" ]]; then
         echo -e "DTM\t\t$cfg_dtm_cnt\t\t$act_dtm_cnt\t    ${down_dtms[*]}"
         echo -e "RMS\t\t$cfg_rms_cnt\t\t$act_rms_cnt\t    ${down_rms[*]}"
+        echo -e "DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t    $down_dcsmaster_cnt"
+        echo -e "DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t    $down_dcsserver_cnt"
         echo -e "MXOSRVR\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t    ${act_mxo_down_cnt}\n"
     elif [[ $sqck_component == "dtm" ]]; then
         echo -e "DTM\t\t$cfg_dtm_cnt\t\t$act_dtm_cnt\t    ${down_dtms[*]}\n"
     elif [[ $sqck_component == "rms" ]]; then
         echo -e "RMS\t\t$cfg_rms_cnt\t\t$act_rms_cnt\t    ${down_rms[*]}\n"
     elif [[ $sqck_component == "dcs" ]]; then
-        echo -e "MXOSRVR\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t    ${act_mxo_down_cnt}\n"
+        echo -e "DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t    $down_dcsmaster_cnt"
+        echo -e "DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t    $down_dcsserver_cnt"
+echo - e "MXOSRVR\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t    ${act_mxo_down_cnt}\n"
     fi
 fi
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1f0d872b/dcs/bin/scripts/dcsbind.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/dcsbind.sh b/dcs/bin/scripts/dcsbind.sh
index ee928b1..d33decc 100755
--- a/dcs/bin/scripts/dcsbind.sh
+++ b/dcs/bin/scripts/dcsbind.sh
@@ -90,6 +90,7 @@ if  [ -z $gv_float_external_ip ] ; then
    exit $gv_ok
 fi
 
+
 }
 
 function check_node {
@@ -229,12 +230,104 @@ fi
 
 }
 
+function configure_route_tables {
+    gv_default_interface=eth0
+    bcast=`/sbin/ip addr show $gv_default_interface | grep "inet .*$gv_default_interface\$" | awk '{print $4}'`
+    status=$?
+    if [ $status -ne 0 ]; then
+       dcsEcho "Failed to get the broadcast address for $gv_default_interface - status is $status"
+       exit $gv_error
+    fi
+    dcsEcho "broadcast address to use $bcast"
+
+    mask=`/sbin/ip addr show $gv_default_interface | grep "inet .*$gv_default_interface\$" | awk '{print $2}' | cut -d'/' -f2`
+    status=$?
+    if [ $status -ne 0 ]; then
+       dcsEcho "Failed to get the mask for $gv_default_interface - status is $status"
+       exit $gv_error
+    fi
+    dcsEcho "mask to use $mask"
+
+    dcsEcho "Associating the internal ip address to the interface"
+    sudo /sbin/ip addr add $gv_float_internal_ip/$mask broadcast $bcast dev $gv_float_external_interface
+    status=$?
+    if [[ $status -ne 0 && $status -ne 2 ]]; then
+       dcsEcho "Failed to associate the floating ip to the interface - status is $status"
+       exit $gv_error
+    fi
+
+    dcsEcho "Bringing the interface up"
+    sudo /sbin/ip link set $gv_float_external_interface up
+    status=$?
+    if [[ $status -ne 0 && $status -ne 2 ]]; then
+       dcsEcho "Failed to bring interface up - status is $status"
+       exit $gv_error
+    fi
+
+    dcsEcho "Adding gateway address to the interface"
+    GATEWAY_IP=`netstat -rn |grep "^0.0.0.0"|awk '{print $2}'`
+    sudo /sbin/ip route add default via $GATEWAY_IP dev $gv_float_external_interface tab 2
+    status=$?
+    if [[ $status -ne 0 && $status -ne 2 ]]; then
+       dcsEcho "Failed to add the gateway address to the interface - status is $status"
+       exit $gv_error
+    fi
+
+
+    dcsEcho "Deleting and Adding from rule for the internal ip to the rules table"
+    sudo /sbin/ip rule del from $gv_float_internal_ip/32 tab 2
+    status=$?
+    if [[ $status -ne 0 && $status -ne 2 ]]; then
+       dcsEcho "Failed to delete from rule in the rules table - status is $status"
+       exit $gv_error
+    fi
+
+    sudo /sbin/ip rule add from $gv_float_internal_ip/32 tab 2
+    status=$?
+    if [[ $status -ne 0 && $status -ne 2 ]]; then
+dcsEcho "Failed to add the from rule to the rules table - status is $status"
+       exit $gv_error
+    fi
+
+    dcsEcho "Deleting and Adding to rule for the internal ip to the rules table"
+    sudo /sbin/ip rule del to $gv_float_internal_ip/32 tab 2
+    status=$?
+    if [[ $status -ne 0 && $status -ne 2 ]]; then
+       dcsEcho "Failed to delete the to rule in the rules table - status is $status"
+       exit $gv_error
+    fi
+
+    sudo /sbin/ip rule add to $gv_float_internal_ip/32 tab 2
+    status=$?
+    if [[ $status -ne 0 && $status -ne 2 ]]; then
+       dcsEcho "Failed to add the to rule to the rules table - status is $status"
+       exit $gv_error
+    fi
+
+    dcsEcho "Flushing the route cache"
+    sudo /sbin/ip route flush cache
+    status=$?
+    if [ $status -ne 0 ]; then
+       dcsEcho "Failed to flush the cache - status is $status"
+       exit $gv_error
+    fi
+
+    dcsEcho "Probing the network"
+    sudo /sbin/arping -U -w 3 -c 3 -I $gv_float_external_interface $gv_float_external_ip
+    status=$?
+    if [ $status -ne 0 ]; then
+       dcsEcho "Failed to send packets across the network - status is $status"
+       exit $gv_error
+    fi
+}
+
 #########################################################
 # MAIN portion of dcsbind begins here
 #########################################################
 
 gv_float_external_interface=""
 gv_float_external_ip=""
+gv_float_internal_ip=""
 gv_port=0
 
 gv_ok=0
@@ -250,11 +343,44 @@ GetOpts $1 $2 $3 $4 $5 $6 $7 $8 $9
 
 dcsEcho "dcsbind invoked with parameters -i $gv_float_external_interface -a $gv_float_external_ip -p $gv_port"
 
-
 ValidateParams
 CheckSudo
 GetFloatingIpAdrress
-Check_VirtualIP_InUse_Unbind
-BindFloatIp
+
+gv_float_internal_ip=`echo $gv_float_external_ip`
+
+dcsEcho "gv_float_external_ip :" $gv_float_external_ip
+dcsEcho "gv_float_internal_ip :" $gv_float_internal_ip
+
+#Check if AWS_CLOUD environment variable defined
+if [[ -z $AWS_CLOUD ]]; then
+    Check_VirtualIP_InUse_Unbind
+    BindFloatIp
+else
+    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"
+
+    # Get instance Id of the instance
+    INSTANCEID=`aws ec2 describe-instances |grep -i instances |grep -i $gv_myhostname |cut -f8`
+    dcsEcho "Using Instance id $INSTANCEID"
+
+    # Get the network interface configured for the vpc
+    NETWORKINTERFACE=`aws ec2 describe-network-interfaces| grep -i networkinterfaces| grep -i $gv_float_internal_ip|cut -f5`
+    dcsEcho "Using network interface $NETWORKINTERFACE"
+
+    # Get the attachment id for the network interface
+    ATTACH_ID=`aws ec2 describe-network-interfaces --network-interface-ids $NETWORKINTERFACE |grep -i attachment |cut -f3`
+    if [ ! -z "$ATTACH_ID" ]; then
+        dcsEcho "Detaching attachment Id:" $ATTACH_ID
+        aws ec2 detach-network-interface --attachment-id $ATTACH_ID
+    fi
+
+    dcsEcho "Going to attach network interface $NETWORKINTERFACE to the another instance"
+    sleep 10
+    NEWATTACH_ID=`aws ec2 attach-network-interface --network-interface-id $NETWORKINTERFACE --instance-id $INSTANCEID --device-index $device_index_to_use`
+    dcsEcho "New attachment Id " $NEWATTACH_ID
+    sleep 10
+    configure_route_tables
+fi
 
 exit $gv_ok

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1f0d872b/dcs/bin/scripts/dcsunbind.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/dcsunbind.sh b/dcs/bin/scripts/dcsunbind.sh
new file mode 100755
index 0000000..0794c1b
--- /dev/null
+++ b/dcs/bin/scripts/dcsunbind.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+#
+# @@@ START COPYRIGHT @@@
+#
+#Licensed to the Apache Software Foundation (ASF) under one
+#or more contributor license agreements.  See the NOTICE file
+#distributed with this work for additional information
+#regarding copyright ownership.  The ASF licenses this file
+#to you under the Apache License, Version 2.0 (the
+#"License"); you may not use this file except in compliance
+#with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing,
+#software distributed under the License is distributed on an
+#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#KIND, either express or implied.  See the License for the
+#specific language governing permissions and limitations
+#under the License.
+#
+# @@@ END COPYRIGHT @@@
+#
+#
+
+function check_node {
+    for myinterface in `$SQ_PDSH -N -w $1 /sbin/ip link show|awk -F': ' '/^[0-9]+:.*/ {print $2;}'`; do
+	ip_output=$($SQ_PDSH -N -w $1 /sbin/ip addr show $myinterface)
+	if [ $gv_externalip_set -eq 1 -a $external_only -eq 1 ]; then
+            myifport=`echo "$ip_output" | grep $gv_float_external_ip`
+	    status=$?
+	    if [ $status -eq 0 ]; then
+	       tempinterface=`echo $gv_float_external_interface:$gv_port`
+	       # check if another interface is bound to this virtual ip address
+	       echo "$myifport" | grep "$tempinterface"  > /dev/null
+	       if [ $? -eq 1 -o "$1" != "$gv_myhostname" ]; then
+                   unbindip = `echo "$myifport" | awk '{print $2}' `
+		   unbindlb=`echo "$myifport"|awk '{print $NF}'`
+		   echo "External ip $gv_float_external_ip is already in use on node $1 bound to interface $myinterface($unbindlb) - unbind..."
+		   $SQ_PDSH -S -w $1 sudo /sbin/ip addr del $unbindip dev $myinterface label $unbindlb
+                   status=$?
+		   if [ $status -ne 0 ]; then
+		      echo "Failed to unbind - status is $status"
+		      exit -1 
+                   else
+                      echo "Unbind successful"
+                   fi
+	       else
+	           echo "External ip $gv_float_external_ip is already bound to $myinterface on node $1 - skip unbind"
+	       fi # endif node+name match
+	    fi # endif looking for external ip
+        fi #endif checking external ip is set or not
+    done
+}
+
+function Check_VirtualIP_InUse_And_Unbind {
+    echo "check all nodes to see if external virtual ip address is in use and unbind if necessary"
+    mynode=""
+    externalNodes=`$SQ_PDSH $MY_NODES /sbin/ip addr show | grep $gv_float_external_ip | awk -F' ' '/^.+:[[:space:]]+.*/ {print $1;}' | cut -d':' -f1 | sed '/^$/d'`
+    if [ ! -z "$externalNodes" ]; then
+	external_only=1
+	internal_only=0
+	for mynode in $externalNodes; do
+	   check_node $mynode
+	done
+    fi
+}
+
+#Main program
+
+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 $HOME/ah/parse_dcs_site.py|cut -d$'\n' -f1`
+gv_port=0
+gv_externalip_set=1
+gv_internalip_set=1
+
+if [[ ! -z $AWS_CLOUD ]]; then
+   #Get the network interface
+   NETWORKINTERFACE=`aws ec2 describe-network-interfaces| grep -i networkinterfaces| grep -i $gv_float_internal_ip|cut -f5`
+
+   # Get the attachment id for the network interface
+   ATTACH_ID=`aws ec2 describe-network-interfaces --network-interface-ids $NETWORKINTERFACE |grep -i attachment |cut -f3`
+
+   echo "Detaching attachment Id:" $ATTACH_ID
+   if [ ! -z "$ATTACH_ID" ]; then
+      aws ec2 detach-network-interface --attachment-id $ATTACH_ID
+      echo "Detached interface :" $NETWORKINTERFACE
+   fi
+else
+   Check_VirtualIP_InUse_And_Unbind
+fi
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1f0d872b/dcs/bin/scripts/parse_dcs_site.py
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/parse_dcs_site.py b/dcs/bin/scripts/parse_dcs_site.py
new file mode 100755
index 0000000..afe3d91
--- /dev/null
+++ b/dcs/bin/scripts/parse_dcs_site.py
@@ -0,0 +1,39 @@
+#
+# @@@ START COPYRIGHT @@@
+#
+#Licensed to the Apache Software Foundation (ASF) under one
+#or more contributor license agreements.  See the NOTICE file
+#distributed with this work for additional information
+#regarding copyright ownership.  The ASF licenses this file
+#to you under the Apache License, Version 2.0 (the
+#"License"); you may not use this file except in compliance
+#with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing,
+#software distributed under the License is distributed on an
+#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#KIND, either express or implied.  See the License for the
+#specific language governing permissions and limitations
+#under the License.
+#
+# @@@ END COPYRIGHT @@@
+#
+#
+import os
+from xml.dom import minidom
+
+name = os.environ.get('DCS_INSTALL_DIR')
+doc = minidom.parse(name+"/conf/dcs-site.xml")
+props = doc.getElementsByTagName("property")
+for prop in props:
+        pname = prop.getElementsByTagName("name")[0]
+        if (pname.firstChild.data == "dcs.master.floating.ip.external.ip.address"):
+           pvalue = prop.getElementsByTagName("value")[0]
+           float_ipaddress=pvalue.firstChild.data
+           print("%s" % (float_ipaddress))
+        if (pname.firstChild.data == "dcs.master.floating.ip.external.interface"):
+           pvalue = prop.getElementsByTagName("value")[0]
+           float_interface=pvalue.firstChild.data
+           print("%s" % (float_interface))

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1f0d872b/install/installer/setup_ssh_key
----------------------------------------------------------------------
diff --git a/install/installer/setup_ssh_key b/install/installer/setup_ssh_key
new file mode 100755
index 0000000..cd8d443
--- /dev/null
+++ b/install/installer/setup_ssh_key
@@ -0,0 +1,27 @@
+#!/bin/bash
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+echo -e 'y\n' | ssh-keygen -t rsa -N "" -f $HOME/.ssh/id_rsa
+cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
+echo localhost $(cat /etc/ssh/ssh_host_rsa_key.pub) >> $HOME/.ssh/known_hosts
+echo "NoHostAuthenticationForLocalhost=yes" >> $HOME/.ssh/config
+chmod 600 $HOME/.ssh/config


[06/13] incubator-trafodion git commit: Merge branch 'master' into wrk-brnch

Posted by db...@apache.org.
Merge branch 'master' into wrk-brnch


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/34ff7b30
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/34ff7b30
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/34ff7b30

Branch: refs/heads/master
Commit: 34ff7b309b58e76f3461c0519940f2e3463d8d13
Parents: c14887c dd1b373
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Tue Dec 15 18:52:32 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Tue Dec 15 18:52:32 2015 +0000

----------------------------------------------------------------------
 install/installer/dcs_installer              | 50 +++++++++++++
 install/installer/traf_add_sudoAccess        | 54 ++++++++++++++
 install/installer/traf_add_user              | 23 ++++--
 install/installer/traf_config_setup          | 87 ++++++++++++++++++++++-
 install/installer/traf_createPasswordLessSSH | 63 ++++++++++++++++
 install/installer/traf_package_setup         | 60 ++++++----------
 install/installer/trafodion_config_default   | 11 +++
 7 files changed, 301 insertions(+), 47 deletions(-)
----------------------------------------------------------------------



[13/13] incubator-trafodion git commit: Merge [TRAFODION-1680] PR 231 DCS HA support on AWS

Posted by db...@apache.org.
Merge [TRAFODION-1680] PR 231 DCS HA support 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/5746be35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/5746be35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/5746be35

Branch: refs/heads/master
Commit: 5746be35acc3872b46e0e0c01472361734c2a907
Parents: 1f9b52a 2f4d743
Author: Dave Birdsall <db...@apache.org>
Authored: Tue Dec 22 16:27:33 2015 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Tue Dec 22 16:27:33 2015 +0000

----------------------------------------------------------------------
 .rat-excludes                     |   1 +
 RAT_README.txt                    |   1 +
 core/sqf/sql/scripts/cleanlogs    |  92 +++++++++++++++++++++++
 core/sqf/sql/scripts/dcscheck     |  67 +++++++++++++++--
 core/sqf/sql/scripts/dcsstop      |   4 +
 core/sqf/sql/scripts/sqcheck      |  52 ++++++++++++-
 dcs/bin/dcs-config.sh             |  10 +++
 dcs/bin/scripts/dcsbind.sh        | 133 ++++++++++++++++++++++++++++++++-
 dcs/bin/scripts/dcsunbind.sh      |  95 +++++++++++++++++++++++
 dcs/bin/scripts/parse_dcs_site.py |  46 ++++++++++++
 dcs/bin/start-dcs.sh              |  11 ++-
 dcs/conf/dcs-env.sh               |   8 +-
 dcs/conf/master                   |   0
 install/installer/setup_ssh_key   |  27 +++++++
 14 files changed, 532 insertions(+), 15 deletions(-)
----------------------------------------------------------------------



[02/13] incubator-trafodion git commit: Merge branch 'master' into wrk-brnch

Posted by db...@apache.org.
Merge branch 'master' into wrk-brnch


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/f9ef790d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/f9ef790d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/f9ef790d

Branch: refs/heads/master
Commit: f9ef790dc6cc35fc2aece7771feb92321f4f6fdb
Parents: 1f0d872 52afc68
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Mon Dec 14 03:36:23 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Mon Dec 14 03:36:23 2015 +0000

----------------------------------------------------------------------
 .gitattributes                                  |   14 +
 .rat-excludes                                   |  116 +-
 LICENSE.txt                                     |  178 +-
 NOTICE.txt                                      |    1 +
 RAT_README.txt                                  |  102 +-
 README.txt                                      |   33 +-
 core/Makefile                                   |    4 +-
 .../trafodion/jdbc/t4/T4DatabaseMetaData.java   |    3 -
 core/conn/security_dll/LICENSE                  |  127 -
 .../odbc/odbcclient/unixcli/package/mklnxpkg.sh |    2 -
 .../unixcli/package/trafodbclnx_install.sh      |    2 +-
 core/sqf/build-scripts/genverhdr.ksh            |    3 +-
 core/sqf/conf/log4j.dtm.config                  |   22 -
 core/sqf/conf/log4j.hdfs.config                 |   22 -
 core/sqf/conf/trafodion.udr.config              |   22 -
 core/sqf/export/lib/Vili/Functions.pm           |  725 ---
 core/sqf/export/lib/Vili/Helper.pm              |  674 --
 core/sqf/export/lib/Vili/NoDriftTimer.pm        |   98 -
 core/sqf/sqenvcom.sh                            |    2 +-
 core/sqf/sql/scripts/install_local_drill        |  114 +
 core/sqf/sql/scripts/install_local_hadoop       |   41 +-
 core/sqf/sql/scripts/sqnodes.pm                 |   74 +-
 core/sqf/sqvers                                 |   29 +-
 core/sqf/src/seatrans/hbase-trx/pom.xml.apache  |    4 +
 .../client/transactional/BatchException.java    |   21 -
 .../CommitUnsuccessfulException.java            |   19 -
 .../HBaseBackedTransactionLogger.java           |   10 -
 .../client/transactional/JtaXAResource.java     |   10 -
 .../transactional/LocalTransactionLogger.java   |   19 -
 .../transactional/MemoryUsageException.java     |   20 -
 .../OutOfOrderProtocolException.java            |   20 -
 .../hbase/client/transactional/RMInterface.java |   20 -
 .../transactional/SsccTransactionalScanner.java |   20 -
 .../transactional/SsccTransactionalTable.java   |   20 -
 .../SsccUpdateConflictException.java            |   20 -
 .../hbase/client/transactional/TmDDL.java       |   20 -
 .../client/transactional/TransReturnCode.java   |   20 -
 .../hbase/client/transactional/TransState.java  |   20 -
 .../client/transactional/TransactionLogger.java |   19 -
 .../transactional/TransactionManager.java       |  333 +-
 .../client/transactional/TransactionMap.java    |   22 +-
 .../TransactionRegionLocation.java              |   20 -
 .../client/transactional/TransactionState.java  |   20 -
 .../TransactionalAggregationClient.java         |   19 -
 .../transactional/TransactionalScanner.java     |   20 -
 .../transactional/TransactionalTable.java       |   20 -
 .../transactional/TransactionalTableClient.java |   20 -
 .../UnknownTransactionException.java            |   19 -
 .../transactional/UnsuccessfulDDLException.java |   20 -
 .../transactional/SsccRegionEndpoint.java       |   21 -
 .../transactional/SsccTableClient.java          |   21 -
 .../transactional/SsccTableClientUtils.java     |   18 -
 .../transactional/TrxRegionEndpoint.java        |  386 +-
 .../transactional/TrxRegionObserver.java        |   22 -
 .../transactional/TrxTableClient.java           |   18 -
 .../transactional/TrxTableClient2.java          |   18 -
 .../transactional/TrxTableClient3.java          |   18 -
 .../transactional/TrxTableClient4.java          |   18 -
 .../generated/SsccRegionProtos.java             |  131 +-
 .../generated/TrxRegionProtos.java              | 1020 ++-
 .../CleanOldTransactionsChore.java              |   10 -
 .../hbase/regionserver/transactional/IdTm.java  |   10 -
 .../regionserver/transactional/IdTmCb.java      |   10 -
 .../transactional/IdTmException.java            |   10 -
 .../transactional/KeyValueListScanner.java      |   11 -
 .../transactional/MemoryUsageChore.java         |   10 -
 .../transactional/SsccTransactionState.java     |   21 -
 .../transactional/TransactionState.java         |   21 -
 .../transactional/TransactionalRegion.java      |   10 -
 .../TransactionalRegionScannerHolder.java       |   10 -
 .../transactional/TrxTransactionState.java      |  177 +-
 .../hbase-trx/src/main/protobuf/TrxRegion.proto |   11 +-
 core/sqf/tools/sqtools.sh                       |    4 +-
 core/sql/arkcmp/CmpContext.cpp                  |   18 +-
 core/sql/bin/SqlciErrors.txt                    |    3 +-
 core/sql/comexe/ComTdb.h                        |    2 +-
 core/sql/comexe/ComTdbExeUtil.cpp               |   27 +
 core/sql/comexe/ComTdbExeUtil.h                 |  119 +
 core/sql/common/ExprNode.cpp                    |    1 +
 core/sql/common/OperTypeEnum.h                  |   24 +-
 core/sql/common/from_GB2312.c                   |  134 +-
 core/sql/common/swscanf.cpp                     |   55 +-
 core/sql/common/swsprintf.cpp                   |   63 +-
 core/sql/executor/ExComTdb.cpp                  |    7 +
 core/sql/executor/ExExeUtil.h                   |  167 +
 core/sql/executor/ExExeUtilCommon.cpp           |    7 +-
 core/sql/executor/ExExeUtilGet.cpp              |  826 ++-
 core/sql/executor/ExHdfsScan.cpp                |    4 +-
 core/sql/executor/ExStats.cpp                   |   16 +-
 core/sql/executor/ExStats.h                     |    4 +-
 core/sql/executor/HBaseClient_JNI.cpp           |  118 +-
 core/sql/executor/HBaseClient_JNI.h             |    2 +
 core/sql/executor/ex_split_bottom.cpp           |   11 +
 core/sql/exp/ExpHbaseInterface.cpp              |   16 +
 core/sql/exp/ExpHbaseInterface.h                |    3 +
 core/sql/generator/GenRelExeUtil.cpp            |  119 +
 core/sql/optimizer/BindRelExpr.cpp              |    5 +
 core/sql/optimizer/GroupAttr.cpp                |  179 +
 core/sql/optimizer/GroupAttr.h                  |    4 +
 core/sql/optimizer/ImplRule.cpp                 |   16 +-
 core/sql/optimizer/ItemConstr.h                 |   39 +
 core/sql/optimizer/ItemExpr.cpp                 |   36 +-
 core/sql/optimizer/ItemExpr.h                   |    4 +-
 core/sql/optimizer/OptPhysRelExpr.cpp           |    3 +-
 core/sql/optimizer/PhyProp.cpp                  |    2 +-
 core/sql/optimizer/RelExeUtil.cpp               |  128 +-
 core/sql/optimizer/RelExeUtil.h                 |   60 +
 core/sql/optimizer/RelRoutine.cpp               |   55 +-
 core/sql/optimizer/ScanOptimizer.cpp            |    5 +-
 core/sql/optimizer/UdfDllInteraction.cpp        |   10 +-
 core/sql/optimizer/ValueDesc.cpp                |  194 +-
 core/sql/optimizer/ValueDesc.h                  |   14 +-
 core/sql/parser/ParKeyWords.cpp                 |    4 +-
 core/sql/parser/sqlparser.y                     |  112 +-
 core/sql/parser/ulexer.h                        |   39 +-
 core/sql/pom.xml                                |    5 +
 core/sql/regress/catman1/EXPECTED135            |    2 +
 core/sql/regress/compGeneral/EXPECTED071        |   47 +
 core/sql/regress/compGeneral/TEST062            |    1 +
 core/sql/regress/compGeneral/TEST071            |   22 +
 core/sql/regress/executor/EXPECTED130           |   28 +-
 core/sql/regress/executor/TEST016               |    5 +
 core/sql/regress/executor/TEST130               |    7 +-
 core/sql/regress/hive/EXPECTED005               |    3 +
 core/sql/regress/hive/EXPECTED006               |    3 +
 core/sql/regress/hive/EXPECTED020               |    5 +-
 core/sql/regress/hive/TEST005                   |    1 +
 core/sql/regress/hive/TEST006                   |    1 +
 core/sql/regress/hive/TEST018                   |    1 +
 core/sql/regress/hive/TEST020                   |    1 +
 core/sql/regress/newregr/card/runregr_card.ksh  |    7 -
 .../regress/newregr/mvs/BIG/expectedmv215_RU    |  480 --
 core/sql/regress/newregr/mvs/EXPECTEDMV500      | 4708 --------------
 core/sql/regress/newregr/mvs/EXPECTEDMV500A     | 5179 ----------------
 .../regress/newregr/mvs/EXPECTEDMV500A.LINUX    | 5789 ------------------
 .../sql/regress/newregr/mvs/TPCD/DBGEN_HELP.TXT |   83 -
 core/sql/regress/seabase/EXPECTED002            |  677 ++
 core/sql/regress/seabase/EXPECTED010            |   84 +
 core/sql/regress/seabase/EXPECTED021            |   26 +-
 core/sql/regress/seabase/FILTER002              |   31 +
 core/sql/regress/seabase/TEST002                |  144 +
 core/sql/regress/seabase/TEST010                |    4 +
 core/sql/regress/seabase/TEST014                |    1 +
 core/sql/regress/tools/regress-filter           |    5 -
 core/sql/regress/tools/regress-filter-linux     |    5 -
 core/sql/regress/tools/runregr_udr.ksh          |    7 +
 core/sql/regress/udr/EXPECTED002                |   48 +-
 core/sql/regress/udr/EXPECTED100.SB             |    4 +-
 core/sql/regress/udr/TEST002                    |   18 +
 core/sql/sqlci/SqlCmd.cpp                       |    1 +
 core/sql/sqlcomp/CmpDescribe.cpp                |  170 +-
 core/sql/sqlcomp/CmpSeabaseDDLauth.cpp          |   15 +
 core/sql/sqlcomp/CmpSeabaseDDLauth.h            |    2 +-
 core/sql/sqlcomp/PrivMgrRoles.cpp               |   11 +-
 core/sql/sqlcomp/nadefaults.cpp                 |    2 +-
 core/sql/sqludr/doxygen_tmudr.1.6.config        |    4 +-
 core/sql/sqludr/sqludr.cpp                      |    2 +-
 core/sql/sqludr/sqludr.h                        |   16 +-
 .../java/org/trafodion/sql/HBaseClient.java     |   57 +-
 .../java/org/trafodion/sql/TrafRegionStats.java |  144 +
 .../trafodion/sql/udr/UDRInvocationInfo.java    |   17 +-
 .../org/trafodion/sql/udr/predef/JDBCUDR.java   |  690 +++
 core/updateCopyrightCheck.py                    |    7 +-
 dcs/LICENSE.txt                                 |  202 -
 dcs/NOTICE.txt                                  |    7 -
 .../dcs/master/listener/ConnectReply.java       |   75 +-
 .../org/trafodion/dcs/servermt/ServerUtils.java |   20 +-
 .../servermt/serverHandler/ServerHandler.java   |    2 +
 .../org/trafodion/dcs/util/ByteBufferUtils.java |    2 -
 .../java/org/trafodion/dcs/util/SqlUtils.java   |    2 -
 .../org/trafodion/dcs/version/util/VerGen.java  |   19 -
 .../dcs-webapps/master/css/stylesheet.css       |  191 -
 dcs/src/test/pytests/.tox.ini.tmpl              |   21 -
 docs/.gitignore                                 |    1 +
 .../Trafodion_Client_Installation_Guide.xml     |    6 +-
 docs/client_install/source/xml-profile.xml      |    2 +-
 .../Trafodion_Command_Interface_Guide.xml       |   44 +-
 docs/command_interface/source/xml-profile.xml   |    2 +-
 docs/odb_manual/Trafodion_odb_User_Guide.xml    |    4 +-
 .../source/Trafodion_SQL_Reference_Manual.xml   |   10 +-
 docs/sql_reference/source/xml-profile.xml       |    2 +-
 docs/src/site/markdown/advocate.md              |   15 +
 docs/src/site/markdown/architecture-overview.md |    3 +
 docs/src/site/markdown/build-tools-manual.md    |  197 +
 docs/src/site/markdown/build.md                 |   80 +
 docs/src/site/markdown/code-organization.md     |   47 +-
 docs/src/site/markdown/code.md                  |   32 +
 docs/src/site/markdown/contribute.md            |   59 +-
 .../markdown/cplusplus-coding-guidelines.md     |  310 +
 .../src/site/markdown/create-dev-environment.md |  153 +
 docs/src/site/markdown/develop.md               |  245 +
 docs/src/site/markdown/document.md              |  124 +
 docs/src/site/markdown/documentation.md         |   25 +
 docs/src/site/markdown/download.md              |   36 +
 .../site/markdown/enable-secure-trafodion.md    |  224 +
 docs/src/site/markdown/faq.md                   |  220 +
 docs/src/site/markdown/index.md                 |   34 +-
 docs/src/site/markdown/install-preparation.md   |  138 +
 docs/src/site/markdown/install-troubleshoot.md  |   21 +
 docs/src/site/markdown/install.md               |  201 +
 docs/src/site/markdown/ldapcheck.md             |   41 +
 docs/src/site/markdown/ldapconfigcheck.md       |   48 +
 .../src/site/markdown/manage-dev-environment.md |   51 +
 docs/src/site/markdown/management.md            |   62 +
 docs/src/site/markdown/merge.md                 |  140 +
 docs/src/site/markdown/new-features.md          |   15 +
 docs/src/site/markdown/passwordless-ssh.md      |  131 +
 docs/src/site/markdown/performance.md           |   15 +
 docs/src/site/markdown/port-assignment.md       |  134 +
 docs/src/site/markdown/presentations.md         |   18 +
 docs/src/site/markdown/quickstart.md            |   15 +
 docs/src/site/markdown/release-notes-0-8-0.md   |  165 +
 docs/src/site/markdown/release-notes-0-9-0.md   |  210 +
 docs/src/site/markdown/release-notes-1-0-0.md   |  256 +
 docs/src/site/markdown/release-notes-1-0-1.md   |  250 +
 docs/src/site/markdown/release-notes-1-1-0.md   |  181 +
 docs/src/site/markdown/release-notes-1-3-0.md   |   15 +-
 docs/src/site/markdown/release-notes.md         |   23 +-
 docs/src/site/markdown/release.md               |  225 +
 docs/src/site/markdown/roadmap.md               |   15 +
 .../site/markdown/setup-build-environment.md    |  160 +
 docs/src/site/markdown/testing.md               |  179 +
 docs/src/site/markdown/tests.md                 |   71 +
 .../site/markdown/traf_authentication_config.md |   96 +
 docs/src/site/markdown/website.md               |   53 +-
 docs/src/site/markdown/wiki.md                  |   23 +
 docs/src/site/resources/css/site.css            |   21 +-
 .../resources/images/carousel/processes.png     |  Bin 492019 -> 129503 bytes
 .../resources/images/carousel/revolution.png    |  Bin 185424 -> 66062 bytes
 .../site/resources/images/carousel/scale.png    |  Bin 236303 -> 93783 bytes
 .../site/resources/images/carousel/stack.png    |  Bin 408722 -> 102472 bytes
 .../site/resources/images/carousel/timeline.png |  Bin 322888 -> 115681 bytes
 .../site/resources/images/multi-layer-esps.png  |  Bin 0 -> 116303 bytes
 docs/src/site/site.xml                          |  193 +-
 install/.gitignore                              |    1 +
 install/Makefile                                |    2 -
 install/README.rst                              |   32 -
 install/installer/traf_config_check             |   14 +
 install/installer/traf_getHadoopNodes           |    4 +-
 licenses/LICENSE-bsd2                           |   14 +
 licenses/LICENSE-bsd4                           |   31 +
 licenses/LICENSE-facebook                       |   14 +
 licenses/LICENSE-js                             |   18 +
 licenses/LICENSE-salesforce                     |   23 +
 .../phoenix/end2end/AlterTableTest.java         |   21 -
 .../phoenix/end2end/ArithmeticQueryTest.java    |   21 -
 .../phoenix/end2end/AutoCommitTest.java         |   21 -
 .../org/trafodion/phoenix/end2end/BaseTest.java |   21 -
 .../trafodion/phoenix/end2end/BatchTest.java    |  130 +-
 .../phoenix/end2end/BinaryRowKeyTest.java       |   21 -
 .../phoenix/end2end/CoalesceFunctionTest.java   |   21 -
 .../end2end/CompareDecimalToLongTest.java       |   21 -
 .../phoenix/end2end/CreateTableTest.java        |   21 -
 .../phoenix/end2end/CustomEntityDataTest.java   |   21 -
 .../phoenix/end2end/DeleteRangeTest.java        |   21 -
 .../end2end/DescColumnSortOrderTest.java        |   21 -
 .../phoenix/end2end/DistinctCountTest.java      |   21 -
 .../phoenix/end2end/ExecuteStatementsTest.java  |   21 -
 .../phoenix/end2end/ExtendedQueryExecTest.java  |   21 -
 .../phoenix/end2end/FunkyNamesTest.java         |   21 -
 .../phoenix/end2end/GroupByCaseTest.java        |   21 -
 .../trafodion/phoenix/end2end/IndexTest.java    |   21 -
 .../trafodion/phoenix/end2end/IsNullTest.java   |   21 -
 .../trafodion/phoenix/end2end/KeyOnlyTest.java  |   21 -
 .../phoenix/end2end/MultiCfQueryExecTest.java   |   21 -
 .../trafodion/phoenix/end2end/OrderByTest.java  |   21 -
 .../phoenix/end2end/ProductMetricsTest.java     |   21 -
 .../phoenix/end2end/QueryExecTest.java          |   21 -
 .../end2end/QueryExecWithoutSCNTest.java        |   21 -
 .../phoenix/end2end/QueryPlanTest.java          |   21 -
 .../phoenix/end2end/ReadIsolationLevelTest.java |   21 -
 .../phoenix/end2end/SaltedTableTest.java        |   21 -
 .../end2end/SaltedTableUpsertSelectTest.java    |   21 -
 .../end2end/SaltedTableVarLengthRowKeyTest.java |   21 -
 .../phoenix/end2end/ServerExceptionTest.java    |   21 -
 .../phoenix/end2end/SkipScanQueryTest.java      |   21 -
 .../phoenix/end2end/StatementHintsTest.java     |   21 -
 .../trafodion/phoenix/end2end/StddevTest.java   |   21 -
 .../phoenix/end2end/ToCharFunctionTest.java     |   21 -
 .../phoenix/end2end/ToNumberFunctionTest.java   |   21 -
 .../org/trafodion/phoenix/end2end/TopNTest.java |   21 -
 .../phoenix/end2end/UpsertBigValuesTest.java    |   21 -
 .../end2end/UpsertSelectAutoCommitTest.java     |   21 -
 .../phoenix/end2end/UpsertSelectTest.java       |   21 -
 .../phoenix/end2end/UpsertValuesTest.java       |   21 -
 .../phoenix/end2end/VariableLengthPKTest.java   |   21 -
 win-odbc64/Krypton/KryptonBuild.bat             |   29 +-
 win-odbc64/Krypton/assocsvc.idl                 |   28 +-
 win-odbc64/Krypton/ca.idl                       |   30 +-
 win-odbc64/Krypton/ceecfg.idl                   |   27 +-
 win-odbc64/Krypton/ceercv.idl                   |   29 +-
 win-odbc64/Krypton/clientcfg.idl                |   32 +-
 win-odbc64/Krypton/generated_incs/cee.h         |   28 +-
 win-odbc64/Krypton/generated_incs/ceecfg.h      |   27 +-
 win-odbc64/Krypton/generated_incs/ceercv.h      |   27 +-
 win-odbc64/Krypton/generated_incs/glu.h         |   27 +-
 win-odbc64/Krypton/generated_incs/glu_rs.h      |   27 +-
 win-odbc64/Krypton/generated_incs/glu_stdexc.h  |   27 +-
 win-odbc64/Krypton/generated_incs/idltype.h     |   27 +-
 win-odbc64/Krypton/generated_incs/odbc.h        |   27 +-
 win-odbc64/Krypton/generated_incs/odbcCommon.h  |   27 +-
 win-odbc64/Krypton/generated_incs/odbc_cl.h     |   27 +-
 win-odbc64/Krypton/generated_incs/odbc_sv.h     |   27 +-
 win-odbc64/Krypton/generated_incs/odbcas_cl.h   |   27 +-
 win-odbc64/Krypton/generated_incs/odbcas_sv.h   |   27 +-
 win-odbc64/Krypton/generated_incs/odbccfg.h     |   27 +-
 win-odbc64/Krypton/generated_incs/odbccfg_cl.h  |   27 +-
 win-odbc64/Krypton/generated_incs/odbccfg_sv.h  |   27 +-
 .../Krypton/generated_incs/odbcsrvrcommon.h     |   27 +-
 .../Krypton/generated_incs/tdm_odbcSrvrMsg.h    |   28 +-
 win-odbc64/Krypton/idlcnp.bat                   |   27 +-
 win-odbc64/Krypton/odbc.idl                     |   29 +-
 win-odbc64/Krypton/odbcCommon.idl               |   29 +-
 win-odbc64/Krypton/odbcas.idl                   |   29 +-
 win-odbc64/Krypton/odbccfg.idl                  |   30 +-
 win-odbc64/Krypton/odbcsrvrcommon.idl           |   29 +-
 win-odbc64/Krypton/omxSec.idl                   |   30 +-
 .../odbcclient/DSNConverter/DSNConverter.def    |    2 +-
 .../TranslationDll/TranslationDll.def           |    2 +-
 win-odbc64/odbcclient/update_version.pl         |  100 +
 wms/LICENSE.txt                                 |  202 -
 wms/NOTICE.txt                                  |   11 -
 wms/build.xml                                   |    2 +-
 323 files changed, 12130 insertions(+), 22215 deletions(-)
----------------------------------------------------------------------



[04/13] incubator-trafodion git commit: Additional changes for floating ip. Support to start dcsmaster on remote node

Posted by db...@apache.org.
Additional changes for floating ip.
Support to start dcsmaster on remote node


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/68157d51
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/68157d51
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/68157d51

Branch: refs/heads/master
Commit: 68157d51fd1dbbbff562b2564f664b7783372c12
Parents: fafc88f
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Tue Dec 15 18:32:23 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Tue Dec 15 18:32:23 2015 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/cleanlogs    | 22 +++++++++---------
 core/sqf/sql/scripts/dcscheck     | 41 ++++++++++++++++++++++++----------
 dcs/bin/dcs-config.sh             | 10 +++++++++
 dcs/bin/scripts/dcsbind.sh        | 10 ++++-----
 dcs/bin/scripts/dcsunbind.sh      |  4 ++--
 dcs/bin/scripts/parse_dcs_site.py |  7 ++++--
 dcs/bin/start-dcs.sh              | 11 ++++++++-
 dcs/conf/dcs-env.sh               |  8 ++++++-
 dcs/conf/master                   |  0
 9 files changed, 79 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/core/sqf/sql/scripts/cleanlogs
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/cleanlogs b/core/sqf/sql/scripts/cleanlogs
index 505adb4..c4d5123 100755
--- a/core/sqf/sql/scripts/cleanlogs
+++ b/core/sqf/sql/scripts/cleanlogs
@@ -39,23 +39,23 @@ function usage() {
 }
 
 function core_logs() {
-   $L_PDSH "rm -rf ${MY_SQROOT}/logs/*.err"
-   $L_PDSH "rm -rf ${MY_SQROOT}/logs/*.log"
-   $L_PDSH "rm -rf ${MY_SQROOT}/logs/*log.[0-9]*"
+   $L_PDSH rm -f ${MY_SQROOT}/logs/*.err
+   $L_PDSH rm -f ${MY_SQROOT}/logs/*.log
+   $L_PDSH rm -f ${MY_SQROOT}/logs/*log.[0-9]*
 }
 
 function dcs_logs() {
-   $L_PDSH "rm -rf ${DCS_INSTALL_DIR}/logs/*.log"
-   $L_PDSH "rm -rf ${DCS_INSTALL_DIR}/logs/*.log.[0-9]*"
-   $L_PDSH "rm -rf ${DCS_INSTALL_DIR}/logs/*.out"
-   $L_PDSH "rm -rf ${DCS_INSTALL_DIR}/logs/*.out.[0-9]*"
+   $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.log
+   $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.log.[0-9]*
+   $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.out
+   $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.out.[0-9]*
 }
 
 function rest_logs() {
-   $L_PDSH "rm -rf ${REST_INSTALL_DIR}/logs/*.log"
-   $L_PDSH "rm -rf ${REST_INSTALL_DIR}/logs/*.log.[0-9]*"
-   $L_PDSH "rm -rf ${REST_INSTALL_DIR}/logs/*.out"
-   $L_PDSH "rm -rf ${REST_INSTALL_DIR}/logs/*.out.[0-9]*"
+   $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.log
+   $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.log.[0-9]*
+   $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.out
+   $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.out.[0-9]*
 }
 
 function all_logs() {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/core/sqf/sql/scripts/dcscheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcscheck b/core/sqf/sql/scripts/dcscheck
index b227e35..fd7376f 100755
--- a/core/sqf/sql/scripts/dcscheck
+++ b/core/sqf/sql/scripts/dcscheck
@@ -33,6 +33,12 @@ actual_dcsserver_cnt=0
 down_dcsserver_cnt=0
 activeMaster=`hostname`
 
+if [ -e $SQ_PDSH ]; then
+   L_PDSH="$SQ_PDSH $MY_NODES "
+else
+   L_PDSH=
+fi
+
 tmp_ps=`mktemp -t`
 if [[ $? != 0 ]]; then
     echo "Error while getting a temporary file. Exiting."
@@ -52,6 +58,11 @@ if [[ $sq_stat == 0 ]]; then
 
  if [ -d $DCS_INSTALL_DIR ];then
 
+### Get the configured primary node for DcsMaster
+  if [ -s ${DCS_INSTALL_DIR}/conf/master ]; then
+     primary_dcsmaster=`cat ${DCS_INSTALL_DIR}/conf/master | /bin/egrep -v '^#|^$'`
+  fi
+
 ### Get the configured number of DcsMaster's
   if [ -s ${DCS_INSTALL_DIR}/conf/backup-masters ]; then
      let backup_dcsmaster_cnt=`/bin/egrep -cv '#|^$' ${DCS_INSTALL_DIR}/conf/backup-masters`
@@ -68,18 +79,18 @@ if [[ $sq_stat == 0 ]]; then
    fi
 
 ### Check if there are any DcsMaster and DcsServer's that are started 
-   if [ -e $SQ_PDSH ]; then
-     actual_dcsmaster_cnt=`$SQ_PDSH $MY_NODES $jpscmd |grep DcsMaster |wc -l` 
-     actual_dcsserver_cnt=`$SQ_PDSH $MY_NODES $jpscmd |grep DcsServer |wc -l` 
-   else
-     actual_dcsmaster_cnt=`$jpscmd |grep DcsMaster |wc -l`
-     actual_dcsserver_cnt=`$jpscmd |grep DcsServer |wc -l`
-   fi
+   actual_dcsmaster_cnt=`$L_PDSH $jpscmd |grep DcsMaster |wc -l` 
+   actual_dcsserver_cnt=`$L_PDSH $jpscmd |grep DcsServer |wc -l` 
 
 ### Get the node where the active master is running
-   if [[ -e $SQ_PDSH && ! -z $ENABLE_HA ]]; then
+   if [[ ! -z $CLUSTERNAME ]]; then
+     if [[ ! -z $ENABLE_HA ]]; then
+        echo " This cluster \"$CLUSTERNAME\" is configured for HA"
         gv_float_interface=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f1`
-        activeMaster=`$SQ_PDSH $MY_NODES /sbin/ip addr show |grep $gv_float_interface$ |cut -d':' -f1`
+        activeMaster=`$L_PDSH /sbin/ip addr show |grep $gv_float_interface$ |cut -d':' -f1`
+     else
+        activeMaster=`$L_PDSH $jpscmd |grep DcsMaster |cut -d":" -f1`
+     fi
    fi
 
    if ( [ "$cfg_dcsserver_cnt" '!=' "$actual_dcsserver_cnt" ] ); then
@@ -109,16 +120,22 @@ if [[ $sq_stat == 0 ]]; then
    echo "ls $dcsznode"|$DCS_INSTALL_DIR/bin/dcs zkcli > $dcstmp
    zkport=`cat $dcstmp | /usr/bin/head -n 1 | cut -d ":" -f2`
    if [ ! -z "$zkport" ]; then
-     echo "Zookeeper is listening on port $zkport"
+     echo "Zookeeper is listening on port \"$zkport\""
    else
      echo "Zookeeper is not started..."
      exit 1
    fi
    masterport=`cat $dcstmp | /usr/bin/tail -n 1 | cut -d ":" -f4`
    if [ ! -z "$masterport" ]; then
-     echo "DcsMaster is listening host \"$activeMaster\" using port \"$masterport\""
+     echo "DcsMaster is listening on port \"$masterport\""
+     if [[ ! -z $primary_dcsmaster ]]; then
+        echo "Primary DcsMaster configured to run on node \"$primary_dcsmaster\""
+     fi
+     if [[ ! -z $activeMaster ]]; then
+        echo "Active DcsMaster is on node \"$activeMaster\""
+     fi
      if [[ ! -z $list_of_backups ]]; then
-        echo "Backup Masters configured to run on nodes: " $list_of_backups
+        echo "Backup DcsMasters configured to run on nodes \"$list_of_backups\""
      fi
      echo
    fi

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/dcs/bin/dcs-config.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/dcs-config.sh b/dcs/bin/dcs-config.sh
index de1b860..023521a 100755
--- a/dcs/bin/dcs-config.sh
+++ b/dcs/bin/dcs-config.sh
@@ -94,6 +94,8 @@ done
 DCS_CONF_DIR="${DCS_CONF_DIR:-$DCS_HOME/conf}"
 # List of DCS servers.
 DCS_SERVERS="${DCS_SERVERS:-$DCS_CONF_DIR/servers}"
+# DCS primary master.
+DCS_PRIMARY_MASTER="${DCS_PRIMARY_MASTER:-$DCS_CONF_DIR/master}"
 # List of DCS secondary masters.
 DCS_BACKUP_MASTERS="${DCS_BACKUP_MASTERS:-$DCS_CONF_DIR/backup-masters}"
 
@@ -102,6 +104,14 @@ if [ -f "${DCS_CONF_DIR}/dcs-env.sh" ]; then
   . "${DCS_CONF_DIR}/dcs-env.sh"
 fi
 
+# Source in sqenv.sh.
+if [ -f "${MY_SQROOT}/sqenv.sh" ]; then
+  savedir=`pwd`
+  cd $MY_SQROOT
+  . sqenv.sh
+  cd $savedir
+fi
+
 # Newer versions of glibc use an arena memory allocator that causes virtual
 # memory usage to explode. Tune the variable down to prevent vmem explosion.
 export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-4}

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/dcs/bin/scripts/dcsbind.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/dcsbind.sh b/dcs/bin/scripts/dcsbind.sh
index d33decc..038acc9 100755
--- a/dcs/bin/scripts/dcsbind.sh
+++ b/dcs/bin/scripts/dcsbind.sh
@@ -274,26 +274,26 @@ function configure_route_tables {
     fi
 
 
-    dcsEcho "Deleting and Adding from rule for the internal ip to the rules table"
+    dcsEcho "Deleting and Adding FROM rule for the internal ip to the rules table"
     sudo /sbin/ip rule del from $gv_float_internal_ip/32 tab 2
     status=$?
     if [[ $status -ne 0 && $status -ne 2 ]]; then
-       dcsEcho "Failed to delete from rule in the rules table - status is $status"
+       dcsEcho "Failed to delete FROM rule in the rules table - status is $status"
        exit $gv_error
     fi
 
     sudo /sbin/ip rule add from $gv_float_internal_ip/32 tab 2
     status=$?
     if [[ $status -ne 0 && $status -ne 2 ]]; then
-dcsEcho "Failed to add the from rule to the rules table - status is $status"
+dcsEcho "Failed to add the FROM rule to the rules table - status is $status"
        exit $gv_error
     fi
 
-    dcsEcho "Deleting and Adding to rule for the internal ip to the rules table"
+    dcsEcho "Deleting and Adding TO rule for the internal ip to the rules table"
     sudo /sbin/ip rule del to $gv_float_internal_ip/32 tab 2
     status=$?
     if [[ $status -ne 0 && $status -ne 2 ]]; then
-       dcsEcho "Failed to delete the to rule in the rules table - status is $status"
+       dcsEcho "Failed to delete the TO rule in the rules table - status is $status"
        exit $gv_error
     fi
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/dcs/bin/scripts/dcsunbind.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/dcsunbind.sh b/dcs/bin/scripts/dcsunbind.sh
index 0794c1b..e881606 100755
--- a/dcs/bin/scripts/dcsunbind.sh
+++ b/dcs/bin/scripts/dcsunbind.sh
@@ -70,8 +70,8 @@ function Check_VirtualIP_InUse_And_Unbind {
 
 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 $HOME/ah/parse_dcs_site.py|cut -d$'\n' -f1`
-gv_port=0
+gv_float_interface=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f1`
+gv_port=23400
 gv_externalip_set=1
 gv_internalip_set=1
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/dcs/bin/scripts/parse_dcs_site.py
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/parse_dcs_site.py b/dcs/bin/scripts/parse_dcs_site.py
index afe3d91..0fc7949 100755
--- a/dcs/bin/scripts/parse_dcs_site.py
+++ b/dcs/bin/scripts/parse_dcs_site.py
@@ -24,8 +24,11 @@
 import os
 from xml.dom import minidom
 
-name = os.environ.get('DCS_INSTALL_DIR')
-doc = minidom.parse(name+"/conf/dcs-site.xml")
+dcsconfig_dir = os.environ.get('DCS_CONF_DIR')
+if (dcsconfig_dir == null)
+   name = os.environ.get('DCS_INSTALL_DIR')
+   dcsconfig_dir=name+"/conf"   
+doc = minidom.parse(dcsconfig_dir+"/dcs-site.xml")
 props = doc.getElementsByTagName("property")
 for prop in props:
         pname = prop.getElementsByTagName("name")[0]

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/dcs/bin/start-dcs.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/start-dcs.sh b/dcs/bin/start-dcs.sh
index 5337704..32a4724 100755
--- a/dcs/bin/start-dcs.sh
+++ b/dcs/bin/start-dcs.sh
@@ -46,7 +46,16 @@ then
   exit $errCode
 fi
 
-if [ "$master" == "" ] || [ "$master" == "$(hostname -f)" ] ; then
+if [ -z "$master" ] ; then
+  if [ ! -z "${DCS_PRIMARY_MASTER}" ] && [ -s ${DCS_PRIMARY_MASTER} ] ; then
+    master_node=`cat ${DCS_PRIMARY_MASTER}| egrep -v '^#|^$'`
+    if [ ! -z "$master_node" ] ; then
+      master=`echo $master_node | awk '{print $1}'`
+    fi
+  fi
+fi
+
+if [ "$master" == "" ] || [ "$master" == "localhost" ] || [ "$master" == "$(hostname -f)" ] ; then
   "$bin"/dcs-daemon.sh --config "${DCS_CONF_DIR}" start master 
 else
   remote_cmd="cd ${DCS_HOME}; $bin/dcs-daemon.sh --config ${DCS_CONF_DIR} start master"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/dcs/conf/dcs-env.sh
----------------------------------------------------------------------
diff --git a/dcs/conf/dcs-env.sh b/dcs/conf/dcs-env.sh
index 0851940..ed62636 100644
--- a/dcs/conf/dcs-env.sh
+++ b/dcs/conf/dcs-env.sh
@@ -76,7 +76,13 @@ export DCS_OPTS="-XX:+UseConcMarkSweepGC"
 # export DCS_REST_OPTS="$DCS_REST_OPTS $DCS_JMX_BASE -Dcom.sun.management.jmxremote.port=10103"
 # export DCS_ZOOKEEPER_OPTS="$DCS_ZOOKEEPER_OPTS $DCS_JMX_BASE -Dcom.sun.management.jmxremote.port=10104"
 
-# File naming hosts on which DCS Servers will run.  $DCS_HOME/conf/servers by default.
+# File naming host on which DCS Primary Master is configured to run. $DCS_HOME/conf/master by default.
+# export DCS_PRIMARY_MASTER=${DCS_HOME}/conf/master
+
+# File naming hosts on which DCS Backup Masters is configured to run. $DCS_HOME/conf/backup-masters by default.
+# export DCS_BACKUP_MASTERS=${DCS_HOME}/conf/backup-masters
+
+# File naming hosts on which DCS Servers will run. $DCS_HOME/conf/servers by default.
 # export DCS_SERVERS=${DCS_HOME}/conf/servers
 
 # Extra ssh options.  Empty by default.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68157d51/dcs/conf/master
----------------------------------------------------------------------
diff --git a/dcs/conf/master b/dcs/conf/master
new file mode 100644
index 0000000..e69de29


[11/13] incubator-trafodion git commit: Modified to include the master file

Posted by db...@apache.org.
Modified to include the master file


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/806435fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/806435fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/806435fb

Branch: refs/heads/master
Commit: 806435fb324112fca7ba4d031f2c517e00f6df15
Parents: 718880c
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Thu Dec 17 01:08:07 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Thu Dec 17 01:08:07 2015 +0000

----------------------------------------------------------------------
 .rat-excludes | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/806435fb/.rat-excludes
----------------------------------------------------------------------
diff --git a/.rat-excludes b/.rat-excludes
index f06796f..264a8f9 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -45,6 +45,7 @@ SqlciErrors.txt
 # DCS config files
 backup-masters
 servers
+master
 # jquery
 jquery-ui.css*
 jquery-ui.js*


[09/13] incubator-trafodion git commit: added the missing quotes

Posted by db...@apache.org.
added the missing quotes


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/25444792
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/25444792
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/25444792

Branch: refs/heads/master
Commit: 254447922f3df5aaa411ca7c5ffff0b6528265c5
Parents: cbcde79
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Wed Dec 16 23:49:02 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Wed Dec 16 23:49:02 2015 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/cleanlogs | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/25444792/core/sqf/sql/scripts/cleanlogs
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/cleanlogs b/core/sqf/sql/scripts/cleanlogs
index c903d68..83d9b3a 100755
--- a/core/sqf/sql/scripts/cleanlogs
+++ b/core/sqf/sql/scripts/cleanlogs
@@ -40,27 +40,27 @@ function usage() {
 
 function core_logs() {
  if [[ ! -z $L_PDSH ]]; then
-   $L_PDSH rm -f ${MY_SQROOT}/logs/*.err
-   $L_PDSH rm -f ${MY_SQROOT}/logs/*.log
-   $L_PDSH rm -f ${MY_SQROOT}/logs/*log.[0-9]*
+   $L_PDSH "rm -f ${MY_SQROOT}/logs/*.err"
+   $L_PDSH "rm -f ${MY_SQROOT}/logs/*.log"
+   $L_PDSH "rm -f ${MY_SQROOT}/logs/*log.[0-9]*"
  fi
 }
 
 function dcs_logs() {
  if [[ ! -z $L_PDSH ]]; then
-   $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.log
-   $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.log.[0-9]*
-   $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.out
-   $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.out.[0-9]*
+   $L_PDSH "rm -f ${DCS_INSTALL_DIR}/logs/*.log"
+   $L_PDSH "rm -f ${DCS_INSTALL_DIR}/logs/*.log.[0-9]*"
+   $L_PDSH "rm -f ${DCS_INSTALL_DIR}/logs/*.out"
+   $L_PDSH "rm -f ${DCS_INSTALL_DIR}/logs/*.out.[0-9]*"
  fi
 }
 
 function rest_logs() {
  if [[ ! -z $L_PDSH ]]; then
-   $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.log
-   $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.log.[0-9]*
-   $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.out
-   $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.out.[0-9]*
+   $L_PDSH "rm -f ${REST_INSTALL_DIR}/logs/*.log"
+   $L_PDSH "rm -f ${REST_INSTALL_DIR}/logs/*.log.[0-9]*"
+   $L_PDSH "rm -f ${REST_INSTALL_DIR}/logs/*.out"
+   $L_PDSH "rm -f ${REST_INSTALL_DIR}/logs/*.out.[0-9]*"
  fi
 }
 


[07/13] incubator-trafodion git commit: Improved display for dcscheck script additional bug fixes

Posted by db...@apache.org.
Improved display for dcscheck script
additional bug fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/bc691879
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/bc691879
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/bc691879

Branch: refs/heads/master
Commit: bc691879b0012888e12ee2be9d6eb948359e5f30
Parents: 34ff7b3
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Wed Dec 16 18:15:30 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Wed Dec 16 18:15:30 2015 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/dcscheck     | 51 ++++++++++++++++++++++++----------
 dcs/bin/scripts/dcsbind.sh        | 11 ++++----
 dcs/bin/scripts/dcsunbind.sh      | 18 ++++++------
 dcs/bin/scripts/parse_dcs_site.py |  6 +++-
 4 files changed, 58 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bc691879/core/sqf/sql/scripts/dcscheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcscheck b/core/sqf/sql/scripts/dcscheck
index fd7376f..15006d7 100755
--- a/core/sqf/sql/scripts/dcscheck
+++ b/core/sqf/sql/scripts/dcscheck
@@ -31,7 +31,7 @@ down_dcsmaster_cnt=0
 cfg_dcsserver_cnt=0
 actual_dcsserver_cnt=0
 down_dcsserver_cnt=0
-activeMaster=`hostname`
+activeMaster=localhost
 
 if [ -e $SQ_PDSH ]; then
    L_PDSH="$SQ_PDSH $MY_NODES "
@@ -67,7 +67,7 @@ if [[ $sq_stat == 0 ]]; then
   if [ -s ${DCS_INSTALL_DIR}/conf/backup-masters ]; then
      let backup_dcsmaster_cnt=`/bin/egrep -cv '#|^$' ${DCS_INSTALL_DIR}/conf/backup-masters`
      let cfg_dcsmaster_cnt=$backup_dcsmaster_cnt+1
-     list_of_backups=`cat ${DCS_INSTALL_DIR}/conf/backup-masters | /bin/egrep -v '^#|^$'`
+     list_of_backups=`cat ${DCS_INSTALL_DIR}/conf/backup-masters | /bin/egrep -v '^#|^$'|tr -d '\n'`
    else
      let cfg_dcsmaster_cnt=1
    fi
@@ -85,14 +85,35 @@ if [[ $sq_stat == 0 ]]; then
 ### Get the node where the active master is running
    if [[ ! -z $CLUSTERNAME ]]; then
      if [[ ! -z $ENABLE_HA ]]; then
-        echo " This cluster \"$CLUSTERNAME\" is configured for HA"
-        gv_float_interface=`python $DCS_INSTALL_DIR/bin/scripts/parse_dcs_site.py|cut -d$'\n' -f1`
-        activeMaster=`$L_PDSH /sbin/ip addr show |grep $gv_float_interface$ |cut -d':' -f1`
+        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`
+        if [[ -z $floatip_port ]]; then
+            floatip_port=23400
+        fi
+        if [[ -z $AWS_CLOUD ]]; then
+           interface_to_use=$floatip_interface":"$floatip_port
+        else
+           interface_to_use=$floatip_interface
+        fi
+        activeMaster=`$L_PDSH /sbin/ip addr show |grep $interface_to_use$ |cut -d '/' -f1 |awk '{print $3}'`
+        if [[ ! -z $activeMaster ]]; then
+           activeDcsPid=`$L_PDSH $jpscmd |grep DcsMaster |grep $activeMaster |cut -d" " -f2 |tr -d '\n'`
+        fi
      else
-        activeMaster=`$L_PDSH $jpscmd |grep DcsMaster |cut -d":" -f1`
+        activeMaster=`$L_PDSH $jpscmd |grep DcsMaster |cut -d":" -f1 |tr -d '\n'`
      fi
+
+     if ( [ -z $activeMaster ] && [ "$actual_dcsmaster_cnt" '>' 0 ] && [ "$actual_dcsserver_cnt" '>' 0 ] ); then
+        echo "Cluster Running      : Non-HA"
+     fi
+   else
+     ### Get the pid of the active DcsMaster 
+     activeDcsPid=`$L_PDSH $jpscmd |grep DcsMaster |cut -d" " -f1`
    fi
 
+
+### Get the count of DcsMaster & DcsServers that are stopped
    if ( [ "$cfg_dcsserver_cnt" '!=' "$actual_dcsserver_cnt" ] ); then
      let down_dcsserver_cnt=cfg_dcsserver_cnt-actual_dcsserver_cnt
    else
@@ -115,27 +136,29 @@ if [[ $sq_stat == 0 ]]; then
   else
     down_mxo_cnt=''
   fi 
-
+  echo
   if ( [ "$actual_dcsmaster_cnt" '!=' 0 ] && [ "$actual_dcsserver_cnt" '!=' 0 ] ); then
    echo "ls $dcsznode"|$DCS_INSTALL_DIR/bin/dcs zkcli > $dcstmp
    zkport=`cat $dcstmp | /usr/bin/head -n 1 | cut -d ":" -f2`
    if [ ! -z "$zkport" ]; then
-     echo "Zookeeper is listening on port \"$zkport\""
+     echo "Zookeeper listen port: $zkport"
    else
      echo "Zookeeper is not started..."
      exit 1
    fi
    masterport=`cat $dcstmp | /usr/bin/tail -n 1 | cut -d ":" -f4`
    if [ ! -z "$masterport" ]; then
-     echo "DcsMaster is listening on port \"$masterport\""
+     echo -e "DcsMaster listen port: $masterport\n"
      if [[ ! -z $primary_dcsmaster ]]; then
-        echo "Primary DcsMaster configured to run on node \"$primary_dcsmaster\""
-     fi
-     if [[ ! -z $activeMaster ]]; then
-        echo "Active DcsMaster is on node \"$activeMaster\""
+        echo "Configured Primary DcsMaster: \"$primary_dcsmaster\""
      fi
      if [[ ! -z $list_of_backups ]]; then
-        echo "Backup DcsMasters configured to run on nodes \"$list_of_backups\""
+        echo "Configured Backup DcsMasters: \"$list_of_backups\""
+     fi
+     if ( [ ! -z $activeMaster ] && [ ! -z $activeDcsPid ] ); then
+        echo "Active DcsMaster            : \"$activeMaster\", pid $activeDcsPid"
+     else
+        echo "Active DcsMaster            : \"$activeMaster\""
      fi
      echo
    fi

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bc691879/dcs/bin/scripts/dcsbind.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/dcsbind.sh b/dcs/bin/scripts/dcsbind.sh
index 038acc9..8436272 100755
--- a/dcs/bin/scripts/dcsbind.sh
+++ b/dcs/bin/scripts/dcsbind.sh
@@ -329,6 +329,7 @@ gv_float_external_interface=""
 gv_float_external_ip=""
 gv_float_internal_ip=""
 gv_port=0
+awscmd=/usr/local/bin/aws
 
 gv_ok=0
 gv_warn=1
@@ -361,23 +362,23 @@ else
     dcsEcho "Using device index $device_index_to_use for $gv_float_external_interface"
 
     # Get instance Id of the instance
-    INSTANCEID=`aws ec2 describe-instances |grep -i instances |grep -i $gv_myhostname |cut -f8`
+    INSTANCEID=`$awscmd ec2 describe-instances |grep -i instances |grep -i $gv_myhostname |cut -f8`
     dcsEcho "Using Instance id $INSTANCEID"
 
     # Get the network interface configured for the vpc
-    NETWORKINTERFACE=`aws ec2 describe-network-interfaces| grep -i networkinterfaces| grep -i $gv_float_internal_ip|cut -f5`
+    NETWORKINTERFACE=`$awscmd ec2 describe-network-interfaces| grep -i networkinterfaces| grep -i $gv_float_internal_ip|cut -f5`
     dcsEcho "Using network interface $NETWORKINTERFACE"
 
     # Get the attachment id for the network interface
-    ATTACH_ID=`aws ec2 describe-network-interfaces --network-interface-ids $NETWORKINTERFACE |grep -i attachment |cut -f3`
+    ATTACH_ID=`$awscmd ec2 describe-network-interfaces --network-interface-ids $NETWORKINTERFACE |grep -i attachment |cut -f3`
     if [ ! -z "$ATTACH_ID" ]; then
         dcsEcho "Detaching attachment Id:" $ATTACH_ID
-        aws ec2 detach-network-interface --attachment-id $ATTACH_ID
+        $awscmd ec2 detach-network-interface --attachment-id $ATTACH_ID
     fi
 
     dcsEcho "Going to attach network interface $NETWORKINTERFACE to the another instance"
     sleep 10
-    NEWATTACH_ID=`aws ec2 attach-network-interface --network-interface-id $NETWORKINTERFACE --instance-id $INSTANCEID --device-index $device_index_to_use`
+    NEWATTACH_ID=`$awscmd ec2 attach-network-interface --network-interface-id $NETWORKINTERFACE --instance-id $INSTANCEID --device-index $device_index_to_use`
     dcsEcho "New attachment Id " $NEWATTACH_ID
     sleep 10
     configure_route_tables

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bc691879/dcs/bin/scripts/dcsunbind.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/dcsunbind.sh b/dcs/bin/scripts/dcsunbind.sh
index e881606..65c661d 100755
--- a/dcs/bin/scripts/dcsunbind.sh
+++ b/dcs/bin/scripts/dcsunbind.sh
@@ -34,9 +34,9 @@ function check_node {
 	       # check if another interface is bound to this virtual ip address
 	       echo "$myifport" | grep "$tempinterface"  > /dev/null
 	       if [ $? -eq 1 -o "$1" != "$gv_myhostname" ]; then
-                   unbindip = `echo "$myifport" | awk '{print $2}' `
+                   unbindip=`echo "$myifport" | awk '{print $2}'`
 		   unbindlb=`echo "$myifport"|awk '{print $NF}'`
-		   echo "External ip $gv_float_external_ip is already in use on node $1 bound to interface $myinterface($unbindlb) - unbind..."
+		   echo "External ip $gv_float_external_ip is in use on node $1 bound to interface $myinterface($unbindlb) - unbind..."
 		   $SQ_PDSH -S -w $1 sudo /sbin/ip addr del $unbindip dev $myinterface label $unbindlb
                    status=$?
 		   if [ $status -ne 0 ]; then
@@ -45,8 +45,6 @@ function check_node {
                    else
                       echo "Unbind successful"
                    fi
-	       else
-	           echo "External ip $gv_float_external_ip is already bound to $myinterface on node $1 - skip unbind"
 	       fi # endif node+name match
 	    fi # endif looking for external ip
         fi #endif checking external ip is set or not
@@ -71,20 +69,24 @@ function Check_VirtualIP_InUse_And_Unbind {
 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`
-gv_port=23400
+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
    #Get the network interface
-   NETWORKINTERFACE=`aws ec2 describe-network-interfaces| grep -i networkinterfaces| grep -i $gv_float_internal_ip|cut -f5`
+   NETWORKINTERFACE=`$awscmd ec2 describe-network-interfaces| grep -i networkinterfaces| grep -i $gv_float_internal_ip|cut -f5`
 
    # Get the attachment id for the network interface
-   ATTACH_ID=`aws ec2 describe-network-interfaces --network-interface-ids $NETWORKINTERFACE |grep -i attachment |cut -f3`
+   ATTACH_ID=`$awscmd ec2 describe-network-interfaces --network-interface-ids $NETWORKINTERFACE |grep -i attachment |cut -f3`
 
    echo "Detaching attachment Id:" $ATTACH_ID
    if [ ! -z "$ATTACH_ID" ]; then
-      aws ec2 detach-network-interface --attachment-id $ATTACH_ID
+      $awscmd ec2 detach-network-interface --attachment-id $ATTACH_ID
       echo "Detached interface :" $NETWORKINTERFACE
    fi
 else

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bc691879/dcs/bin/scripts/parse_dcs_site.py
----------------------------------------------------------------------
diff --git a/dcs/bin/scripts/parse_dcs_site.py b/dcs/bin/scripts/parse_dcs_site.py
index 0fc7949..c5947a4 100755
--- a/dcs/bin/scripts/parse_dcs_site.py
+++ b/dcs/bin/scripts/parse_dcs_site.py
@@ -25,13 +25,17 @@ import os
 from xml.dom import minidom
 
 dcsconfig_dir = os.environ.get('DCS_CONF_DIR')
-if (dcsconfig_dir == null)
+if not dcsconfig_dir:
    name = os.environ.get('DCS_INSTALL_DIR')
    dcsconfig_dir=name+"/conf"   
 doc = minidom.parse(dcsconfig_dir+"/dcs-site.xml")
 props = doc.getElementsByTagName("property")
 for prop in props:
         pname = prop.getElementsByTagName("name")[0]
+        if (pname.firstChild.data == "dcs.master.port"):
+           pvalue = prop.getElementsByTagName("value")[0]
+           dcsPort=pvalue.firstChild.data
+           print("%s" % (dcsPort))
         if (pname.firstChild.data == "dcs.master.floating.ip.external.ip.address"):
            pvalue = prop.getElementsByTagName("value")[0]
            float_ipaddress=pvalue.firstChild.data


[12/13] incubator-trafodion git commit: Updated the RAT readme file

Posted by db...@apache.org.
Updated the RAT readme file


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/2f4d7431
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/2f4d7431
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/2f4d7431

Branch: refs/heads/master
Commit: 2f4d743179c1466033c6dc95eaf7f52180daa55f
Parents: 806435f
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Thu Dec 17 01:12:00 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Thu Dec 17 01:12:00 2015 +0000

----------------------------------------------------------------------
 RAT_README.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2f4d7431/RAT_README.txt
----------------------------------------------------------------------
diff --git a/RAT_README.txt b/RAT_README.txt
index 1f12792..961751f 100644
--- a/RAT_README.txt
+++ b/RAT_README.txt
@@ -60,6 +60,7 @@ $MY_SQROOT/../sql/bin/SqlciErrors.txt
 
 dcs/conf/servers 
 dcs/conf/backup-masters 
+dcs/conf/master
                  :  Apache Trafodion DCS default configuration file
                  -> configuration file do not handle comments
 


[03/13] incubator-trafodion git commit: Merge branch 'master' into wrk-brnch

Posted by db...@apache.org.
Merge branch 'master' into wrk-brnch


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/fafc88ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/fafc88ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/fafc88ff

Branch: refs/heads/master
Commit: fafc88ff812ffc23fd88217dc65d78d234e76198
Parents: f9ef790 7a21d39
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Tue Dec 15 02:02:26 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Tue Dec 15 02:02:26 2015 +0000

----------------------------------------------------------------------
 docs/src/site/markdown/install.md   |   2 +-
 docs/src/site/markdown/uninstall.md | 176 +++++++++++++++++++++++++++
 docs/src/site/site.xml              |   7 ++
 pom.xml                             | 202 ++-----------------------------
 4 files changed, 191 insertions(+), 196 deletions(-)
----------------------------------------------------------------------



[05/13] incubator-trafodion git commit: Merge branch 'master' into wrk-brnch

Posted by db...@apache.org.
Merge branch 'master' into wrk-brnch


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/c14887c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/c14887c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/c14887c5

Branch: refs/heads/master
Commit: c14887c5940c8fa99a35138cd984a3e2a5e4ab3c
Parents: 68157d5 063694c
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Tue Dec 15 18:34:09 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Tue Dec 15 18:34:09 2015 +0000

----------------------------------------------------------------------
 docs/src/site/markdown/index.md   |  3 ++-
 docs/src/site/markdown/website.md | 19 +++++++++++++++++++
 docs/src/site/site.xml            |  2 +-
 3 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[10/13] incubator-trafodion git commit: Changed name to lowercase for MXOSRVR to match the process name

Posted by db...@apache.org.
Changed name to lowercase for  MXOSRVR to match the process name


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/718880c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/718880c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/718880c8

Branch: refs/heads/master
Commit: 718880c8f0e8cb08fb2fe29ab456f8cdf33fa9cd
Parents: 2544479
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Wed Dec 16 23:58:41 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Wed Dec 16 23:58:41 2015 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/sqcheck | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/718880c8/core/sqf/sql/scripts/sqcheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/sqcheck b/core/sqf/sql/scripts/sqcheck
index 914ea0e..6edcf1f 100755
--- a/core/sqf/sql/scripts/sqcheck
+++ b/core/sqf/sql/scripts/sqcheck
@@ -524,7 +524,7 @@ else
         echo -e "RMS\t\t$cfg_rms_cnt\t\t$act_rms_cnt\t    ${down_rms[*]}"
         echo -e "DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t    $down_dcsmaster_cnt"
         echo -e "DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t    $down_dcsserver_cnt"
-        echo -e "MXOSRVR\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t    ${act_mxo_down_cnt}\n"
+        echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t    ${act_mxo_down_cnt}\n"
     elif [[ $sqck_component == "dtm" ]]; then
         echo -e "DTM\t\t$cfg_dtm_cnt\t\t$act_dtm_cnt\t    ${down_dtms[*]}\n"
     elif [[ $sqck_component == "rms" ]]; then
@@ -532,7 +532,7 @@ else
     elif [[ $sqck_component == "dcs" ]]; then
         echo -e "DcsMaster\t$cfg_dcsmaster_cnt\t\t$actual_dcsmaster_cnt\t    $down_dcsmaster_cnt"
         echo -e "DcsServer\t$cfg_dcsserver_cnt\t\t$actual_dcsserver_cnt\t    $down_dcsserver_cnt"
-echo - e "MXOSRVR\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t    ${act_mxo_down_cnt}\n"
+        echo -e "mxosrvr\t\t$cfg_mxo_cnt\t\t$act_mxo_cnt\t    ${act_mxo_down_cnt}\n"
     fi
 fi
 


[08/13] incubator-trafodion git commit: fixes

Posted by db...@apache.org.
fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/cbcde79e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/cbcde79e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/cbcde79e

Branch: refs/heads/master
Commit: cbcde79ea87bae975a3a1c18faa17223d80b1a2d
Parents: bc69187
Author: Anuradha Hegde <An...@esgyn.com>
Authored: Wed Dec 16 23:42:33 2015 +0000
Committer: Anuradha Hegde <An...@esgyn.com>
Committed: Wed Dec 16 23:42:33 2015 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/cleanlogs |  6 ++++++
 core/sqf/sql/scripts/dcscheck  | 14 +++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cbcde79e/core/sqf/sql/scripts/cleanlogs
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/cleanlogs b/core/sqf/sql/scripts/cleanlogs
index c4d5123..c903d68 100755
--- a/core/sqf/sql/scripts/cleanlogs
+++ b/core/sqf/sql/scripts/cleanlogs
@@ -39,23 +39,29 @@ function usage() {
 }
 
 function core_logs() {
+ if [[ ! -z $L_PDSH ]]; then
    $L_PDSH rm -f ${MY_SQROOT}/logs/*.err
    $L_PDSH rm -f ${MY_SQROOT}/logs/*.log
    $L_PDSH rm -f ${MY_SQROOT}/logs/*log.[0-9]*
+ fi
 }
 
 function dcs_logs() {
+ if [[ ! -z $L_PDSH ]]; then
    $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.log
    $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.log.[0-9]*
    $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.out
    $L_PDSH rm -f ${DCS_INSTALL_DIR}/logs/*.out.[0-9]*
+ fi
 }
 
 function rest_logs() {
+ if [[ ! -z $L_PDSH ]]; then
    $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.log
    $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.log.[0-9]*
    $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.out
    $L_PDSH rm -f ${REST_INSTALL_DIR}/logs/*.out.[0-9]*
+ fi
 }
 
 function all_logs() {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cbcde79e/core/sqf/sql/scripts/dcscheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/dcscheck b/core/sqf/sql/scripts/dcscheck
index 15006d7..52cbac1 100755
--- a/core/sqf/sql/scripts/dcscheck
+++ b/core/sqf/sql/scripts/dcscheck
@@ -67,7 +67,7 @@ if [[ $sq_stat == 0 ]]; then
   if [ -s ${DCS_INSTALL_DIR}/conf/backup-masters ]; then
      let backup_dcsmaster_cnt=`/bin/egrep -cv '#|^$' ${DCS_INSTALL_DIR}/conf/backup-masters`
      let cfg_dcsmaster_cnt=$backup_dcsmaster_cnt+1
-     list_of_backups=`cat ${DCS_INSTALL_DIR}/conf/backup-masters | /bin/egrep -v '^#|^$'|tr -d '\n'`
+     list_of_backups=`cat ${DCS_INSTALL_DIR}/conf/backup-masters | /bin/egrep -v '^#|^$'|paste -sd ' ' -`
    else
      let cfg_dcsmaster_cnt=1
    fi
@@ -96,12 +96,12 @@ if [[ $sq_stat == 0 ]]; then
         else
            interface_to_use=$floatip_interface
         fi
-        activeMaster=`$L_PDSH /sbin/ip addr show |grep $interface_to_use$ |cut -d '/' -f1 |awk '{print $3}'`
+        activeMaster=`$L_PDSH /sbin/ip addr show |grep $interface_to_use$ |cut -d':' -f1`
         if [[ ! -z $activeMaster ]]; then
-           activeDcsPid=`$L_PDSH $jpscmd |grep DcsMaster |grep $activeMaster |cut -d" " -f2 |tr -d '\n'`
+           activeDcsPid=`$L_PDSH $jpscmd |grep DcsMaster |grep $activeMaster |cut -d" " -f2 |paste -sd ' ' -`
         fi
      else
-        activeMaster=`$L_PDSH $jpscmd |grep DcsMaster |cut -d":" -f1 |tr -d '\n'`
+        activeMaster=`$L_PDSH $jpscmd |grep DcsMaster |cut -d":" -f1 |paste -sd ' ' -`
      fi
 
      if ( [ -z $activeMaster ] && [ "$actual_dcsmaster_cnt" '>' 0 ] && [ "$actual_dcsserver_cnt" '>' 0 ] ); then
@@ -149,13 +149,13 @@ if [[ $sq_stat == 0 ]]; then
    masterport=`cat $dcstmp | /usr/bin/tail -n 1 | cut -d ":" -f4`
    if [ ! -z "$masterport" ]; then
      echo -e "DcsMaster listen port: $masterport\n"
-     if [[ ! -z $primary_dcsmaster ]]; then
+     if [[ ! -z "$primary_dcsmaster" ]]; then
         echo "Configured Primary DcsMaster: \"$primary_dcsmaster\""
      fi
-     if [[ ! -z $list_of_backups ]]; then
+     if [[ ! -z "$list_of_backups" ]]; then
         echo "Configured Backup DcsMasters: \"$list_of_backups\""
      fi
-     if ( [ ! -z $activeMaster ] && [ ! -z $activeDcsPid ] ); then
+     if ( [ ! -z "$activeMaster" ] && [ ! -z "$activeDcsPid" ] ); then
         echo "Active DcsMaster            : \"$activeMaster\", pid $activeDcsPid"
      else
         echo "Active DcsMaster            : \"$activeMaster\""