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) ---------------------------------------------------------------------- Message: 1 Date: Tue, 15 Aug 2006 01:09:25 -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: Rename ld_emailalert to ld_emailalert_send Signed-Off-By: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- ldirectord.in 15 Aug 2006 07:08:25 -0000 1.21 +++ ldirectord.in 15 Aug 2006 07:09:24 -0000 1.22 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.21 2006/08/15 07:08:25 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.22 2006/08/15 07:09:24 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -2754,14 +2754,14 @@ . "$ipvsadm_args $rforw -w 0"); &ld_log("Quiescent $log_args (Weight set to 0)"); } - &ld_emailalert("Quiescent $log_args (Weight set to 0)", - $v, $server_str, $currenttime); + &ld_emailalert_send("Quiescent $log_args (Weight set to 0)", + $v, $server_str, $currenttime); } else { &system_wrapper("$IPVSADM -d $ipvsadm_args"); &ld_log("Deleted $log_args"); - &ld_emailalert("Deleted $log_args", $v, - $server_str, $currenttime); + &ld_emailalert_send("Deleted $log_args", $v, + $server_str, $currenttime); } } @@ -2814,16 +2814,16 @@ get_forward_flag($or->{"forward"}) eq $rforw){ &system_wrapper("$IPVSADM -e $ipvsadm_args"); &ld_log("Restored $log_args (Weight set to $rwght)"); - &ld_emailalert("Restored $log_args " . - "(Weight set to $rwght)", - $v, $server_str, 0); + &ld_emailalert_send("Restored $log_args " . + "(Weight set to $rwght)", + $v, $server_str, 0); } } else { &system_wrapper("$IPVSADM -a $ipvsadm_args"); &ld_log("Added $log_args (Weight set to $rwght)"); - &ld_emailalert("Added $log_args (Weight set to $rwght)", - $v, $server_str, 0); + &ld_emailalert_send("Added $log_args (Weight set to $rwght)", + $v, $server_str, 0); } } @@ -3164,14 +3164,14 @@ } -# ld_emailalert +# ld_emailalert_send # Send email alerts per virtual server # pre: message: Message to email # post: message is emailed if emailalert defined for virtualserver # return: 0 on success # 1 on error -sub ld_emailalert +sub ld_emailalert_send { my ($emailsubject, $v, $server_str, $currenttime) = (@_); my $emailmsg; @@ -3233,7 +3233,7 @@ if ($currenttime - $es->{alerttime} < $frequency) { next; } - &ld_emailalert("Inaccessible real server: " . $server_str, + &ld_emailalert_send("Inaccessible real server: " . $server_str, $es->{v}, $server_str, $currenttime); } } ------------------------------ Message: 2 Date: Tue, 15 Aug 2006 01:10:20 -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: Update the emailalert_resend hash first In the case of a configurtation file update, it is possible that entries in the emailalert_resend hash will never be deleted. This should resolve this problem, by always emailalert_resend, regadless of if a message will atually be sent or not. Signed-Off-By: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- ldirectord.in 15 Aug 2006 07:09:24 -0000 1.22 +++ ldirectord.in 15 Aug 2006 07:10:20 -0000 1.23 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.22 2006/08/15 07:09:24 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.23 2006/08/15 07:10:20 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -3180,6 +3180,14 @@ my $to_addr; my $frequency; + if ($currenttime == 0 or $frequency == 0) { + delete $EMAILSTATUS{"$server_str"}; + } + else { + $EMAILSTATUS{$server_str}->{v} = $v; + $EMAILSTATUS{$server_str}->{alerttime} = $currenttime; + } + $to_addr = defined $v->{emailalert} ? $v->{emailalert} : $EMAILALERT; if ($to_addr eq "") { return 0; @@ -3200,14 +3208,6 @@ $status = 1; } - if ($currenttime == 0 or $frequency == 0) { - delete $EMAILSTATUS{"$server_str"}; - } - else { - $EMAILSTATUS{$server_str}->{v} = $v; - $EMAILSTATUS{$server_str}->{alerttime} = $currenttime; - } - return($status); } ------------------------------ Message: 3 Date: Tue, 15 Aug 2006 01:11:09 -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: Remove " x " from quescent log messages This is just an artifact from some older, more verbose, logging Signed-Off-By: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- ldirectord.in 15 Aug 2006 07:10:20 -0000 1.23 +++ ldirectord.in 15 Aug 2006 07:11:09 -0000 1.24 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.23 2006/08/15 07:10:20 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.24 2006/08/15 07:11:09 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -2738,8 +2738,7 @@ if(defined($old_rservice)) { $log_args .= "mapped from $old_rservice " } - $log_args .= "(" #. scalar(%{$v->{real_status}}) - . " x $virtual_str)"; + $log_args .= "($virtual_str)"; my $server_str=$rservice . " " . $virtual_str; my $currenttime=time(); @@ -2799,7 +2798,7 @@ . " -r $rservice $rforw -w $rwght"; $log_args = "$tag server: $rservice " . "(" #. scalar(%{$v->{real_status}}) - . " x " . &get_virtual($v) . ")"; + . &get_virtual($v) . ")"; #if the server exists then restore its weight # otherwise add the server ------------------------------ Message: 4 Date: Tue, 15 Aug 2006 01:12:10 -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: Consolidate duplicated quiescent log into one instance Signed-Off-By: Simon Horman <[EMAIL PROTECTED]> =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord.in,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- ldirectord.in 15 Aug 2006 07:11:09 -0000 1.24 +++ ldirectord.in 15 Aug 2006 07:12:10 -0000 1.25 @@ -1,5 +1,5 @@ #!/usr/bin/perl -my($VERSION)=(qw$Id: ldirectord.in,v 1.24 2006/08/15 07:11:09 horms Exp $)[2]; +my($VERSION)=(qw$Id: ldirectord.in,v 1.25 2006/08/15 07:12:10 horms Exp $)[2]; ###################################################################### # ldirectord http://www.vergenet.net/linux/ldirectord/ @@ -2746,13 +2746,12 @@ if (defined($or)) { &system_wrapper("$IPVSADM -e " . "$ipvsadm_args $rforw -w 0"); - &ld_log("Quiescent $log_args (Weight set to 0)"); } else { &system_wrapper("$IPVSADM -a " . "$ipvsadm_args $rforw -w 0"); - &ld_log("Quiescent $log_args (Weight set to 0)"); } + &ld_log("Quiescent $log_args (Weight set to 0)"); &ld_emailalert_send("Quiescent $log_args (Weight set to 0)", $v, $server_str, $currenttime); } ------------------------------ _______________________________________________ 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 39 ********************************************