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 02:20: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:
      Tag: STABLE_1_2
        ldirectord 


Log Message:
Make global and non-glbal invalid timeout messages consistent

Also make the global checkinterval (no non-global variant exists)
consistent with thsi scheme.

Backport of 1.156 (ldirectord.in 1.12)

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

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.58
retrieving revision 1.77.2.59
diff -u -3 -r1.77.2.58 -r1.77.2.59
--- ldirectord  15 Aug 2006 08:19:03 -0000      1.77.2.58
+++ ldirectord  15 Aug 2006 08:20:20 -0000      1.77.2.59
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.58 2006/08/15 08:19:03 horms Exp 
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.59 2006/08/15 08:20:20 horms Exp 
$)[2];
 
 ######################################################################
 # ldirectord                 http://www.vergenet.net/linux/ldirectord/
@@ -1003,19 +1003,19 @@
                next if ($_ =~ /^\s*$/ || $_ =~ /^\s*#/);
                if ($_ =~ /^checktimeout\s*=\s*(.*)/) {
                        ($1 =~ /(\d+)/ && $1 && $1>0) or &config_error($line, 
-                                       "invalid timeout value");
+                                       "invalid check timeout value");
                        $CHECKTIMEOUT = $1;
                } elsif ($_ =~ /^connecttimeout\s*=\s*(.*)/) {
                        ($1 =~ /(\d+)/ && $1 && $1>0) or &config_error($line, 
-                                       "invalid timeout value");
+                                       "invalid connect timeout value");
                        $CONNECTTIMEOUT = $1;
                } elsif ($_ =~ /^negotiatetimeout\s*=\s*(.*)/) {
                        ($1 =~ /(\d+)/ && $1 && $1>0) or &config_error($line, 
-                                       "invalid timeout value");
+                                       "invalid negotiate timeout value");
                        $NEGOTIATETIMEOUT = $1;
                } elsif ($_ =~ /^checkinterval\s*=\s*(.*)/) {
                        $1 =~ /(\d+)/ && $1 or &config_error($line, 
-                                       "invalid checkinterval value");
+                                       "invalid check interval value");
                        $CHECKINTERVAL = $1;
                } elsif ($_ =~ /^fallback\s*=\s*(.*)/) {
                         my $tcp = &ld_gethostservbyname($1, "tcp");




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

Message: 2
Date: Tue, 15 Aug 2006 02:21:26 -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:
      Tag: STABLE_1_2
        ldirectord 


Log Message:
Make checkcount global as well as per-virtual

The documentatin lists checkcount as global, but actually the
code only allows it to be per-virtual. 

This patch fixes this inconsistency by allowing checkcount
to be global and overriden by a per-virtual setting, in
the maner of checktimeout and friends.

Backport of 1.154 (ldirectord.in 1.12)

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

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.59
retrieving revision 1.77.2.60
diff -u -3 -r1.77.2.59 -r1.77.2.60
--- ldirectord  15 Aug 2006 08:20:20 -0000      1.77.2.59
+++ ldirectord  15 Aug 2006 08:21:26 -0000      1.77.2.60
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.59 2006/08/15 08:20:20 horms Exp 
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.60 2006/08/15 08:21:26 horms Exp 
$)[2];
 
 ######################################################################
 # ldirectord                 http://www.vergenet.net/linux/ldirectord/
@@ -417,6 +417,7 @@
            $NEGOTIATETIMEOUT
            $RUNPID
            $CHECKTIMEOUT
+           $CHECKCOUNT
            $QUIESCENT
            $EMAILALERT
            $EMAILALERTFREQ
@@ -450,6 +451,7 @@
 $AUTOCHECK        = "no";
 $CHECKINTERVAL    = 10;
 $CHECKTIMEOUT     = 5;
+$CHECKCOUNT       = 1;
 $CONNECTTIMEOUT   = 0;
 $LDIRECTORD       = ld_find_cmd("ldirectord", 1);
 if (! defined $LDIRECTORD) {
@@ -823,7 +825,7 @@
                        $vsrv{database} = "";
                        $vsrv{checktimeout} = -1;
                        $vsrv{connecttimeout} = -1;
-                       $vsrv{checkcount} = 1;
+                       $vsrv{checkcount} = -1;
                        $vsrv{negotiatetimeout} = -1;
                        $vsrv{num_connects} = 0;
                        $vsrv{httpmethod} = "GET";
@@ -1017,6 +1019,10 @@
                        $1 =~ /(\d+)/ && $1 or &config_error($line, 
                                        "invalid check interval value");
                        $CHECKINTERVAL = $1;
+               } elsif ($_ =~ /^checkcount\s*=\s*(.*)/) {
+                       $1 =~ /(\d+)/ && $1 or &config_error($line, 
+                                       "invalid check count value");
+                       $CHECKCOUNT = $1;
                } elsif ($_ =~ /^fallback\s*=\s*(.*)/) {
                         my $tcp = &ld_gethostservbyname($1, "tcp");
                        my $udp = &ld_gethostservbyname($1, "udp");
@@ -1516,6 +1522,9 @@
                if ($$v{negotiatetimeout} < 0) {
                        $$v{negotiatetimeout} = $$v{checktimeout};
                }
+               if ($$v{checkcount} < 0) {
+                       $$v{checkcount} = $CHECKCOUNT;
+               }
        }
 }
 




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

Message: 3
Date: Tue, 15 Aug 2006 02:23:15 -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:
      Tag: STABLE_1_2
        ldirectord 


Log Message:
Consolidate string handling in config_error

Backport of 1.157 (ldirectord.in 1.13)

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

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.60
retrieving revision 1.77.2.61
diff -u -3 -r1.77.2.60 -r1.77.2.61
--- ldirectord  15 Aug 2006 08:21:26 -0000      1.77.2.60
+++ ldirectord  15 Aug 2006 08:23:15 -0000      1.77.2.61
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.60 2006/08/15 08:21:26 horms Exp 
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.61 2006/08/15 08:23:15 horms Exp 
$)[2];
 
 ######################################################################
 # ldirectord                 http://www.vergenet.net/linux/ldirectord/
@@ -1437,18 +1437,16 @@
         chomp($msg);
         $msg .= "\n";
 
+       my $msg_prefix = "Error [$pid]";
+       if ($line > 0) {
+               $msg_prefix .= " reading file $CONFIG at line $line";
+       }
+       $msg = "$msg_prefix: $msg"
+
        if ($opt_d || $initializing==1) {
-               if ($line>0) {
-                       print STDERR "Error [$pid] reading file $CONFIG at line 
$line: $msg";
-               } else {
-                       print STDERR "Error: $msg\n";
-               }
+               print STDERR $msg;
        } else {
-               if ($line>0) {
-                       &ld_log("Error [$pid] reading file $CONFIG at line 
$line: $msg");
-               } else {
-                        &ld_log("Error: $msg\n");
-               }
+               &ld_log("$msg");
        }
        if ($initializing) {
                &ld_rm_file("$RUNPID.$CFGNAME.pid");




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

Message: 4
Date: Tue, 15 Aug 2006 02:24:52 -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:
      Tag: STABLE_1_2
        ldirectord 


Log Message:
Add config_warn

Backport of 1.158 (ldirectord 1.14)

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

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.61
retrieving revision 1.77.2.62
diff -u -3 -r1.77.2.61 -r1.77.2.62
--- ldirectord  15 Aug 2006 08:23:15 -0000      1.77.2.61
+++ ldirectord  15 Aug 2006 08:24:52 -0000      1.77.2.62
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.61 2006/08/15 08:23:15 horms Exp 
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.62 2006/08/15 08:24:52 horms Exp 
$)[2];
 
 ######################################################################
 # ldirectord                 http://www.vergenet.net/linux/ldirectord/
@@ -1430,24 +1430,41 @@
 }
 
 
-sub config_error
+sub __config_log
 {
-       my ($line, $msg) = @_;
+       my ($line, $prefix, $msg) = @_;
 
         chomp($msg);
         $msg .= "\n";
 
-       my $msg_prefix = "Error [$pid]";
+       my $msg_prefix = "$prefix [$pid]";
        if ($line > 0) {
                $msg_prefix .= " reading file $CONFIG at line $line";
        }
-       $msg = "$msg_prefix: $msg"
+       $msg = "$msg_prefix: $msg";
 
-       if ($opt_d || $initializing==1) {
+       if ($opt_d or $initializing==1) {
                print STDERR $msg;
-       } else {
+       } 
+       else {
                &ld_log("$msg");
        }
+}
+
+
+sub config_warn
+{
+       my ($line, $msg) = @_;
+
+       __config_log($line, "Warning", $msg);
+}
+
+
+sub config_error
+{
+       my ($line, $msg) = @_;
+
+       __config_log($line, "Error", $msg);
        if ($initializing) {
                &ld_rm_file("$RUNPID.$CFGNAME.pid");
                &ld_exit(2, "config_error: Configuration Error");




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

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

Reply via email to