Send Linux-ha-cvs mailing list submissions to
[email protected]
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: debian by horms from
([email protected])
2. Linux-HA CVS: debian by horms from
([email protected])
3. Linux-HA CVS: ldirectord by horms from
([email protected])
4. Linux-HA CVS: ldirectord by horms from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 15 Aug 2006 01:52:36 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: debian by horms from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : horms
Host :
Project : linux-ha
Module : debian
Dir : linux-ha/debian
Modified Files:
changelog
Log Message:
debian: changelog for 2.0.7-1 (released)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/debian/changelog,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- changelog 15 Aug 2006 07:52:13 -0000 1.70
+++ changelog 15 Aug 2006 07:52:35 -0000 1.71
@@ -1,3 +1,13 @@
+heartbeat-2 (2.0.7-1) unstable; urgency=low
+
+ * New Upstream
+ * Dropped the following patches as they are now upstream
+ - ldirectord-1.141-emailalert-1-quiet.patch (introduced in 2.0.6-2)
+ - ldirectord-1.141-readline_workaround.patch (introduced in 2.0.6-2)
+ - CVE-2006-3821.patch (introduced in 2.0.6-2)
+
+ -- Simon Horman <[EMAIL PROTECTED]> Mon, 14 Aug 2006 19:00:13 +0900
+
heartbeat-2 (2.0.6-2) unstable; urgency=high
* ldirectord-1.141-emailalert-1-quiet.patch
------------------------------
Message: 2
Date: Tue, 15 Aug 2006 01:53:09 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: debian by horms from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : horms
Host :
Project : linux-ha
Module : debian
Dir : linux-ha/debian
Modified Files:
changelog
Log Message:
debian: changelog for 2.0.8-1 (unreleased)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/debian/changelog,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- changelog 15 Aug 2006 07:52:35 -0000 1.71
+++ changelog 15 Aug 2006 07:53:08 -0000 1.72
@@ -1,3 +1,13 @@
+heartbeat-2 (2.0.8-1) unstable; urgency=low
+
+ * New Upstream
+ * errata: CVE-2006-3121 was incorrectly refered to as CVE-2006-3821 in
+ the changelog for 2.0.6-2 and 2.0.7-1
+ * Dropped the following patches as they are now upstream
+ - ldirectord-1.141-emailalert-2-global.patch (introduced in 2.0.6-2)
+
+ -- Simon Horman <[EMAIL PROTECTED]> Mon, 14 Aug 2006 19:09:23 +0900
+
heartbeat-2 (2.0.7-1) unstable; urgency=low
* New Upstream
------------------------------
Message: 3
Date: Tue, 15 Aug 2006 01:58:20 -0600 (MDT)
From: [email protected]
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:
Tag: STABLE_1_2
ldirectord
Log Message:
Don't send email alerts if emailalert is not set
The existing code always tries to send alerts, which is silly at best.
This patch also cleans up the email handling code a bit to isolate
the logic if to send or not.
Backport of 1.142
Signed-off-by: Simon Horman <[EMAIL PROTECTED]>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.51
retrieving revision 1.77.2.52
diff -u -3 -r1.77.2.51 -r1.77.2.52
--- ldirectord 6 Jul 2006 04:52:09 -0000 1.77.2.51
+++ ldirectord 15 Aug 2006 07:58:20 -0000 1.77.2.52
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.51 2006/07/06 04:52:09 horms Exp
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.52 2006/08/15 07:58:20 horms Exp
$)[2];
######################################################################
# ldirectord http://www.vergenet.net/linux/ldirectord/
@@ -1789,13 +1789,7 @@
sleep $CHECKINTERVAL;
}
- my $currenttime=time();
- foreach my $es (@EMAILSTATUS){
- if (($es->{alerttime} > 0 ) && ($currenttime -
$es->{alerttime} >= $es->{emailalertfreq})){
- &ld_emailalert("Inaccessible real server:
$es->{server}", $es->{emailalert});
- &ld_set_email_status($es->{server},
$currenttime);
- }
- }
+ ld_emailalert_resend();
}
}
@@ -2594,18 +2588,14 @@
. "$ipvsadm_args $rforw -w 0");
&ld_log("Quiescent $log_args (Weight set to 0)");
}
- if(defined($$v{emailalert})) {
- &ld_emailalert("Quiescent $log_args (Weight set to
0)",$$v{emailalert});
- &ld_set_email_status($currentserver, $currenttime);
- }
+ &ld_emailalert("Quiescent $log_args (Weight set to 0)",
+ $$v{emailalert}, $currentserver, $currenttime);
}
else {
&system_wrapper("$IPVSADM -d $ipvsadm_args");
&ld_log("Deleted $log_args");
- if(defined($$v{emailalert})) {
- &ld_emailalert("Deleted $log_args",$$v{emailalert});
- &ld_set_email_status($currentserver, $currenttime);
- }
+ &ld_emailalert("Deleted $log_args",$$v{emailalert},
+ $currentserver, $currenttime);
}
}
@@ -2659,19 +2649,16 @@
get_forward_flag($or->{"forward"}) eq $rforw){
&system_wrapper("$IPVSADM -e $ipvsadm_args");
&ld_log("Restored $log_args (Weight set to $rwght)");
- if(defined($$v{emailalert})) {
- &ld_emailalert("Restored $log_args (Weight set
to $rwght)",$$v{emailalert});
- &ld_set_email_status($currentserver, "0");
- }
+ &ld_emailalert("Restored $log_args " .
+ "(Weight set to $rwght)",
+ $$v{emailalert}, $currentserver, 0);
}
}
else {
&system_wrapper("$IPVSADM -a $ipvsadm_args");
&ld_log("Added $log_args (Weight set to $rwght)");
- if(defined($$v{emailalert})) {
- &ld_emailalert("Added $log_args (Weight set to
$rwght)",$$v{emailalert});
- &ld_set_email_status($currentserver, "0");
- }
+ &ld_emailalert("Added $log_args (Weight set to $rwght)",
+ $$v{emailalert}, $currentserver, 0);
}
}
@@ -2998,19 +2985,46 @@
# 1 on error
sub ld_emailalert
{
- my ($emailsubject,$emailto) = (@_);
- require Mail::Send;
+ my ($emailsubject, $emailto, $currentserver, $currenttime) = (@_);
my $emailmsg;
my $emailfh;
-
+ my $status = 0;
+
+ if ($emailto eq "") {
+ return 0;
+ }
+
+ use Mail::Send;
+
unless ($emailmsg = new Mail::Send Subject=>$emailsubject, To=>$emailto
and $emailfh = $emailmsg->open
and print $emailfh ""
and $emailfh->close) {
&ld_log("failed to send email message\n");
- return 1;
+ $status = 1;
+ }
+
+ &ld_set_email_status($currentserver, $currenttime);
+
+ return($status);
+}
+
+# ld_emailalert_resend
+# Resend email alerts as neccessary
+# pre: none
+# post: EMAILSTATUS array is updated and alears are sent as neccessary
+# return: none
+sub ld_emailalert_resend
+{
+ my $currenttime=time();
+ foreach my $es (@EMAILSTATUS){
+ if ($es->{alerttime} == 0 or
+ $currenttime - $es->{alerttime} < $es->{emailalertfreq}){
+ next;
+ }
+ &ld_emailalert("Inaccessible real server: " . $es->{server},
+ $es->{emailalert}, $es->{server}, $currenttime);
}
- return(0);
}
# ld_set_email_status
------------------------------
Message: 4
Date: Tue, 15 Aug 2006 01:59:41 -0600 (MDT)
From: [email protected]
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:
Tag: STABLE_1_2
ldirectord
Log Message:
realine wrapper that really returns lines
Net::FTP seems to set the input record separator ($\) to null
putting IO into slurp (whole file at a time, rather than line at a time)
mode. Net::FTP does this using local $\, which should mean
that the change doesn' effect code here, but it does. It also
seems to be imposible to turn it off, by say setting $\ back to '\n'
Perhaps there is more to this than meets the eye. Perhaps its a perl bug.
In any case, this should fix the problem.
This should not affect pid or config file parsing as they are called
before Net::FTP and as this appears to be a bit of a work around,
I'd rather use it in as few places as possible
Observed with perl v5.8.8 (Debian's perl 5.8.8-6)
Backport of 1.143
Signed-off-by: Simon Horman <[EMAIL PROTECTED]>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.52
retrieving revision 1.77.2.53
diff -u -3 -r1.77.2.52 -r1.77.2.53
--- ldirectord 15 Aug 2006 07:58:20 -0000 1.77.2.52
+++ ldirectord 15 Aug 2006 07:59:41 -0000 1.77.2.53
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.52 2006/08/15 07:58:20 horms Exp
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.53 2006/08/15 07:59:41 horms Exp
$)[2];
######################################################################
# ldirectord http://www.vergenet.net/linux/ldirectord/
@@ -1496,6 +1496,44 @@
}
}
+# ld_read_ipvsadm
+#
+# Net::FTP seems to set the input record separator ($\) to null
+# putting IO into slurp (whole file at a time, rather than line at a time)
+# mode. Net::FTP does this using local $\, which should mean
+# that the change doesn' effect code here, but it does. It also
+# seems to be imposible to turn it off, by say setting $\ back to '\n'
+# Perhaps there is more to this than meets the eye. Perhaps its a perl bug.
+# In any case, this should fix the problem.
+#
+# This should not affect pid or config file parsing as they are called
+# before Net::FTP and as this appears to be a bit of a work around,
+# I'd rather use it in as few places as possible
+#
+# Observed with perl v5.8.8 (Debian's perl 5.8.8-6)
+# -- Horms, 17th July 2005
+sub ld_readline
+{
+ my ($fd, $buf) = (@_);
+ my $line;
+
+ # Uncomment the following line to turn off this work around
+ # return readline($fd);
+
+ $line = shift @$buf;
+ if (defined $line) {
+ return $line . "\n";
+ }
+
+ push @$buf, split /\n/, readline($fd);
+
+ $line = shift @$buf;
+ if (defined $line) {
+ return $line . "\n";
+ }
+
+ return undef;
+}
# ld_read_ipvsadm
# Parses the output of "ipvsadm -L -n" and puts into a structure of
@@ -1540,28 +1578,35 @@
my %oldsrv;
my $real_service;
my $fwd;
+ my $buf = [];
+ my $fh;
+ my $line;
# read status of current ipvsadm -L -n
- unless(open(IPVS, "$IPVSADM -L -n |")){
+ unless(open($fh, "$IPVSADM -L -n 2>&1|")){
&ld_exit(1, "Could not run $IPVSADM -L -n: $!");
}
- $_ = <IPVS>; $_ = <IPVS>; $_ = <IPVS>;
- while (<IPVS>) {
- if ($_ =~
/(\w+)\s+(\d+\.\d+\.\d+\.\d+\:\d+|\d+)\s+(\w+)\s+persistent\s+(\d+)\s+mask\s+(.*)/)
{
+ # Skip the first three lines
+ $line = ld_readline($fh, $buf);
+ $line = ld_readline($fh, $buf);
+ $line = ld_readline($fh, $buf);
+
+ while ($line = ld_readline($fh, $buf)) {
+ if ($line =~
/(\w+)\s+(\d+\.\d+\.\d+\.\d+\:\d+|\d+)\s+(\w+)\s+persistent\s+(\d+)\s+mask\s+(.*)/)
{
$real_service = "$2 ".lc($1);
$oldsrv{"$real_service"} = {"real"=>{},
"scheduler"=>$3, "persistent"=>$4, "netmask"=>$5};
- } elsif ($_ =~
/(\w+)\s+(\d+\.\d+\.\d+\.\d+\:\d+|\d+)\s+(\w+)\s+persistent\s+(\d+)/) {
+ } elsif ($line =~
/(\w+)\s+(\d+\.\d+\.\d+\.\d+\:\d+|\d+)\s+(\w+)\s+persistent\s+(\d+)/) {
$real_service = "$2 ".lc($1);
$oldsrv{"$real_service"} = {"real"=>{},
"scheduler"=>$3, "persistent"=>$4};
- } elsif ($_ =~ /(\w+)\s+(\d+\.\d+\.\d+\.\d+\:\d+|\d+)\s+(\w+)/)
{
+ } elsif ($line =~
/(\w+)\s+(\d+\.\d+\.\d+\.\d+\:\d+|\d+)\s+(\w+)/) {
$real_service = "$2 ".lc($1);
$oldsrv{"$real_service"} = {"real"=>{},
"scheduler"=>$3};
} else {
next;
}
- while(<IPVS>) {
- last unless $_ =~ /
->\s+(\d+\.\d+\.\d+\.\d+\:\d+)\s+(\w+)\s+(\d+)/;
+ while ($line = ld_readline($fh, $buf)) {
+ last unless $line =~ /
->\s+(\d+\.\d+\.\d+\.\d+\:\d+)\s+(\w+)\s+(\d+)/;
if ($2 eq "Route") {
$fwd = "gate";
} elsif ($2 eq "Tunnel") {
@@ -1573,7 +1618,7 @@
}
redo;
}
- close(IPVS);
+ close($fh);
return(\%oldsrv);
}
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 33, Issue 47
********************************************