Re: [ucarp] Ucarp does not detect "no carrier" under FreeBSD

Previous thread: [ucarp] FTP server share directory and external LDAP by Lupone on Saturday, June 26, 2010 - 11:10 am. (1 message)

Next thread: [ucarp] ucarp over wireless? by Dennis Schafroth on Sunday, September 26, 2010 - 4:52 am. (2 messages)
From: Mickaël Canévet
Date: Friday, September 24, 2010 - 6:16 am

Hi,

I'm trying to get ucarp working with HAST on FreeBSD 8.1.

I have two interfaces on each node, a point-to-point connection 
dedicated to HAST synchronization and another one that hosts the virtual 
IP to access the service.

ucarp is launched with this command:

/usr/local/sbin/ucarp -f daemon -B -p arandomstring -z -u 
/usr/local/sbin/ucarp-up -d /usr/local/sbin/ucarp-down -s 172.26.15.234 
-a 172.26.15.235 -i bge0 -v 1

on first node, and

/usr/local/sbin/ucarp -f daemon -B -p arandomstring -z -u 
/usr/local/sbin/ucarp-up -d /usr/local/sbin/ucarp-down -s 172.26.15.238 
-a 172.26.15.235 -i bge0 -v 1

on the second node.

Now when I try to unplug the link connected to bge0 of the active node, 
ucarp do not launch the /usr/local/sbin/ucarp-down script.
Moreover, when I try to unplug the link connected to bge0 of the not 
active node, it launches /usr/local/sbin/ucarp-up.

By looking at the doc, I see a --ignoreifstate option ; it looks like my 
configuration acts like that (even if I did not launch ucarp with this 
option), is it normal ?

Thank you in advance for your answer

Mickaël
From: Guido Jäkel
Date: Friday, September 24, 2010 - 9:12 am

Dear Mickaël,

first of all i wonder why you're trying to use ucarp and don't use the *BSD build-in cap functionality of the network stack, the archetype for the ucarp project?! I leave using FreeBSD at 4.3, but can't imagine that this fetaure have gone.

with greetings

Guido

From: Mickaël Canévet
Date: Monday, September 27, 2010 - 12:05 am

Hi,

I don't know if carp can launch scripts or only share a virtual IP.
I need to launch some stuffs when the virtual IP changes host, so I 
think I need ucarp and not carp for that.

Cheers,
Mickaël
From: Mickaël Canévet
Date: Monday, September 27, 2010 - 7:51 am

I just tried on a linux (CentOS 5.5) and as soon as I unplug the network 
cable, ucarp switches to BACKUP state and launches down script (as I 
expect):

Sep 27 16:48:21 pctmp kernel: e1000e: eth0 NIC Link is Down
Sep 27 16:48:21 pctmp ucarp[2912]: [WARNING] Switching to state: BACKUP
Sep 27 16:48:21 pctmp ucarp[2912]: [WARNING] Spawning 
[/usr/libexec/ucarp/vip-down eth0 172.26.15.101]
Sep 27 16:48:21 pctmp avahi-daemon[2688]: Withdrawing address record for 
172.26.15.101 on eth0.
Sep 27 16:48:31 pctmp kernel: e1000e: eth0 NIC Link is Up 1000 Mbps Full 
Duplex, Flow Control: None
Sep 27 16:48:34 pctmp ucarp[2912]: [WARNING] Switching to state: MASTER
Sep 27 16:48:34 pctmp ucarp[2912]: [WARNING] Spawning 
[/usr/libexec/ucarp/vip-up eth0 172.26.15.101]

I don't have this result on FreeBSD 8.1. Is it normal ?

Thanks a lot for your help

Mickaël
From: Frank Denis
Date: Monday, September 27, 2010 - 9:06 am

I'm not convinced that UCarp ever worked on FreeBSD.
From: Fernando Frediani (Qube)
Date: Monday, September 27, 2010 - 9:12 am

pfSense(http://www.pfsense.org) uses CARP and seems to work pretty well.

Fernando

-----Original Message-----
From: Frank Denis [mailto:j@pureftpd.org] 
Sent: 27 September 2010 17:07
To: list@ucarp.org
Subject: [ucarp] Re: [+] Re: [ucarp] Ucarp does not detect "no carrier" under FreeBSD


  I'm not convinced that UCarp ever worked on FreeBSD.
From: Alexey V. Degtyarev
Date: Monday, September 27, 2010 - 9:11 am

Why not? It is (accidentally ?) work on FreeBSD.

-- 
Alexey V. Degtyarev
From: Guido Jäkel
Date: Monday, September 27, 2010 - 9:15 am

Hi Denis,

may I do it? On my former employee, we're using this for may years with success (and well proved functionality).

Guido
From: Frank Denis
Date: Monday, September 27, 2010 - 9:26 am

UCarp? (not CARP)
From: Guido Jäkel
Date: Monday, September 27, 2010 - 10:54 am

No, carp on FreeBSD. On two tiers of clusters in an enterprise level ha-environment for online banking.

Because my new employee insist on using Linux, i switched from FreeBSD to Gentoo Linux. That's the main reason choose ucarp and not using the Linux-HA tools (heartbeat etc.).

Guido
From: Guido Jäkel
Date: Monday, September 27, 2010 - 8:56 am

This might be done with by devd on FreeBSD, refer e.g. to

	http://blather.michaelwlucas.com/?p=224


I would love it, if things like this two would be in the linux core system like in *BSD ;)
 
greetings

Guido



From: Mickaël Canévet
Date: Tuesday, September 28, 2010 - 6:02 am

Thanks a lot for your help.

I tried carp + devd and it works like a charm.

Mickaël
Previous thread: [ucarp] FTP server share directory and external LDAP by Lupone on Saturday, June 26, 2010 - 11:10 am. (1 message)

Next thread: [ucarp] ucarp over wireless? by Dennis Schafroth on Sunday, September 26, 2010 - 4:52 am. (2 messages)