[SCM] CTDB repository - branch master updated - ctdb-1.0.113-90-g06ae863

Ronnie Sahlberg sahlberg at samba.org
Wed Feb 10 20:10:33 MST 2010


The branch, master has been updated
       via  06ae8630dfe297e0d7ebcdbb43969170f3d06e20 (commit)
       via  8a1cb5dc1ddf82f3b9cbb23e40b3914b3d5c2783 (commit)
       via  19523fbb12db1ec1e5ee38de1b2d3b99a74c6ca4 (commit)
       via  2fb2eb0fd7396de33474ce43fe95c66a5784d05b (commit)
       via  a442668923d4d8f8d624e00138fe37d76d593d21 (commit)
       via  0406d406da70aaee7ad6aac236114905c5d03ed2 (commit)
       via  ee8b2e298351d05197a2e1494f3331433644c1e6 (commit)
       via  44696e15cdb23e7656d3bb0ead54f509495738a7 (commit)
       via  cb00f86752d276ef0ac4dad97f7b380439603286 (commit)
       via  9a9b36149042d4d8f455959582ec5c882162266a (commit)
       via  6b5a5bb62369284585057caf09f05d2d5e3b9927 (commit)
       via  a9aa2e06774e8cd59a86d3343d3da2a2769561b5 (commit)
      from  11e72356e849ed4cb315c942e30e9bcadc624f42 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 06ae8630dfe297e0d7ebcdbb43969170f3d06e20
Merge: 11e72356e849ed4cb315c942e30e9bcadc624f42 8a1cb5dc1ddf82f3b9cbb23e40b3914b3d5c2783
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Feb 11 14:08:41 2010 +1100

    Merge commit 'martins/master'

commit 8a1cb5dc1ddf82f3b9cbb23e40b3914b3d5c2783
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Feb 10 20:27:53 2010 +1100

    Test suite: Make "ctdb ip" test backward compatible with older ctdb versions.
    
    Recent updates to the test meant that it only worked with the latest
    ctdb versions.  This changes things so that we never bother matching
    the machine readable header, just the actual data in the output.  It
    also takes a slightly more liberal approach in massaging the human
    readable output to ensure it matches the machine readable output.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 19523fbb12db1ec1e5ee38de1b2d3b99a74c6ca4
Merge: 2fb2eb0fd7396de33474ce43fe95c66a5784d05b 144c69b633eeb17e120f962162feed6de3dc16a6
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Feb 10 20:24:28 2010 +1100

    Merge commit 'origin/master'

commit 2fb2eb0fd7396de33474ce43fe95c66a5784d05b
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Feb 5 15:30:39 2010 +1100

    onnode documentation - update documentation to reflect recent onnode changes.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit a442668923d4d8f8d624e00138fe37d76d593d21
Merge: 0406d406da70aaee7ad6aac236114905c5d03ed2 a7a86dafa4d88a6bbc6a71b77ed79a178fd802a6
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Feb 5 14:00:23 2010 +1100

    Merge branch 'master' of git://git.samba.org/sahlberg/ctdb

commit 0406d406da70aaee7ad6aac236114905c5d03ed2
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jan 22 17:19:12 2010 +1100

    eventscripts: stop loadconfig function from loading ctdb config file twice.
    
    If "$1" was empty than loadconfig would load the ctdb config twice.
    This stops that from happening.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit ee8b2e298351d05197a2e1494f3331433644c1e6
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jan 22 17:14:50 2010 +1100

    eventscript: Use of $NFS_TICKLE_SHARED_DIRECTORY must be after loadconfig.
    
    Proper fix for 085d1bea78fabf754ef6dd6d323f74a1d361e45c's workaround.
    $NFS_TICKLE_SHARED_DIRECTORY was being used before it is set via
    loadconfig.
    
    Ronnie actually spotted this one.  :-)
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 44696e15cdb23e7656d3bb0ead54f509495738a7
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jan 22 17:13:17 2010 +1100

    initscript: Remove bash-ism.
    
    Also, change the order of the comparison so it is consistent with
    others in the script.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit cb00f86752d276ef0ac4dad97f7b380439603286
Merge: 9a9b36149042d4d8f455959582ec5c882162266a 522fbb012524fe41a67dbe43589a282dda6bcbe2
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jan 22 17:05:11 2010 +1100

    Merge commit 'origin/master'

commit 9a9b36149042d4d8f455959582ec5c882162266a
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jan 22 13:19:00 2010 +1100

    initscript: handle spaces in option values inserted into $CTDB_OPTIONS.
    
    This puts single quotes around everything and uses eval on the
    command-lines that actually start ctdbd.  The eval causes the single
    quotes to be interpreted.
    
    The "redhat" init style no longer uses the Red Hat daemon function.
    It loses the quoting and re-splits on spaces.  Instead we add an extra
    line that uses the success/failure functions to keep things pretty.
    Note that this means that we don't respect daemon's
    $DAEMON_COREFILE_LIMIT variable but we do our own core file handling
    with $CTDB_SUPPRESS_COREFILE anyway.  daemon's core file handling was
    probably overriding what we were doing anyway, so this can be regarded
    as a bug fix.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 6b5a5bb62369284585057caf09f05d2d5e3b9927
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jan 21 13:40:03 2010 +1100

    onnode: update algorithm for finding nodes file.
    
    2 changes:
    
    * If a relative nodes file is specified via -f or $CTDB_NODES_FILE but
      this file does not exist then try looking for the file in /etc/ctdb
      (or $CTDB_BASE if set).
    
    * If a nodes file is specified via -f or $CTDB_NODES_FILE but this
      file does not exist (even when checked as per above) then do not
      fall back to /etc/ctdb/nodes ((or $CTDB_BASE if set).  The old
      behaviour was surprising and hid errors.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit a9aa2e06774e8cd59a86d3343d3da2a2769561b5
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jan 21 13:16:18 2010 +1100

    onnode - respect $CTDB_BASE rather than hard-coding /etc/ctdb.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

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

Summary of changes:
 config/ctdb.init             |    2 +-
 config/events.d/61.nfstickle |    7 +++----
 config/functions             |    7 +++----
 doc/onnode.1                 |   25 ++++++++++++++++++-------
 doc/onnode.1.html            |   39 ++++++++++++++++++++++++++-------------
 doc/onnode.1.xml             |   24 +++++++++++++++++++-----
 6 files changed, 70 insertions(+), 34 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/ctdb.init b/config/ctdb.init
index b4df177..8721e31 100755
--- a/config/ctdb.init
+++ b/config/ctdb.init
@@ -178,7 +178,7 @@ start() {
 
     check_persistent_databases || return $?
 
-    if [ yes == "$CTDB_SUPPRESS_COREFILE" ]; then
+    if [ "$CTDB_SUPPRESS_COREFILE" = "yes" ]; then
 	ulimit -c 0
     else
 	ulimit -c unlimited
diff --git a/config/events.d/61.nfstickle b/config/events.d/61.nfstickle
index 14794fe..deb7966 100755
--- a/config/events.d/61.nfstickle
+++ b/config/events.d/61.nfstickle
@@ -3,14 +3,13 @@
 
 . $CTDB_BASE/functions
 
-. /etc/sysconfig/nfs
-
 service_name="nfs"
-service_start="mkdir -p $CTDB_BASE/state/nfstickle;mkdir -p $NFS_TICKLE_SHARED_DIRECTORY/`hostname`;echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle"
-service_reconfigure=$service_start
 
 loadconfig
 
+service_start="mkdir -p $CTDB_BASE/state/nfstickle;mkdir -p $NFS_TICKLE_SHARED_DIRECTORY/`hostname`;echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle"
+service_reconfigure=$service_start
+
 ctdb_start_stop_service
 
 [ -z "$NFS_TICKLE_SHARED_DIRECTORY" ] && exit 0
diff --git a/config/functions b/config/functions
index 32d6d98..531f859 100644
--- a/config/functions
+++ b/config/functions
@@ -6,17 +6,16 @@ PATH=/bin:/usr/bin:/usr/sbin:/sbin:$PATH
 # pull in a system config file, if any
 loadconfig() {
 
-    if [ "$1" != "ctdb" ] ; then
-	loadconfig "ctdb"
-    fi
-
     if [ -z "$1" ] ; then
 	foo="${service_config:-${service_name}}"
 	if [ -n "$foo" ] ; then
 	    loadconfig "$foo"
 	fi
+    elif [ "$1" != "ctdb" ] ; then
+	loadconfig "ctdb"
     fi
 
+
     if [ -f /etc/sysconfig/$1 ]; then
 	. /etc/sysconfig/$1
     elif [ -f /etc/default/$1 ]; then
diff --git a/doc/onnode.1 b/doc/onnode.1
index baf3e62..055a82e 100644
--- a/doc/onnode.1
+++ b/doc/onnode.1
@@ -1,13 +1,13 @@
 '\" t
 .\"     Title: onnode
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
-.\"      Date: 12/08/2009
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+.\"      Date: 02/05/2010
 .\"    Manual:  
 .\"    Source:  
 .\"  Language: English
 .\"
-.TH "ONNODE" "1" "12/08/2009" "" ""
+.TH "ONNODE" "1" "02/05/2010" "" ""
 .\" -----------------------------------------------------------------
 .\" * set default formatting
 .\" -----------------------------------------------------------------
@@ -98,8 +98,9 @@ Allow nodes to be specified by name rather than node numbers\&. These nodes don\
 .PP
 \-f <file>
 .RS 4
-Specify an alternative nodes file to use instead of
-/etc/ctdb/nodes\&. This overrides the CTDB_NODES_FILE environment variable\&.
+Specify an alternative nodes file to use instead of the default\&. This option overrides the CTDB_NODES_FILE environment variable\&. See the discussion of
+/etc/ctdb/nodes
+in the FILES section for more details\&.
 .RE
 .PP
 \-v
@@ -168,14 +169,24 @@ The following command would run \&./foo in the current working directory, in par
 .PP
 \fBCTDB_NODES_FILE\fR
 .RS 4
-Name of alternative nodes file to use instead of
-/etc/ctdb/nodes\&.
+Name of alternative nodes file to use instead of the default\&. See the discussion of
+/etc/ctdb/nodes
+in the FILES section for more details\&.
 .RE
 .SH "FILES"
 .PP
 /etc/ctdb/nodes
 .RS 4
 Default file containing a list of each node\'s IP address or hostname\&.
+.sp
+Actually, the default is
+$\fBCTDB_BASE\fR/nodes, where
+\fB$CTDB_BASE\fR
+defaults to
+/etc/ctdb\&. If a relative path is given (via the \-f option or
+\fB$CTDB_BASE\fR) and no corresponding file exists relative to the current directory then the file is also searched for in the
+$\fBCTDB_BASE\fR
+directory\&.
 .RE
 .PP
 /etc/ctdb/onnode\&.conf
diff --git a/doc/onnode.1.html b/doc/onnode.1.html
index 90c7e84..f99bdb9 100644
--- a/doc/onnode.1.html
+++ b/doc/onnode.1.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>onnode</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="onnode"><a name="onnode.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>onnode &#8212; run commands on ctdb nodes</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">onnode [OPTION] ... NODES COMMAND ...</code> </p></div></div><div class="refsect1" title="DESCRIPTION"><a name="id268574"></a><h2>DESCRIPTION</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>onnode</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="onnode"><a name="onnode.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>onnode &#8212; run commands on ctdb nodes</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">onnode [OPTION] ... NODES COMMAND ...</code> </p></div></div><div class="refsect1" title="DESCRIPTION"><a name="id2602518"></a><h2>DESCRIPTION</h2><p>
       onnode is a utility to run commands on a specific node of a CTDB
       cluster, or on all nodes.
     </p><p>
@@ -13,7 +13,7 @@
     </p><p>
       The COMMAND can be any shell command. The onnode utility uses
       ssh or rsh to connect to the remote nodes and run the command.
-    </p></div><div class="refsect1" title="DESCRIPTIVE NODE SPECIFICATIONS"><a name="id268596"></a><h2>DESCRIPTIVE NODE SPECIFICATIONS</h2><p>
+    </p></div><div class="refsect1" title="DESCRIPTIVE NODE SPECIFICATIONS"><a name="id2602547"></a><h2>DESCRIPTIVE NODE SPECIFICATIONS</h2><p>
       The following descriptive node specification can be used in
       place of numeric node numbers:
     </p><div class="variablelist"><dl><dt><span class="term">all</span></dt><dd><p>
@@ -32,7 +32,7 @@
             The current NAT gateway.
 	  </p></dd><dt><span class="term">rm | recmaster</span></dt><dd><p>
             The current recovery master.
-	  </p></dd></dl></div></div><div class="refsect1" title="OPTIONS"><a name="id310004"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-c</span></dt><dd><p>
+	  </p></dd></dl></div></div><div class="refsect1" title="OPTIONS"><a name="id2600718"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-c</span></dt><dd><p>
             Execute COMMAND in the current working directory on the
             specified nodes.
 	  </p></dd><dt><span class="term">-o &lt;prefix&gt;</span></dt><dd><p>
@@ -51,16 +51,18 @@
             file.  You can avoid the nodes file entirely by combining
             this with <code class="code">-f /dev/null</code>.
 	  </p></dd><dt><span class="term">-f &lt;file&gt;</span></dt><dd><p>
-            Specify an alternative nodes file to use instead of
-            <code class="filename">/etc/ctdb/nodes</code>.  This overrides the
-            CTDB_NODES_FILE environment variable.
+            Specify an alternative nodes file to use instead of the
+            default.  This option overrides the CTDB_NODES_FILE
+            environment variable.  See the discussion of
+            <code class="filename">/etc/ctdb/nodes</code> in the FILES section
+            for more details.
 	  </p></dd><dt><span class="term">-v</span></dt><dd><p>
             Print a node addresses even if only one node is specified.
             Normally, onnode prints informational node addresses when
             more than one node is specified.
 	  </p></dd><dt><span class="term">-h, --help</span></dt><dd><p>
             Show a short usage guide.
-	  </p></dd></dl></div></div><div class="refsect1" title="EXAMPLES"><a name="id310128"></a><h2>EXAMPLES</h2><p>
+	  </p></dd></dl></div></div><div class="refsect1" title="EXAMPLES"><a name="id2600855"></a><h2>EXAMPLES</h2><p>
       The following command would show the process ID of ctdb on all nodes
     </p><pre class="screen">
       onnode all pidof ctdbd
@@ -78,21 +80,32 @@
       directory, in parallel, on nodes 0, 2, 3 and 4.
     </p><pre class="screen">
       onnode -c -p 0,2-4 ./foo
-    </pre></div><div class="refsect1" title="ENVIRONMENT"><a name="id310172"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><code class="envar">CTDB_NODES_FILE</code></span></dt><dd><p>
-            Name of alternative nodes file to use instead of
-            <code class="filename">/etc/ctdb/nodes</code>.
-	  </p></dd></dl></div></div><div class="refsect1" title="FILES"><a name="id310200"></a><h2>FILES</h2><div class="variablelist"><dl><dt><span class="term"><code class="filename">/etc/ctdb/nodes</code></span></dt><dd><p>
+    </pre></div><div class="refsect1" title="ENVIRONMENT"><a name="id2600905"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl><dt><span class="term"><code class="envar">CTDB_NODES_FILE</code></span></dt><dd><p>
+	    Name of alternative nodes file to use instead of the
+            default.  See the discussion of
+            <code class="filename">/etc/ctdb/nodes</code> in the FILES section
+            for more details.
+	  </p></dd></dl></div></div><div class="refsect1" title="FILES"><a name="id2652169"></a><h2>FILES</h2><div class="variablelist"><dl><dt><span class="term"><code class="filename">/etc/ctdb/nodes</code></span></dt><dd><p>
             Default file containing a list of each node's IP address
             or hostname.
+	  </p><p>
+	    Actually, the default is
+            <code class="filename">$<code class="envar">CTDB_BASE</code>/nodes</code>,
+            where <code class="envar">$CTDB_BASE</code> defaults to
+            <code class="filename">/etc/ctdb</code>.  If a relative path is
+            given (via the -f option or <code class="envar">$CTDB_BASE</code>) and
+            no corresponding file exists relative to the current
+            directory then the file is also searched for in the
+            <code class="filename">$<code class="envar">CTDB_BASE</code></code> directory.
 	  </p></dd><dt><span class="term"><code class="filename">/etc/ctdb/onnode.conf</code></span></dt><dd><p>
             If this file exists it is sourced by onnode.  The main
             purpose is to allow the administrator to set $SSH to
             something other than "ssh".  In this case the -t option is
             ignored.  For example, the administrator may choose to use
             use rsh instead of ssh.
-	  </p></dd></dl></div></div><div class="refsect1" title="SEE ALSO"><a name="id310243"></a><h2>SEE ALSO</h2><p>
+	  </p></dd></dl></div></div><div class="refsect1" title="SEE ALSO"><a name="id2652258"></a><h2>SEE ALSO</h2><p>
       ctdbd(1), ctdb(1), <a class="ulink" href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
-    </p></div><div class="refsect1" title="COPYRIGHT/LICENSE"><a name="id310256"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
+    </p></div><div class="refsect1" title="COPYRIGHT/LICENSE"><a name="id2652271"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
 Copyright (C) Andrew Tridgell 2007<br>
 Copyright (C) Ronnie sahlberg 2007<br>
 Copyright (C) Martin Schwenke 2008<br>
diff --git a/doc/onnode.1.xml b/doc/onnode.1.xml
index 17e2801..073f067 100644
--- a/doc/onnode.1.xml
+++ b/doc/onnode.1.xml
@@ -158,9 +158,11 @@
       <varlistentry><term>-f &lt;file&gt;</term>
         <listitem>
           <para>
-            Specify an alternative nodes file to use instead of
-            <filename>/etc/ctdb/nodes</filename>.  This overrides the
-            CTDB_NODES_FILE environment variable.
+            Specify an alternative nodes file to use instead of the
+            default.  This option overrides the CTDB_NODES_FILE
+            environment variable.  See the discussion of
+            <filename>/etc/ctdb/nodes</filename> in the FILES section
+            for more details.
 	  </para>
         </listitem>
       </varlistentry>
@@ -223,8 +225,10 @@
       <varlistentry><term><envar>CTDB_NODES_FILE</envar></term>
         <listitem>
           <para>
-            Name of alternative nodes file to use instead of
-            <filename>/etc/ctdb/nodes</filename>.
+	    Name of alternative nodes file to use instead of the
+            default.  See the discussion of
+            <filename>/etc/ctdb/nodes</filename> in the FILES section
+            for more details.
 	  </para>
         </listitem>
       </varlistentry>
@@ -241,6 +245,16 @@
             Default file containing a list of each node's IP address
             or hostname.
 	  </para>
+	  <para>
+	    Actually, the default is
+            <filename>$<envar>CTDB_BASE</envar>/nodes</filename>,
+            where <envar>$CTDB_BASE</envar> defaults to
+            <filename>/etc/ctdb</filename>.  If a relative path is
+            given (via the -f option or <envar>$CTDB_BASE</envar>) and
+            no corresponding file exists relative to the current
+            directory then the file is also searched for in the
+            <filename>$<envar>CTDB_BASE</envar></filename> directory.
+	  </para>
         </listitem>
       </varlistentry>
 


-- 
CTDB repository


More information about the samba-cvs mailing list