Re: Running a shell script on becoming the CARP master?

2005-11-28 Thread Max Laier
On Saturday 26 November 2005 16:14, Matthew Hagerty wrote:
 Are there any hooks into CARP to run a shell script when a machine
 becomes the master?  Also, is there a way to force a machine to become
 the master without powering off the current master (for example to do
 maintenance on the current master)?

net/ifstated from ports might be what you are looking for.

-- 
/\  Best regards,  | [EMAIL PROTECTED]
\ /  Max Laier  | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | [EMAIL PROTECTED]
/ \  ASCII Ribbon Campaign  | Against HTML Mail and News


pgpkEHnQYn8sF.pgp
Description: PGP signature


Running a shell script on becoming the CARP master?

2005-11-26 Thread Matthew Hagerty

Greetings,

Are there any hooks into CARP to run a shell script when a machine 
becomes the master?  Also, is there a way to force a machine to become 
the master without powering off the current master (for example to do 
maintenance on the current master)?


Thanks,
Matthew
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Dominic Marks
On Saturday 26 November 2005 15:14, Matthew Hagerty wrote:
 Greetings,
 
 Are there any hooks into CARP to run a shell script when a machine 
 becomes the master?  Also, is there a way to force a machine to become 
 the master without powering off the current master (for example to do 
 maintenance on the current master)?

I believe there was supposed to be a utility for this sort of thing
but I haven't seen or heard anything about it. In the mean time a
program which read the data could probably be built from the ifconfig
code quite simply. It would be really nice if there were kevent
notifications for CARP events.

 Thanks,
 Matthew
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 

-- 
Dominic Marks
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread David S. Madole

From: Matthew Hagerty [EMAIL PROTECTED]


Are there any hooks into CARP to run a shell script when a machine 
becomes the master?  Also, is there a way to force a machine to become 
the master without powering off the current master (for example to do 
maintenance on the current master)?


I don't know of any way to do the former, but for the latter it's easy 
enough to temporarily adjust the advbase setting higher on the master 
until failover occurs. Set it to at least three times the setting on the 
slave.


Or simply ifconfig down the carp interface on the master.

David

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Dag-Erling Smørgrav
Matthew Hagerty [EMAIL PROTECTED] writes:
 Are there any hooks into CARP to run a shell script when a machine
 becomes the master?

Have you tried using devd to catch the link up / down event on the
carp interface?

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Matthew Hagerty

Dag-Erling Smørgrav wrote:


Matthew Hagerty [EMAIL PROTECTED] writes:
 


Are there any hooks into CARP to run a shell script when a machine
becomes the master?
   



Have you tried using devd to catch the link up / down event on the
carp interface?

DES
 



I'm not familiar with devd, but I'll certainly look into it.

Matthew

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Matthew Hagerty

David S. Madole wrote:


From: Matthew Hagerty [EMAIL PROTECTED]



Are there any hooks into CARP to run a shell script when a machine 
becomes the master?  Also, is there a way to force a machine to 
become the master without powering off the current master (for 
example to do maintenance on the current master)?



I don't know of any way to do the former, but for the latter it's easy 
enough to temporarily adjust the advbase setting higher on the master 
until failover occurs. Set it to at least three times the setting on 
the slave.


Or simply ifconfig down the carp interface on the master.

David

Taking the master carp interface down certainly would accomplish the 
task, I just didn't know if there was a more elegant method.  Thanks for 
the info.


Matthew

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Running a shell script on becoming the CARP master?

2005-11-26 Thread Matthew Hagerty

Dominic Marks wrote:


On Saturday 26 November 2005 15:14, Matthew Hagerty wrote:
 


Greetings,

Are there any hooks into CARP to run a shell script when a machine 
becomes the master?  Also, is there a way to force a machine to become 
the master without powering off the current master (for example to do 
maintenance on the current master)?
   



I believe there was supposed to be a utility for this sort of thing
but I haven't seen or heard anything about it. In the mean time a
program which read the data could probably be built from the ifconfig
code quite simply. It would be really nice if there were kevent
notifications for CARP events.

 


Thanks,
Matthew
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

   



 

I was looking at the ifconfig output and it certainly could be parsed 
for the CARP status I suppose, but it just seemed a little crude and I 
wanted to make sure I was not missing something more obvious.  Do you 
know if the CARP interface is up, available, and stable by the time 
/usr/local/etc/rc.d scripts are run?


Thanks,
Matthew

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]