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: linux-ha by andrew from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: ldirectord by horms from 
      (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Tue, 15 Aug 2006 02:26:12 -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:
Have the supervised directive take yes and no as arguments

Other global switches, such as quiescent, take yes and no as their only
valid options. Supervised however just has to be present, and can
actually have any trailing garbage.

This patch resolves this indescrepancy by allowing supervised to take
yes and no as arguemnts. For backwards compatibility purposes,
supervised followed by any ammount of whitespace (including none)
is treated as "supervised = yes", and a warning is logged.
supervised with trailing garbage is now an error.

This patch also changes where $SUPERVISED is intialised
from inside read_config, to global. This should not be a problem,
but I am noting it here just in case.

Backport of 1.159 (ldirectord.in 1.15)

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

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.62
retrieving revision 1.77.2.63
diff -u -3 -r1.77.2.62 -r1.77.2.63
--- ldirectord  15 Aug 2006 08:24:52 -0000      1.77.2.62
+++ ldirectord  15 Aug 2006 08:26:12 -0000      1.77.2.63
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.62 2006/08/15 08:24:52 horms Exp 
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.63 2006/08/15 08:26:12 horms Exp 
$)[2];
 
 ######################################################################
 # ldirectord                 http://www.vergenet.net/linux/ldirectord/
@@ -195,13 +195,13 @@
 the named I<configuration>.
 
 
-B<supervised>
+B<supervised = >B<yes>|B<no>
 
-If this directive is specified, the daemon does not go into background mode.
+If I<yes>, then ldirectord does not go into background mode.
 All log-messages are redirected to stdout instead of a logfile.
 This is useful to run B<ldirectord> supervised from daemontools.
 See http://untroubled.org/rpms/daemontools/ or http://cr.yp.to/daemontools.html
-for details.
+for details. Default is no
 
 
 B<quiescent = >[B<yes>|B<no>]
@@ -461,6 +461,7 @@
 $LD_TERM_CALLED   = 0;
 $NEGOTIATETIMEOUT = 0;
 $RUNPID           = "/var/run/ldirectord";
+$SUPERVISED       = "no";
 $QUIESCENT        = "yes";
 $EMAILALERT      = "";
 $EMAILALERTFREQ          = 0;
@@ -680,7 +681,7 @@
        }
 
        # Run as daemon
-       if ($SUPERVISED || $opt_d) {
+       if ($SUPERVISED eq "yes" || $opt_d) {
                &ld_log("Starting Linux Director v$VERSION with pid: $$");
         } else {
                &ld_log("Starting Linux Director v$VERSION as daemon");
@@ -774,7 +775,6 @@
        undef $CALLBACK;
        undef %LD_INSTANCE;
        undef $checksum;
-       $SUPERVISED = 0;
        $stattime = 0;
        my %virtual_seen;
        open(CFGFILE, "<$CONFIG") or
@@ -1057,7 +1057,20 @@
                } elsif ($_ =~ /^execute\s*=\s*(.*)/) {
                        $LD_INSTANCE{$1} = 1;
                } elsif ($_ =~ /^supervised/) {
-                       $SUPERVISED = 1;
+                       if (($_ =~ /^supervised\s*=\s*(.*)/) and
+                           ($1 eq "yes" || $1 eq "no")) {
+                               $SUPERVISED = $1;
+                       }
+                       elsif ($_ =~ /^supervised\s*$/) {
+                               $SUPERVISED = "yes";
+                               &config_warn($line,
+                                       "please update your config not to " .
+                                       "use a bare supervised directive");
+                       }
+                       else {
+                               &config_error($line,
+                                       "supervised must be 'yes' or 'no'");
+                       }
                } elsif ($_ =~ /^quiescent\s*=\s*(.*)/) {
                        ($1 eq "yes" || $1 eq "no")
                            or &config_error($line, 
@@ -3024,7 +3037,7 @@
 #         1 on error
 sub ld_openlog
 {
-       if ($opt_d or $SUPERVISED) {
+       if ($opt_d or $SUPERVISED eq "yes") {
                # Instantly do nothing
                return(0);
        }       
@@ -3062,7 +3075,7 @@
        chomp $message;
        if ($opt_d) {
                print STDERR "$message\n";
-       } elsif ($SUPERVISED) {
+       } elsif ($SUPERVISED eq "yes") {
                print "[$now] $message\n";
        } elsif ( $LDIRLOG =~ /^\/(.*)/ ) {
                unless (open(LOGFILE, ">>$LDIRLOG")




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

Message: 2
Date: Tue, 15 Aug 2006 02:26:22 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: linux-ha by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Module  : linux-ha

Dir     : linux-ha


Modified Files:
        heartbeat.spec.in 


Log Message:
Add new file to be distributed

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat.spec.in,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -3 -r1.199 -r1.200
--- heartbeat.spec.in   15 Aug 2006 07:44:30 -0000      1.199
+++ heartbeat.spec.in   15 Aug 2006 08:26:21 -0000      1.200
@@ -1,4 +1,4 @@
-#      $Id: heartbeat.spec.in,v 1.199 2006/08/15 07:44:30 horms Exp $
+#      $Id: heartbeat.spec.in,v 1.200 2006/08/15 08:26:21 andrew Exp $
 
 %define _unpackaged_files_terminate_build 1
 %define _missing_doc_files_terminate_build 1
@@ -1391,6 +1391,7 @@
 @sbindir@/crm_diff 
 @sbindir@/crm_uuid
 @sbindir@/crm_mon 
[EMAIL PROTECTED]@/ocf-tester
 @sbindir@/iso8601                      
 @sbindir@/crm_master 
 @sbindir@/crm_standby




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

Message: 3
Date: Tue, 15 Aug 2006 02:27:07 -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:
Document parameter defaults more clearly

Backport of 1.160 (ldirectord.in 1.16)

Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/Attic/ldirectord,v
retrieving revision 1.77.2.63
retrieving revision 1.77.2.64
diff -u -3 -r1.77.2.63 -r1.77.2.64
--- ldirectord  15 Aug 2006 08:26:12 -0000      1.77.2.63
+++ ldirectord  15 Aug 2006 08:27:07 -0000      1.77.2.64
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-my($VERSION)=(qw$Id: ldirectord,v 1.77.2.63 2006/08/15 08:26:12 horms Exp 
$)[2];
+my($VERSION)=(qw$Id: ldirectord,v 1.77.2.64 2006/08/15 08:27:07 horms Exp 
$)[2];
 
 ######################################################################
 # ldirectord                 http://www.vergenet.net/linux/ldirectord/
@@ -108,8 +108,11 @@
 B<checktimeout = >I<n>
 
 Timeout in seconds for connect checks. If the timeout is exceeded then the
-real server is declared dead.  Default is 5 seconds. If defined in virtual
-server section then the global value is overridden.
+real server is declared dead.  
+
+If defined in virtual server section then the global value is overridden.
+
+Default: 5 seconds
 
 B<connecttimeout = >I<n>
 
@@ -117,13 +120,17 @@
 
 B<negotiatetimeout = >I<n>
 
-Timeout in seconds for negotiate checks. Default is defined by the
-operating system. If defined in virtual server section then the global
-value is overridden.
+Timeout in seconds for negotiate checks. 
+
+If defined in virtual server section then the global value is overridden.
+
+Default: defined by the operating system
 
 B<checkinterval = >I<n>
 
-Defines the number of second between server checks. Default is 10 seconds.
+Defines the number of second between server checks.
+
+Default: 10 seconds
 
 B<checkcount = >I<n>
 
@@ -131,15 +138,18 @@
 to have failed. Only works with ping checks. Note that the
 checktimeout is additive, so if checkcount is 3 and checktimeout is 2
 seconds, then a total of 6 seconds worth of timeout will occur becore
-the check fails. Default is 1.
+the check fails. 
+
+Default: 1
 
 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
 changed on disk and its modification time (mtime) is newer than the
-previous version, the configuration is automatically reloaded.  Default is
-no.
+previous version, the configuration is automatically reloaded.
+
+Default: no
 
 B<callback = ">I</path/to/callback>B<">
 
@@ -168,7 +178,7 @@
 An alternative logfile might be specified with this directive. If the logfile
 does not have a leading '/', it is assumed to be a syslog(3) facility name.
 
-The default is to log directly to the file I</var/log/ldirectord.log>.
+Default: log directly to the file I</var/log/ldirectord.log>.
 
 
 B<emailalert = ">I<emailaddress>B<">
@@ -179,14 +189,16 @@
 using any of the built-in methods. See perldoc Mail::Mailer for more info on
 methods.
 
-B<emailalertfreq => I<n>
 
+B<emailalertfreq => I<n>
 
 Delay in seconds between repeating email alerts while any given real server
-in the virtual service remains inaccessible.  A setting of zero seconds will
-inhibit the repeating alerts.  Default setting is zero.  The email timing
-accuracy of this setting is dependent on the number of seconds defined in
-the checkinterval configuration option.
+in the virtual service remains inaccessible.  A setting of zero seconds
+will inhibit the repeating alerts. The email timing accuracy of this
+setting is dependent on the number of seconds defined in the checkinterval
+configuration option.
+
+Default: 0
 
 
 B<execute = ">I<configuration>B<">
@@ -201,7 +213,9 @@
 All log-messages are redirected to stdout instead of a logfile.
 This is useful to run B<ldirectord> supervised from daemontools.
 See http://untroubled.org/rpms/daemontools/ or http://cr.yp.to/daemontools.html
-for details. Default is no
+for details.
+
+Default: I<no>
 
 
 B<quiescent = >[B<yes>|B<no>]
@@ -221,6 +235,8 @@
 This directive may also appear within a virtual server, in which
 case it will overide the global fallback server, if set.
 
+Default: I<yes>
+
 
 =head2 Section virtual
 
@@ -265,16 +281,51 @@
 B<service = 
ftp>|B<smtp>|B<http>|B<pop>|B<pops>|B<nntp>|B<imap>|B<imaps>|B<ldap>|B<https>|B<dns>|B<mysql>|B<pgsql>|B<sip>|B<none>
 
 The type of service to monitor when using checktype=negotiate. None denotes
-a service that will not be monitored. If the port specfied for the virtual
-server is 21, 25, 53, 80, 110, 119, 143, 389, 443, 3306, 5432 or 5060 then
-the default is B<ftp>, B<smtp>, B<dns>, B<http>, B<pop>, B<pops>, B<nntp>,
-B<imap>, <B<imaps>, B<ldap>, B<https>, B<mysql>, B<pgsql> or B<sip> 
respectivly.
-Otherwise the default service is B<none>.
+a service that will not be monitored. 
+
+
+Default:
+
+=over 4
+
+=item * Virtual server port is 21: ftp
+
+=item * Virtual server port is 25: smtp
+
+=item * Virtual server port is 53: dns
+
+=item * Virtual server port is 80: http
+
+=item * Virtual server port is 110: pop
+
+=item * Virtual server port is 119: nntp
+
+=item * Virtual server port is 143: imap
+
+=item * Virtual server port is 389: ldap
+
+=item * Virtual server port is 443: https
+
+=item * Virtual server port is 993: imaps
+
+=item * Virtual server port is 995: pops
+
+=item * Virtual server port is 3306: mysql
+
+=item * Virtual server port is 5432: pgsql
+
+=item * Virtual server port is 5060: sip
+
+=item * Otherwise: none
+
+=back 4
+
 
 B<checkport = >I<n>
 
 Number of port to monitor. Sometimes check port differs from service port.
-Default is port specified for the real server.
+
+Default: port specified for each real server
 
 B<request = ">I<uri to requested object>B<">
 
@@ -308,6 +359,8 @@
 the request-string. GET is the method used by default if the parameter is
 not set. If HEAD is used, the receive-string should be unset.
 
+Default: GET
+
 B<virtualhost = ">I<hostname>B<">
 
 Used when using a negotiate check with HTTP or HTTPS. Sets the host header
@@ -318,21 +371,22 @@
 
 B<login = ">I<username>B<">
 
-Username to use to login to FTP, IMAP, LDAP, MySQL, POP, PostgreSQL
-and SIP servers.
+Username to use to login to FTP, IMAP, LDAP, MySQL, POP, PostgreSQL.
+For SIP, the username is used as both the to and from address for an
+OPTIONS query.
+
+Default:
 
 =over 4
 
-=item * For FTP, the default is anonymous.
+=item * FTP: Anonymous
 
-=item * For a MySQL and PostgreSQL, the username must be provided.  
+=item * MySQL and PostgreSQL: Must be specified in the configuration
 
-=item * For SIP the username is used as both the to and from address
-       for an OPTIONS query. If unset it defaults to
-       ldirectord\@<hostname>, hostname is derived as per the passwd
-       option below.
+=item * SIP: ldirectord\@<hostname>, hostname is derived as per the passwd
+        option below.
 
-=item * For all other services, the default is the empty string, in which
+=item * Otherwise: empty string, which denotes that
        case authentication will not be attempted.
 
 =back 4
@@ -342,13 +396,15 @@
 Password to use to login to FTP, IMAP, LDAP, MySQL, POP, PostgreSQL
 and SIP servers.
 
+Default:
+
 =over 4
 
-=item * The default is for FTP is ldirectord\@<hostname>,
+=item * FTP: ldirectord\@<hostname>,
        where hostname is the environment variable HOSTNAME evaluated at
        run time, or sourced from uname if unset.
 
-=item * The default for all other services is an empty password.
+=item * Otherwise: empty string.
        In the case of LDAP, MySQL and PostgreSQL this means
        that authentication will not be performed.
 
@@ -363,10 +419,12 @@
 
 B<scheduler => I<scheduler_name>
 
-Scheduler to be used by LVS for loadbalancing. Default is "wrr".
+Scheduler to be used by LVS for loadbalancing.
 For an information on the available sehedulers please see
 the ipvsadm(8) man page.
 
+Default: "wrr"
+
 B<persistent => I<n>
 
 Number of seconds for persistent client connections.
@@ -378,8 +436,21 @@
 B<protocol = tcp>|B<udp>|B<fwm>
 
 Protocol to be used. If the virtual is specified as an IP address and port
-then it must be one of tcp or udp and will default to tcp. If a firewall
-mark then the protocol must be fwm, which is the default.
+then it must be one of tcp or udp. If a firewall
+mark then the protocol must be fwm.
+
+Default:
+
+=over 4
+
+=item * Virtual is an IP address and port, and the port is not 53: tcp
+
+=item * Virtual is an IP address and port, and the port is 53: udp
+
+=item * Virtual is a firewall mark: fwm
+
+=back 4
+
 
 =head1 FILES
 




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

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

Reply via email to