Bug 196095 - Ucarp does not update arp cache if your master comes up after losing link.
Ucarp does not update arp cache if your master comes up after losing link.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ucarp (Show other bugs)
5
All Linux
medium Severity urgent
: ---
: ---
Assigned To: Matthias Saou
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-20 18:52 EDT by Tautvydas Bruzas
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-30 09:17:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for ucarp, which detects a link state and sends out gratuitous arp packet when master regains link state. (1.18 KB, patch)
2006-06-20 18:52 EDT, Tautvydas Bruzas
no flags Details | Diff
Patch from 1.3 snapshot (1.43 KB, patch)
2006-06-21 11:15 EDT, Matthias Saou
no flags Details | Diff

  None (edit)
Description Tautvydas Bruzas 2006-06-20 18:52:43 EDT
Description of problem:

If you have two servers running ucarp, and before them you have any
router, if master server goes down backup automatically takes over and
sends gratuitous arp packet to update router's arp cache. Problem occurs
then link  to master goes down (for example unplug network cable from a
switch, or switch dies). In that case backup takes over, same as in
previous example, but when link goes back up master does not sends out
gratuitous arp and that results that server is not accessible (amount of
time depends on router's arp cache timeout).

Version-Release number of selected component (if applicable):

ucarp 1.2 and bellow

How reproducible:

easy.

Steps to Reproduce:
1. Unplug network cable from master machine
2. Try to ping HA ip.
3. Plug network cable back in
4. Try to ping that IP once more.

Workaround:
You can use something like adding to ifdown script on backup server ssh
and run arping command on master, you can not add to ifup on master
this, because master is not detecting any change that's why it's not
sending out gratuitous arp packet.

Patch attached:
Comment 1 Tautvydas Bruzas 2006-06-20 18:52:43 EDT
Created attachment 131233 [details]
Patch for ucarp, which detects a link state and sends out gratuitous arp packet when master regains link state.
Comment 2 Matthias Saou 2006-06-20 18:57:38 EDT
Interesting. Have you also submitted the patch upstream? I would really prefer
not having specific fixes in the Fedora packages only, so the ideal would be to
either have a new release with the fix available, or if that's not planned
anytime soon, I could include the approved patch anyway.
Comment 3 Tautvydas Bruzas 2006-06-20 19:01:40 EDT
Yes I did, didn't get any answer yet (I submitted it two weeks ago).
Comment 4 Tautvydas Bruzas 2006-06-20 19:06:28 EDT
I checked authors page, and looks like in version 1.3 (it's still in snapshots),
path is included.
Comment 5 Matthias Saou 2006-06-21 11:14:41 EDT
Indeed, it seems to be included in the 1.3 snapshot. But extracting the code
from it, I get a slightly different diff. See attached patch (with #ifdefs for
SIOCGIFFLAGS) and tell me if it seems fine to you, then I'll include it.
Comment 6 Matthias Saou 2006-06-21 11:15:32 EDT
Created attachment 131287 [details]
Patch from 1.3 snapshot
Comment 7 Tautvydas Bruzas 2006-06-21 13:44:47 EDT
(In reply to comment #5)
> Indeed, it seems to be included in the 1.3 snapshot. But extracting the code
> from it, I get a slightly different diff. See attached patch (with #ifdefs for
> SIOCGIFFLAGS) and tell me if it seems fine to you, then I'll include it.

Yep, I noticed a difference, patch looks good. Author added checking for
interface name (it won't cause buffer overflow in my patch as well as we both
using strncpy, but it won't give an error in my case), and added checking for
SIOCGIFFLAGS if they are defined on the system (because of that he moved portion
of code there interface looses link state).
Comment 8 Matthias Saou 2006-06-22 11:38:53 EDT
I've updated the Extras development package with this patch included. Please let
me know how it goes, and I'll backport it to Extras 5 if all is fine. Also,
don't hesitate to ping me when 1.3 final gets released so that I can update the
package.
Comment 9 Matthias Saou 2006-06-30 09:17:50 EDT
I've just triggered a rebuild of the 1.2 + fix package for FC-5.

Note You need to log in before you can comment on or make changes to this bug.