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: linux-ha by alan from 
      ([email protected])
   2. Linux-HA CVS: linux-ha by alan from 
      ([email protected])
   3. Linux-HA CVS: linux-ha by alan from 
      ([email protected])
   4. Linux-HA CVS: heartbeat by lars from 
      ([email protected])
   5. Linux-HA CVS: ldirectord by lars from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Mon,  7 Aug 2006 14:42:43 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: linux-ha by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Module  : linux-ha

Dir     : linux-ha


Modified Files:
        configure.in 


Log Message:
Tried to fix problem with lynx not really being found...

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/configure.in,v
retrieving revision 1.542
retrieving revision 1.543
diff -u -3 -r1.542 -r1.543
--- configure.in        7 Aug 2006 18:43:40 -0000       1.542
+++ configure.in        7 Aug 2006 20:42:42 -0000       1.543
@@ -10,7 +10,7 @@
 AC_INIT(heartbeat.spec.in)
 
 AC_CONFIG_AUX_DIR(.)
-AC_REVISION($Revision: 1.542 $) dnl cvs revision
+AC_REVISION($Revision: 1.543 $) dnl cvs revision
 AC_CANONICAL_HOST
 
 
@@ -383,7 +383,11 @@
 
 AC_SYS_LARGEFILE
 
-AC_PATH_PROGS(HTML2TXT, lynx, lynx)
+AC_PATH_PROGS(HTML2TXT, lynx, w3m)
+case $HTML2TXT in
+  */*) ;;
+  *)   HTML2TXT="";;
+esac
 AC_PATH_PROGS(POD2MAN, pod2man, pod2man)
 AC_PATH_PROGS(ROUTE, route)
 AC_PATH_PROGS(RPM, rpmbuild)




------------------------------

Message: 2
Date: Tue,  8 Aug 2006 05:42:34 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: linux-ha by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Module  : linux-ha

Dir     : linux-ha


Modified Files:
        heartbeat.spec.in 


Log Message:
Noted a known bug in the release notes.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat.spec.in,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -3 -r1.194 -r1.195
--- heartbeat.spec.in   7 Aug 2006 16:59:57 -0000       1.194
+++ heartbeat.spec.in   8 Aug 2006 11:42:33 -0000       1.195
@@ -1,4 +1,4 @@
-#      $Id: heartbeat.spec.in,v 1.194 2006/08/07 16:59:57 lars Exp $
+#      $Id: heartbeat.spec.in,v 1.195 2006/08/08 11:42:33 alan Exp $
 
 %define _unpackaged_files_terminate_build 1
 %define _missing_doc_files_terminate_build 1
@@ -139,6 +139,12 @@
     - Dummy RA now OCF compliant.
     - Fix pingd RA metadata to be XML compliant.
     - Actually use RPMREL in the spec file.
+  + KNOWN BUGS:
+    - When running a cluster of nodes of very different speeds temporary
+      membership anomalies may occasionally be seen.  These correct
+      themselves and don't appear to be harmful.  They typically
+      include a message something like this:
+      WARN: Ignoring HA message (op=vote) from XXX: not in our membership list
     
 * Thu Jul 13 2006  Alan Robertson <[EMAIL PROTECTED]> (see doc/AUTHORS file)
 + Version 2.0.6 - bug fix and a few enhancements release




------------------------------

Message: 3
Date: Tue,  8 Aug 2006 06:41:54 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: linux-ha by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Module  : linux-ha

Dir     : linux-ha


Modified Files:
        configure.in 


Log Message:
Minor tweak to make configure happy

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/configure.in,v
retrieving revision 1.543
retrieving revision 1.544
diff -u -3 -r1.543 -r1.544
--- configure.in        7 Aug 2006 20:42:42 -0000       1.543
+++ configure.in        8 Aug 2006 12:41:54 -0000       1.544
@@ -10,7 +10,7 @@
 AC_INIT(heartbeat.spec.in)
 
 AC_CONFIG_AUX_DIR(.)
-AC_REVISION($Revision: 1.543 $) dnl cvs revision
+AC_REVISION($Revision: 1.544 $) dnl cvs revision
 AC_CANONICAL_HOST
 
 
@@ -383,7 +383,7 @@
 
 AC_SYS_LARGEFILE
 
-AC_PATH_PROGS(HTML2TXT, lynx, w3m)
+AC_PATH_PROGS(HTML2TXT, lynx w3m)
 case $HTML2TXT in
   */*) ;;
   *)   HTML2TXT="";;




------------------------------

Message: 4
Date: Tue,  8 Aug 2006 07:29:34 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by lars from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : lars
Host    : 
Project : linux-ha
Module  : heartbeat

Dir     : linux-ha/heartbeat/init.d


Modified Files:
        heartbeat.in 


Log Message:
Consolidate check and make it work on Solaris too (hopefully).

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/init.d/heartbeat.in,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- heartbeat.in        13 Jul 2006 16:23:55 -0000      1.43
+++ heartbeat.in        8 Aug 2006 13:29:34 -0000       1.44
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: heartbeat.in,v 1.43 2006/07/13 16:23:55 alan Exp $
+#      $Id: heartbeat.in,v 1.44 2006/08/08 13:29:34 lars Exp $
 #
 # heartbeat     Start high-availability services
 #
@@ -121,9 +121,9 @@
   exit 0
 fi
 
-CheckBool() {
-  case `echo "$1" | tr A-Z a-z` in
-    y|yes|enable|on|true|1)    true;;
+CrmEnabled() {
+  case `ha_parameter crm | tr A-Z a-z` in
+    y|yes|enable|on|true|1|manual)     true;;
     *)                         false;;
   esac
 }
@@ -261,7 +261,7 @@
   EchoNoNl "Starting High-Availability services: "
 
   if
-    CheckBool "`ha_parameter crm`" || [  "`ha_parameter crm`" == "manual" ]
+    CrmEnabled
   then
     : OK
   else
@@ -450,6 +450,9 @@
 #
 #
 #  $Log: heartbeat.in,v $
+#  Revision 1.44  2006/08/08 13:29:34  lars
+#  Consolidate check and make it work on Solaris too (hopefully).
+#
 #  Revision 1.43  2006/07/13 16:23:55  alan
 #  Patch from Serge Dubrouski for not starting any optional components.
 #




------------------------------

Message: 5
Date: Tue,  8 Aug 2006 09:56:40 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: ldirectord by lars from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : lars
Host    : 
Project : linux-ha
Module  : ldirectord

Dir     : linux-ha/ldirectord


Modified Files:
        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.

Signed-off-by: Simon Horman <[EMAIL PROTECTED]>


===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -3 -r1.141 -r1.142
--- ldirectord  6 Jul 2006 04:51:45 -0000       1.141
+++ ldirectord  8 Aug 2006 15:56:39 -0000       1.142
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.141 2006/07/06 04:51:45 horms Exp $)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.142 2006/08/08 15:56:39 lars 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




------------------------------

_______________________________________________
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 7
*******************************************

Reply via email to