[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CARP: Know when you are the master



Absolutely.
But that's not my point, I was under the (possibly misguided)
impression that callbacks for interfaces going up/down already exist?

In which case it could be used on CARP interfaces, so apps that
need to know, can know when they are on the master or not.

Please shoot me down if I'm wrong, I'm digging deep into my rather
museum-like memory....

Dom
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dom De Vitto                                       Tel. 07855 805 271
http://www.devitto.com                         mailto:dom@devitto.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-----Original Message-----
From: Theo de Raadt [mailto:deraadt@cvs.openbsd.org] 
Sent: Sunday, October 19, 2003 2:26 AM
To: Dom De Vitto
Subject: Re: CARP: Know when you are the master 

That is not what CARP is for.

> Return-Path: owner-misc+M44989@openbsd.org
> Delivery-Date: Sat Oct 18 15:35:20 2003
> Received: from openbsd.cs.colorado.edu (openbsd.cs.colorado.edu
[128.138.207.242])
> 	by cvs.openbsd.org (8.12.10/8.12.1) with ESMTP id h9ILZJVU019837
> 	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256
verify=FAIL);
> 	Sat, 18 Oct 2003 15:35:20 -0600 (MDT)
> Received: from openbsd.org (localhost.cs.colorado.edu [127.0.0.1])
> 	by openbsd.cs.colorado.edu (8.12.10/8.12.10) with ESMTP id
h9ILURZY019906;
> 	Sat, 18 Oct 2003 15:30:30 -0600 (MDT)
> Received: from smtp.aaisp.net.uk (painless.aaisp.net.uk [217.169.20.17])
> 	by openbsd.cs.colorado.edu (8.12.10/8.12.10) with ESMTP id
h9ILPjoQ001154 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256
verify=NO)
> 	for <misc@openbsd.org>; Sat, 18 Oct 2003 15:25:46 -0600 (MDT)
> Received: from [217.169.21.114] (helo=dom)
> 	by smtp.aaisp.net.uk with esmtp (Exim 4.22) id 1AAyZv-000432-JP
> 	for misc@openbsd.org; Sat, 18 Oct 2003 22:25:39 +0100
> From: "Dom De Vitto" <dom@DeVitto.com>
> To: <misc@openbsd.org>
> Subject: Re: CARP:  Know when you are the master
> Date: Sat, 18 Oct 2003 22:29:14 +0100
> Organization: Secure Technologies Ltd.
> MIME-Version: 1.0
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: 8bit
> X-Mailer: Microsoft Office Outlook, Build 11.0.5510
> Thread-Index: AcOVvnEUzk5RdawJTk+T6atw9CBtVgAAC82Q
> In-Reply-To: <20031018231933.36a92371.marc@msys.ch>
> Message-Id: <E1AAyZv-000432-JP@smtp.aaisp.net.uk>
> X-Spam-Level: 
> X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
> X-Loop: misc@openbsd.org
> Precedence: list
> Sender: owner-misc@openbsd.org
> 
> Does such a thing exist already?
> (hmmm, I sound like a newbie...)
> 
> I mean, it sounds like a useful thing to know when interfaces go 
> up/down for userland proggies.
> 
> Dom
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Dom De Vitto                                       Tel. 07855 805 271
> http://www.devitto.com                         mailto:dom@devitto.com
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> -----Original Message-----
> From: owner-misc@openbsd.org [mailto:owner-misc@openbsd.org] On Behalf 
> Of Marc Balmer
> Sent: Saturday, October 18, 2003 10:20 PM
> To: mcbride@openbsd.org
> Cc: misc@openbsd.org
> Subject: Re: CARP: Know when you are the master
> 
> On Sat, 18 Oct 2003 21:03:31 +0000
> Ryan McBride <mcbride@openbsd.org> wrote:
> 
> > On Sat, Oct 18, 2003 at 10:22:21PM +0200, Marc Balmer wrote:
> > > Regarding the new CARP protocol:  Is there some way to be notified 
> > > when a machine becomes the master, e.g. to startup services?
> > 
> > It should be pointed out that you should not have to start or stop 
> > services in many (most?) configurations: services can bind to the 
> > common address even if the host is not master. The service will 
> > simply not recieve any traffic until the point at which the host becomes
master.
> 
> I think there is a problem with this.  You have two machines with the 
> same IP address in the network, if I understand the concept.  This is 
> maybe not a problem when the machines are connected from remote.  But 
> if a slave accesses the shared IP address, it  will connect to itself 
> and not to the master.  So the slaves access a different machine 
> (namely themselves) than machines not in the vhid group.
> 
> We have some installations with clustered mail gateways where a single 
> fibre channel RAID array can be accessed from two servers.  Only one 
> server, the master, mounts the mail queue directory partition and 
> handles e-mail.  When fail over occurs, the slave  server mounts the 
> partition and begins to process e-mail.  What would be the 
> corresponding setting in a CARP situation?
>  
> > But you raise a good point; I believe I'll add the appropriate 
> > logging messages to the code so that state changes can be logged via
syslog.
> 
> I'd prefer an ioctl with which I could register "myself" with carp to 
> get notified of a state change.  A callback, so to say, or maybe a signal.
> 
> - mb