Hi,

On Thu, Feb 14, 2008 at 05:50:17PM +0100, www.tiri.li high availability wrote:
> Patch attached.

Sorry, still no cigar:

$ patch -p0 --dry-run < /tmp/ipaddr.patch 
patching file IPaddr
Hunk #1 FAILED at 248.
Hunk #2 FAILED at 327.

Could you ask the original author to send it. Or just attach the
whole (working) IPaddr file and I'll try to produce the patch.

Thanks,

Dejan

>
> -- 
> www.tiri.li - www.1-search.de - www.linkarchiv.at
>
>
> Zitat von Dejan Muhamedagic <[EMAIL PROTECTED]>:
>
>> Hi,
>>
>> On Thu, Feb 14, 2008 at 02:11:29PM +0100, www.tiri.li high  availability 
>> wrote:
>>> Frank Botte  provided me a patch for IPaddr - Script:
>>>
>>> Will this patch go into the current bug.fixes of heartbeat ?
>>
>> Many thanks for the patch. However, it can't be applied unless
>> you send it as an attachment.
>>
>> Thanks,
>>
>> Dejan
>>
>>> Thanks for any reply in advance.
>>>
>>> Thomas.
>>>
>>> --- IPaddr.orig 2007-12-18 12:34:59.000000000 +0100
>>> +++ IPaddr      2007-12-18 14:10:22.000000000 +0100
>>> @@ -248,13 +248,12 @@
>>>      if
>>>        NICINFO=`eval $CMD`
>>>      then
>>> -       netmask_text=`echo "$NICINFO" | cut -f2 -d " "`
>>> -       broadcast=`echo "$NICINFO" | cut -f3 -d " "`
>>> +       netmask_text=`echo "$NICINFO" | tr '    ' ' ' | cut -f3 -d " "`
>>> +       broadcast=`echo "$NICINFO" | tr '       ' ' ' | cut -f5 -d " "`
>>>      else
>>>         echo "ERROR: $CMD failed (rc=$rc)"
>>>         exit $OCF_ERR_GENERIC
>>>      fi
>>> -
>>>      add_interface "$ipaddr" "$ifname" "$ifname" $netmask_text $broadcast
>>>      rm -f "$VLDIR/$ipaddr"
>>>  }
>>> @@ -328,7 +327,7 @@
>>>             *)  continue;;
>>>         esac
>>>
>>> -       : "comparing $ipaddr to $addr (from ifconfig)"
>>> +       : "comparing \$ipaddr -> >$ipaddr< to \$addr -> >$addr< (from
>>> ifconfig)"
>>>         case $addr in
>>>             addr:$ipaddr)   echo $ifname; return $OCF_SUCCESS;;
>>>             $ipaddr)        echo $ifname; return $OCF_SUCCESS;;
>>>
>>>
>>>
>>>
>>> --
>>> www.tiri.li - www.1-search.de - www.linkarchiv.at
>>>
>>>
>>> Zitat von Stephan Berlet <[EMAIL PROTECTED]>:
>>>
>>>> Hi again,
>>>>
>>>> IMHO the lvs_restore_loopback() isn't working correct:
>>>>
>>>> 01:lvs_restore_loopback() {
>>>> 02:  ipaddr="$1"
>>>> 03:
>>>> 04:  if [ ! -s "$VLDIR/$ipaddr" ]; then
>>>> 05:    return
>>>> 06:  fi
>>>> 07:
>>>> 08:  ifname=`cat "$VLDIR/$ipaddr"`
>>>> 09:
>>>> 10:
>>>> 11:  ocf_log info "Restoring loopback IP Address $ipaddr on $ifname."
>>>> 12:
>>>> 13:  CMD="OCF_RESKEY_cidr_netmask=32 OCF_RESKEY_ip=$1 \
>>>>    OCF_RESKEY_nic=$ifname $FINDIF"
>>>> 14:  if
>>>> 15:    NICINFO=`eval $CMD`
>>>> 16:  then
>>>> 17:    netmask_text=`echo "$NICINFO" | cut -f2 -d " "`
>>>> 18:    broadcast=`echo "$NICINFO" | cut -f3 -d " "`
>>>> 19:  else
>>>> 20:    echo "ERROR: $CMD failed (rc=$rc)"
>>>> 21:    exit $OCF_ERR_GENERIC
>>>> 22:  fi
>>>> 23:
>>>> 24:  add_interface "$ipaddr" "$ifname" "$ifname" $netmask_text 
>>>> $broadcast
>>>> 25:  rm -f "$VLDIR/$ipaddr"
>>>> 26:}
>>>>
>>>>
>>>> I have executed the commands manually with following outputs:
>>>>
>>>> Line08:
>>>> # cat /var/run/heartbeat/rsctmp/IPaddr/172.30.4.170
>>>> lo:0
>>>>
>>>> Line15:
>>>> # eval OCF_RESKEY_cidr_netmask=32 OCF_RESKEY_ip=172.30.4.170 \
>>>>   OCF_RESKEY_nic=lo:0 /usr/lib/heartbeat/findif
>>>> lo:0: warning: name may be invalid
>>>> lo:0    netmask 255.255.255.255 broadcast 172.30.4.170
>>>>
>>>> Line17:
>>>> netmask_text="255.255.255.255 broadcast"
>>>>
>>>> Line18:
>>>> broadcast="172.30.4.170"
>>>>
>>>>
>>>> So I arrive at the conclusion that the first line of the
>>>> output from the findif is the cause why add_interface breaks.
>>>>
>>>> But why should the name lo:0 may be invalid?
>>>> Is it possible to switch off this warning??
>>>>
>>>>
>>>> Many thanks in advance,
>>>> Stephan
>>>>
>>>>
>>>> HELPING HEADS for Hard- and Software
>>>> -------------------------------------------------------------------------
>>>> F?r Ihre Projekte entwickeln wir ma?geschneiderte L?sungen - schnell,
>>>> flexibel und direkt vor Ort. Unser eingespieltes Team an erfahrenen 
>>>> Hard-
>>>> und Software-Spezialisten unterst?tzt Sie dort, wo Sie uns brauchen.
>>>>
>>>>
>>>>
>>>> --------------------------------------------------------------------------
>>>> SysDesign GmbH
>>>> S?ntisstrasse 25
>>>> D-88079 Kressbronn am Bodensee
>>>>
>>>> Gesch?ftsf?hrer: Franz Kleiner, Achim Solle
>>>> Handelsregister: Ulm 632138
>>>> --------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Linux-HA mailing list
>>>> [email protected]
>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>>> See also: http://linux-ha.org/ReportingProblems
>>>>
>>>>
>>>
>>>
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>> _______________________________________________
>>> Linux-HA mailing list
>>> [email protected]
>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> See also: http://linux-ha.org/ReportingProblems
>> _______________________________________________
>> Linux-HA mailing list
>> [email protected]
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>

> --- IPaddr.orig 2007-12-18 12:34:59.000000000 +0100
> +++ IPaddr      2007-12-18 14:10:22.000000000 +0100
> @@ -248,13 +248,12 @@
>       if
>         NICINFO=`eval $CMD`
>       then
> -       netmask_text=`echo "$NICINFO" | cut -f2 -d " "`
> -       broadcast=`echo "$NICINFO" | cut -f3 -d " "`
> +       netmask_text=`echo "$NICINFO" | tr '    ' ' ' | cut -f3 -d " "`
> +       broadcast=`echo "$NICINFO" | tr '       ' ' ' | cut -f5 -d " "`
>       else
>          echo "ERROR: $CMD failed (rc=$rc)"
>          exit $OCF_ERR_GENERIC
>       fi
> -
>       add_interface "$ipaddr" "$ifname" "$ifname" $netmask_text $broadcast
>       rm -f "$VLDIR/$ipaddr"
>   }
> @@ -328,7 +327,7 @@
>              *)  continue;;
>          esac
> 
> -       : "comparing $ipaddr to $addr (from ifconfig)"
> +       : "comparing \$ipaddr -> >$ipaddr< to \$addr -> >$addr< (from
> ifconfig)"
>          case $addr in
>              addr:$ipaddr)   echo $ifname; return $OCF_SUCCESS;;
>              $ipaddr)        echo $ifname; return $OCF_SUCCESS;;
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to