Send Linux-ha-cvs mailing list submissions to linux-ha-cvs@lists.linux-ha.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Linux-ha-cvs digest..." Today's Topics: 1. Linux-HA CVS: ldirectord by horms from (linux-ha-cvs@lists.linux-ha.org) 2. Linux-HA CVS: ldirectord by horms from (linux-ha-cvs@lists.linux-ha.org) 3. Linux-HA CVS: ldirectord by horms from (linux-ha-cvs@lists.linux-ha.org) 4. Linux-HA CVS: ldirectord by horms from (linux-ha-cvs@lists.linux-ha.org) 5. Linux-HA CVS: ldirectord by horms from (linux-ha-cvs@lists.linux-ha.org) ---------------------------------------------------------------------- Message: 1 Date: Tue, 15 Aug 2006 01:31:59 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : horms Host : Project : linux-ha Module : ldirectord Dir : linux-ha/ldirectord Modified Files: ldirectord.in Log Message: Initialise $EMAILALERTSTATUS This is a fragmant that was missing from 1.30, Filter sending emailalerts based on the daemon's status Signed-Off-By: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- ldirectord.in 15 Aug 2006 07:28:45 -0000 1.31 +++ ldirectord.in 15 Aug 2006 07:31:59 -0000 1.32 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.31 2006/08/15 07:28:45 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.32 2006/08/15 07:31:59 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -562,6 +562,7 @@ $RUNPID = "/var/run/ldirectord"; $SUPERVISED = "no"; $QUIESCENT = "yes"; +$EMAILALERTSTATUS = $DAEMON_STATUS_ALL; # Doctor version, as 1.n -> 1.(n + 144) the code was maintained as ------------------------------ Message: 2 Date: Tue, 15 Aug 2006 01:33:40 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : horms Host : Project : linux-ha Module : ldirectord Dir : linux-ha/ldirectord Modified Files: ldirectord.in Log Message: Intialise $EMAILALERT and $EMAILALERTFREQ This is a fragment that was missing from 1.3 and 1.6, make the emailalert and emailalertfreq options global as well as non-global. Signed-off-by: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- ldirectord.in 15 Aug 2006 07:31:59 -0000 1.32 +++ ldirectord.in 15 Aug 2006 07:33:40 -0000 1.33 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.32 2006/08/15 07:31:59 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.33 2006/08/15 07:33:40 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -562,6 +562,8 @@ $RUNPID = "/var/run/ldirectord"; $SUPERVISED = "no"; $QUIESCENT = "yes"; +$EMAILALERT = ""; +$EMAILALERTFREQ = 0; $EMAILALERTSTATUS = $DAEMON_STATUS_ALL; ------------------------------ Message: 3 Date: Tue, 15 Aug 2006 01:34:39 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : horms Host : Project : linux-ha Module : ldirectord Dir : linux-ha/ldirectord Modified Files: ldirectord.in Log Message: Document mandatory configuration arguments yes|no argument to autoreload and quiescent is mandatory Signed-Off-By: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- ldirectord.in 15 Aug 2006 07:33:40 -0000 1.33 +++ ldirectord.in 15 Aug 2006 07:34:38 -0000 1.34 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.33 2006/08/15 07:33:40 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.34 2006/08/15 07:34:38 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -144,7 +144,7 @@ Default: 1 -B<autoreload = >[B<yes>|B<no>] +B<autoreload = >B<yes>|B<no> Defines if <ldirectord> should continuously check the configuration file for modification. If this is set to 'yes' and the configuration file @@ -235,7 +235,7 @@ Default: I<no> -B<quiescent = >[B<yes>|B<no>] +B<quiescent = >B<yes>|B<no> If I<yes>, then when real or failback servers are determined to be down, they are not actually removed from the kernel's LVS ------------------------------ Message: 4 Date: Tue, 15 Aug 2006 01:35:50 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : horms Host : Project : linux-ha Module : ldirectord Dir : linux-ha/ldirectord Modified Files: ldirectord.in Log Message: Literal arguments to checktype should be bold not italic Signed-Off-By: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- ldirectord.in 15 Aug 2006 07:34:38 -0000 1.34 +++ ldirectord.in 15 Aug 2006 07:35:50 -0000 1.35 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.34 2006/08/15 07:34:38 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.35 2006/08/15 07:35:50 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -280,7 +280,7 @@ emailalertfreq and quiescent options listed above may also appear inside a virtual section, in which case the global setting is overridden. -B<checktype = >I<negotiate>|I<connect>|I<N>|I<ping>|I<off>|I<on> +B<checktype = >B<negotiate>|B<connect>|I<N>|B<ping>|B<off>|B<on> Type of check to perform. Negotiate sends a request and matches a receive string. Connect only attemts to make a TCP/IP connection, thus the ------------------------------ Message: 5 Date: Tue, 15 Aug 2006 01:36:59 -0600 (MDT) From: linux-ha-cvs@lists.linux-ha.org Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by horms from To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> linux-ha CVS committal Author : horms Host : Project : linux-ha Module : ldirectord Dir : linux-ha/ldirectord Modified Files: ldirectord.in Log Message: Handle signals outside of signal handlers Make the signal handlers set flags, and then do the dirty work later on. I'm surprised the old code never fell over. Hopefully this doesn't break stuff. Signed-Off-By: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- ldirectord.in 15 Aug 2006 07:35:50 -0000 1.35 +++ ldirectord.in 15 Aug 2006 07:36:59 -0000 1.36 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.35 2006/08/15 07:35:50 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.36 2006/08/15 07:36:59 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -524,6 +524,8 @@ $DAEMON_STATUS_STOPPING $DAEMON_STATUS_RELOADING $DAEMON_STATUS_ALL + $DAEMON_TERM + $DAEMON_HUP $opt_d $opt_h $pid @@ -548,6 +550,8 @@ $DAEMON_STATUS_RELOADING; # default values +$DAEMON_TERM = undef; +$DAEMON_HUP = undef; $AUTOCHECK = "no"; $CHECKINTERVAL = 10; $CHECKTIMEOUT = 5; @@ -825,30 +829,50 @@ # If we get a sinal then log it and quit sub ld_handler_term { - my ($signal) = (@_); - if ($DAEMON_STATUS == $DAEMON_STATUS_STOPPING) { + my ($signal) = (@_); + + if (defined $DAEMON_TERM) { $SIG{'__DIE__'} = "IGNORE"; $SIG{"$signal"} = "IGNORE"; die("Exit Handler Repeatedly Called\n"); } + $DAEMON_TERM = $signal; $DAEMON_STATUS = $DAEMON_STATUS_STOPPING; +} +sub ld_process_term +{ + $DAEMON_STATUS = $DAEMON_STATUS_STOPPING; ld_cmd_children("stop", %LD_INSTANCE); ld_stop(); - &ld_log("Linux Director Daemon terminated on signal: $signal"); + &ld_log("Linux Director Daemon terminated on signal: $DAEMON_TERM"); &ld_rm_file("$RUNPID.$CFGNAME.pid"); - &ld_exit(0, "Linux Director Daemon terminated on signal: $signal"); + &ld_exit(0, "Linux Director Daemon terminated on signal: $DAEMON_TERM"); } - sub ld_handler_hup { - my ($signal) = (@_); - &ld_log("Reloading Linux Director Daemon config on signal: $signal"); + $DAEMON_HUP=1; +} + +sub ld_process_hup +{ + &ld_log("Reloading Linux Director Daemon config on signal"); + $DAEMON_HUP = undef; &reread_config(); } +sub check_signal +{ + if (defined $DAEMON_TERM) { + ld_process_term(); + } + if (defined $DAEMON_HUP) { + ld_process_hup(); + } +} + sub reread_config { @OLDVIRTUAL = @VIRTUAL; @@ -1962,6 +1986,7 @@ REAL: foreach my $r (@$real) { my $real_id = get_real_id_str($r, $v); + check_signal(); foreach my $tmp_id (@real_checked) { if($real_id eq $tmp_id) { &ld_debug(3, "Already checked: real server=$real_id (virtual=$virtual_id)"); @@ -2030,11 +2055,15 @@ } # $ua->wait($$v{checktimeout}); } + check_signal(); if (!check_cfgfile()) { sleep $CHECKINTERVAL; } + check_signal(); ld_emailalert_resend(); + + check_signal(); } } ------------------------------ _______________________________________________ Linux-ha-cvs mailing list Linux-ha-cvs@lists.linux-ha.org http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs End of Linux-ha-cvs Digest, Vol 33, Issue 42 ********************************************