Bug 63773 - freevrrpd not working on 5.2.1-RELEASE-p1
Summary: freevrrpd not working on 5.2.1-RELEASE-p1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-04 19:40 UTC by Dennis Dai
Modified: 2004-05-26 23:20 UTC (History)
0 users

See Also:


Attachments
freevrrpd.patch (25.27 KB, patch)
2004-03-05 09:45 UTC, spetit
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Dai 2004-03-04 19:40:14 UTC
When starting freevrrpd (version 0.8.7), it detects the interface as faulty, so it deactives the vrid. Then, it detects the interface alive again, so it reactivate the vrid. Then, it detects the interface as faulty again ... So it just flips between faulty and alive, until "too much errors on it" and exits. Here's the relevant part of /var/log/messages:

(209.xxx.164.236 is the real IP and 209.xxx.164.239 is virtual IP)

Mar  4 12:40:28 fw2 freevrrpd[1058]: launching daemon in background mode
Mar  4 12:40:28 fw2 freevrrpd[1059]: initializing threads and all VRID
Mar  4 12:40:28 fw2 freevrrpd[1059]: reading configuration file /usr/local/etc/freevrrpd.conf
Mar  4 12:40:28 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:0:5e:0:1:1
Mar  4 12:40:28 fw2 freevrrpd[1059]: send ip = 209.xxx.164.239, eth = 0:0:5e:0:1:1
Mar  4 12:40:28 fw2 freevrrpd[1059]: server state vrid 1: master
Mar  4 12:40:28 fw2 freevrrpd[1059]: interface bge0 is faulty, deactivated from VRRP VRIDs
Mar  4 12:40:29 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:d:56:fd:d2:15
Mar  4 12:40:29 fw2 freevrrpd[1059]: server state vrid 1: backup
Mar  4 12:40:32 fw2 freevrrpd[1059]: interface bge0 is alive again, reactivate it on VRRP
Mar  4 12:40:36 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:0:5e:0:1:1
Mar  4 12:40:36 fw2 freevrrpd[1059]: send ip = 209.xxx.164.239, eth = 0:0:5e:0:1:1
Mar  4 12:40:36 fw2 freevrrpd[1059]: server state vrid 1: master
Mar  4 12:40:36 fw2 freevrrpd[1059]: interface bge0 is faulty, deactivated from VRRP VRIDs
Mar  4 12:40:37 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:d:56:fd:d2:15
Mar  4 12:40:37 fw2 freevrrpd[1059]: server state vrid 1: backup
Mar  4 12:40:39 fw2 freevrrpd[1059]: interface bge0 is alive again, reactivate it on VRRP
Mar  4 12:40:40 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:0:5e:0:1:1
Mar  4 12:40:40 fw2 freevrrpd[1059]: send ip = 209.xxx.164.239, eth = 0:0:5e:0:1:1
Mar  4 12:40:40 fw2 freevrrpd[1059]: server state vrid 1: master
Mar  4 12:40:40 fw2 freevrrpd[1059]: interface bge0 is faulty, deactivated from VRRP VRIDs
Mar  4 12:40:41 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:d:56:fd:d2:15
Mar  4 12:40:41 fw2 freevrrpd[1059]: server state vrid 1: backup
Mar  4 12:40:44 fw2 freevrrpd[1059]: interface bge0 is alive again, reactivate it on VRRP
Mar  4 12:40:47 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:0:5e:0:1:1
Mar  4 12:40:47 fw2 freevrrpd[1059]: send ip = 209.xxx.164.239, eth = 0:0:5e:0:1:1
Mar  4 12:40:47 fw2 freevrrpd[1059]: server state vrid 1: master
Mar  4 12:40:47 fw2 freevrrpd[1059]: interface bge0 is faulty, deactivated from VRRP VRIDs
Mar  4 12:40:48 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:d:56:fd:d2:15
Mar  4 12:40:48 fw2 freevrrpd[1059]: server state vrid 1: backup
Mar  4 12:40:50 fw2 freevrrpd[1059]: interface bge0 is alive again, reactivate it on VRRP
Mar  4 12:40:52 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:0:5e:0:1:1
Mar  4 12:40:52 fw2 freevrrpd[1059]: send ip = 209.xxx.164.239, eth = 0:0:5e:0:1:1
Mar  4 12:40:52 fw2 freevrrpd[1059]: server state vrid 1: master
Mar  4 12:40:52 fw2 freevrrpd[1059]: interface bge0 is faulty, deactivated from VRRP VRIDs
Mar  4 12:40:53 fw2 freevrrpd[1059]: send ip = 209.xxx.164.236, eth = 0:d:56:fd:d2:15
Mar  4 12:40:53 fw2 freevrrpd[1059]: server state vrid 1: backup
Mar  4 12:40:56 fw2 freevrrpd[1059]: cannot reactivate interface bge0, too much errors on it !

My /usr/local/etc/freevrrpd.conf:

[VRID]
serverid = 1
interface = bge0
priority = 255
addr = 209.xxx.164.239/32
password = vrid1

I've tried it on FreeBSD 4.9-RELEASE-p2 with no problem. Also I've tried on FreeBSD 5.1-RELEASE-p10 and it works fine too. So I'd assume something has been changed recently but freevrrpd hasn't adapted the change.

Fix: 

I'm not familiar with networking code so I am unable to provide a fix. It'll be greatly appreciated if someone can look into it. Thanks.
How-To-Repeat: Just setup a freevrrpd config and start the freevrrpd daemon on a 5.2.1-p1 box. I've tested on 2 Dell 1750 machines.
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2004-03-04 20:56:28 UTC
Hi,

On Thu, Mar 04, 2004 at 11:35:29AM -0800, Dennis Dai wrote:
> 
> >Number:         63773
> >Category:       ports
> >Synopsis:       freevrrpd not working on 5.2.1-RELEASE-p1
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-ports-bugs
> >State:          open


Could you please investigate this ?

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/63773

-Kirill
Comment 2 Kirill Ponomarev freebsd_committer freebsd_triage 2004-03-04 20:56:37 UTC
State Changed
From-To: open->feedback

Asked for maintainer's feedback
Comment 3 spetit 2004-03-05 09:45:44 UTC
Hi,

This problem is due to latency of em and bge cards when upping or changing MAC 
adress on it (about 2 seconds before card is considered up and working). This 
latency cause a problem with monitored circuits on freevrrpd. A special NNTP 
server ha been configured for reporting/submitting patches/questions about 
freevrrpd at news.b0l.org.
I have made a patch for that, the working revision of freevrrpd is 
at :pserver:anoncvs@cvs.b0l.org:/var/cvs. The password is anoncvs.
The attached patch contains the unified diff between 0.8.7 revision and the 
last revision in CVS. NetBSD is now supported too.

Regards,
Sebastien.
-- 
spe@selectbourse.net

On Thursday 04 March 2004 21:56, Kirill Ponomarew wrote:
> Hi,
>
> On Thu, Mar 04, 2004 at 11:35:29AM -0800, Dennis Dai wrote:
> > >Number:         63773
> > >Category:       ports
> > >Synopsis:       freevrrpd not working on 5.2.1-RELEASE-p1
> > >Confidential:   no
> > >Severity:       non-critical
> > >Priority:       low
> > >Responsible:    freebsd-ports-bugs
> > >State:          open
>
> Could you please investigate this ?
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/63773
>
> -Kirill


Les informations contenues dans ce message sont confidentielles et peuvent constituer des informations privilegiees. Si vous n etes pas le destinataire de ce message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d en utiliser tout ou partie. Si vous avez recu ce message par erreur, merci de le supprimer de votre systeme, ainsi que toutes ses copies, et d en avertir immediatement l expediteur par message de retour....
Il est impossible de garantir que les communications par messagerie electronique arrivent en temps utile, sont securisees ou denuees de toute erreur ou virus. En consequence, l expediteur n accepte aucune responsabilite du fait des erreurs ou omissions qui pourraient en resulter.
--- ----------------------------------------------------- ---
The information contained in this e-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return e-mail.
E-mail communications cannot be guaranteed to be timely secure, error or virus-free. The sender does not accept liability for any errors or omissions which arise as a result.
Comment 4 Dennis Dai 2004-03-05 20:12:41 UTC
Hi Sebastien,

I applied your patch and it works great!

There is still a very very minor issue: if an interface has no carrier (no cable 
attached) or no (real) IP address assigned to it, when shutting down freevrrpd, 
it'll leave error messages in /var/log/messages like this:

Mar  5 13:17:12 fw2 freevrrpd[5448]: select on readfds fd_set failed: Bad file 
descriptor

Anyways, this is a very unusual case so most likely it won't happen in a 
production environment.

I really appreciate your quick response (as well as Kirill's) and solution. You 
guys absolutely rock!

Thanks,

Dennis
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2004-05-26 23:20:26 UTC
State Changed
From-To: feedback->closed

Patch from this PR committed, thank you guys.