[ 
https://issues.apache.org/jira/browse/TRAFODION-2940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16387540#comment-16387540
 ] 

ASF GitHub Bot commented on TRAFODION-2940:
-------------------------------------------

Github user mashengchen commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1427#discussion_r172462100
  
    --- 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 --
    
    this function is a little different from the one using PDSH,  the ouput of 
`$SQ_PDSH $MY_NODES /sbin/ip addr show` is different from `/sbin/ip link show` 
, so the cut step after the " | " (pipe) is different. 


> 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)

Reply via email to