[ https://issues.apache.org/jira/browse/TRAFODION-2940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16366346#comment-16366346 ]
ASF GitHub Bot commented on TRAFODION-2940: ------------------------------------------- Github user svarnau commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1427#discussion_r168625988 --- Diff: dcs/bin/scripts/dcsunbind.sh --- @@ -51,6 +51,31 @@ function check_node { done } +function check_self_node { + for myinterface in `/sbin/ip link show|cut -d: -f1- | cut -c1- | awk -F': ' '/^[0-9]+:.*/ {print $2;}'`; do + ip_output=$(/sbin/ip addr show $myinterface | cut -d: -f1- | cut -c1-) + + myifport=`echo "$ip_output" | grep -w $gv_float_external_ip` + status=$? + if [ $status -eq 0 ]; then + tempinterface=`echo $gv_float_interface:$gv_port` + # check if another interface is bound to this virtual ip address + echo "$myifport" | grep "$tempinterface" > /dev/null + if [ $? -eq 0 ]; then + unbindip=`echo "$myifport" | awk '{print $2}'` + unbindlb=`echo "$myifport"|awk '{print $NF}'` + echo "Virtual ip $gv_float_external_ip is in use on node $HOSTNAME bound to interface $myinterface($unbindlb) - unbinding..." + sudo /sbin/ip addr del $unbindip dev $myinterface + status=$? --- End diff -- It seems unnecessary to duplicate entire function just to change whether commands run locally or remotely. That can be done with a variable, so that we don't have two copies of this code to maintain. > In HA env, one node lose network, when recover, trafci can't use > ---------------------------------------------------------------- > > Key: TRAFODION-2940 > URL: https://issues.apache.org/jira/browse/TRAFODION-2940 > Project: Apache Trafodion > Issue Type: Bug > Affects Versions: any > Reporter: mashengchen > Assignee: mashengchen > Priority: Major > Fix For: 2.3 > > > In HA env, if one node lose network for a long time , once network recover, > there will have two floating ip, two working dcs master, and trafci can't be > use. -- This message was sent by Atlassian JIRA (v7.6.3#76005)