Ronnie Sahlberg [Tue, 30 Mar 2010 01:50:19 +0000 (12:50 +1100)]
Merge root@10.1.1.27:/shared/ctdb/ctdb-git
(This used to be ctdb commit
5ed7d6788b8f7bf71d7d66c3a620b1aec54dfd81)
Ronnie Sahlberg [Tue, 30 Mar 2010 01:47:54 +0000 (12:47 +1100)]
When we forcefully abort a running eventscript, dont log this as is
the script timedout.
Instead send a different signal (SIGABRT) to the child process to silently
kill the process group for the script and its children without logging
anything.
We abort any running "monitor" script anytime any other event is generated
either by ctdbd itself or by "ctdb eventscript ..."
BZ61043
(This used to be ctdb commit
9dd25cb751919799af9d8a23a0725343a8400e58)
Ronnie Sahlberg [Tue, 30 Mar 2010 00:58:37 +0000 (11:58 +1100)]
Merge root@10.1.1.27:/shared/ctdb/ctdb-git
(This used to be ctdb commit
2fb331d29f4756a7f45489a03cbd065d934f85bc)
Ronnie Sahlberg [Tue, 30 Mar 2010 00:57:25 +0000 (11:57 +1100)]
Reduce the loglevel for two log messages for Registering and Deregistering server ids.
BZ61890
(This used to be ctdb commit
944434eb6420774e42e58984c6ddaa326a6853bd)
Ronnie Sahlberg [Mon, 29 Mar 2010 06:06:50 +0000 (17:06 +1100)]
Merge root@10.1.1.27:/shared/ctdb/ctdb-git
(This used to be ctdb commit
a1de6dff2011dcc8edfd3940a92bd1104a2c3936)
Volker Lendecke [Wed, 24 Mar 2010 09:35:10 +0000 (10:35 +0100)]
In ctdb catdb, print the payload data length without the ctdb header length
(This used to be ctdb commit
45b3fe253c1d00c571b351fc73415bc799df3083)
Volker Lendecke [Mon, 22 Feb 2010 14:04:16 +0000 (15:04 +0100)]
Fix a typo in run_startrecovery_eventscript
(This used to be ctdb commit
4f807b3a2d859f13c3e59e1ae737e9b145d7d613)
Michael Adam [Fri, 26 Mar 2010 16:33:51 +0000 (17:33 +0100)]
events:50.samba: wipe the local part of the serverid db before starting winbind/smnd/nmbd
This is necessary for the new serverid approach.
Michael
(This used to be ctdb commit
8956f32e571093db7f285b83e4dd32960f8afc7c)
Volker Lendecke [Wed, 24 Mar 2010 09:35:10 +0000 (10:35 +0100)]
In ctdb catdb, print the payload data length without the ctdb header length
(This used to be ctdb commit
787274374411116266ee66455a67c127b8d558c1)
Volker Lendecke [Mon, 22 Feb 2010 14:04:16 +0000 (15:04 +0100)]
Fix a typo in run_startrecovery_eventscript
(This used to be ctdb commit
ae2cdd27af5a1a143020c8477d1e61068f21a4a4)
Ronnie Sahlberg [Wed, 24 Mar 2010 06:21:10 +0000 (17:21 +1100)]
new version 1.0.114
(This used to be ctdb commit
b07beb68bf2adf65e837669be0c7464852f829ac)
Stefan Metzmacher [Fri, 26 Feb 2010 11:41:21 +0000 (12:41 +0100)]
config: let 13.per_ip_routing use a flock for generate_auto_link_local()
metze
(This used to be ctdb commit
dc2d0d0e559308ad2676f9ad973746c147d65eb9)
Ronnie Sahlberg [Thu, 11 Mar 2010 07:34:32 +0000 (18:34 +1100)]
Merge commit 'obnox/master-rebase'
(This used to be ctdb commit
216ceca7f886a9f0c4902b100f7ad44349821f9f)
Ronnie Sahlberg [Thu, 11 Mar 2010 07:15:41 +0000 (18:15 +1100)]
Merge root@10.1.1.27:/shared/ctdb/ctdb-git
(This used to be ctdb commit
e59310132d8126ee3afc191b5db56e80a32986e8)
Christian Ambach [Wed, 10 Mar 2010 17:46:15 +0000 (18:46 +0100)]
adjust a vacuum log level
made the severity of the decreasing interval log level the same as for the increasing,
they are both just info logs because they don't report errors
(This used to be ctdb commit
fde29921f14a815ea68911d758485c9070f4eb2a)
Wolfgang Mueller-Friedt [Wed, 10 Mar 2010 09:39:31 +0000 (10:39 +0100)]
ctdb_setstatus in /etc/ctdb/functions was not working correctly because it was called with a wrong parameter list
(This used to be ctdb commit
e1e285d9f7fa3237dbbacca52a4eb2b264fa5986)
Michael Adam [Wed, 24 Feb 2010 13:52:55 +0000 (14:52 +0100)]
packaging: add tdbtool and tdbdump as dependencies to the RPM
The init script relies on the existence.
This should fix bug #6773 on bugzilla.samba.org:
https://bugzilla.samba.org/show_bug.cgi?id=6773
Michael
(This used to be ctdb commit
35e6aa1630732665deaed1e7fbf2c3bf6664895d)
Michael Adam [Wed, 24 Feb 2010 13:52:04 +0000 (14:52 +0100)]
doc: regenerate ctdb(1) manpages after xml change
(This used to be ctdb commit
6b9315b140802dee5904c1db0d57205d9efc6c1c)
Michael Adam [Wed, 24 Feb 2010 13:50:37 +0000 (14:50 +0100)]
doc: fix a linebreak in the example output of "ctdb getdbmap" in ctdb(1)
(This used to be ctdb commit
aab05d67dabf11be9063a2443af4d43bbc985fb6)
Mathieu Parent [Thu, 4 Mar 2010 15:06:11 +0000 (16:06 +0100)]
Fix some more bashisms
(This used to be ctdb commit
3d82ca5b1b8ba2770c739493aa0cdd34bb4827d8)
Mathieu Parent [Mon, 8 Mar 2010 20:19:35 +0000 (21:19 +0100)]
Correct nice_service()
nice takes a binary as argument and not a function or builtin command
(This used to be ctdb commit
e21b40db64b314a24caa2bc611cb48b93decb5aa)
Michael Adam [Wed, 24 Feb 2010 11:58:57 +0000 (12:58 +0100)]
doc: regenerate ctdb and ctdb manpages after xml changes
Michael
(This used to be ctdb commit
51fce280d3a7e2cce8e6e268a19d3594b38b9bb6)
Michael Adam [Wed, 24 Feb 2010 11:53:21 +0000 (12:53 +0100)]
doc: add metainfo "manual" and "source" in the ctdbd manual page
(This used to be ctdb commit
8ffd7500d1740f2ce384d2c41fa5cca983c63cea)
Michael Adam [Wed, 24 Feb 2010 11:52:30 +0000 (12:52 +0100)]
doc: fill metainfo "manual" and "source" in the ctdb manual page
(This used to be ctdb commit
ea7debb162edfcf5844d27400f1448e0b92a55d6)
Mathieu Parent [Tue, 5 Jan 2010 10:04:24 +0000 (11:04 +0100)]
Correction of spelling errors.
* interupted -> interrupted
* dont -> don't
(thanks to lintian)
See https://bugzilla.samba.org/show_bug.cgi?id=6935
(This used to be ctdb commit
942f597dd343f21e2f0fc5d8116d929286db7413)
Mathieu Parent [Tue, 5 Jan 2010 09:59:44 +0000 (10:59 +0100)]
Correction of spelling errors in manpages
thanks to lintian
See https://bugzilla.samba.org/show_bug.cgi?id=6935
(This used to be ctdb commit
402aad596e143c1ae3ec4bf2dfe3863c505bfc40)
Michael Adam [Tue, 23 Feb 2010 10:00:23 +0000 (11:00 +0100)]
fix bug #7152: check NFS-Shares, fails with to long path-names
Thanks to Thomas Sesselmann <t.sesselmann@dkfz.de> .
Michael
(This used to be ctdb commit
da5fc07baa9aa806c3cba52c00fb10cf8b7f2dc5)
Michael Adam [Wed, 6 Jan 2010 13:59:23 +0000 (14:59 +0100)]
server:ctdb_send_dmaster_reply: fix a message typo.
Michael
(This used to be ctdb commit
aa63f728152c37e31cecf2258efcdc8cf5ac0092)
Stefan Metzmacher [Tue, 23 Feb 2010 09:29:27 +0000 (10:29 +0100)]
doc: regenerate ctdb.1*
metze
(This used to be ctdb commit
00b249d9d098d5ed03e21caed404e66336f63629)
Stefan Metzmacher [Tue, 23 Feb 2010 09:36:46 +0000 (10:36 +0100)]
doc/ctdb.1.xml: document "ctdb setifacelink <iface> <status>"
metze
(This used to be ctdb commit
b151a5bf750ffde4845d19a6ef875b4ee6085426)
Stefan Metzmacher [Tue, 23 Feb 2010 09:04:51 +0000 (10:04 +0100)]
doc/ctdb.1.xml: document "ctdb ipinfo <ip>"
metze
(This used to be ctdb commit
c72b637cc838ae6ea1694a476628c3fb4770f63b)
Stefan Metzmacher [Tue, 23 Feb 2010 09:03:00 +0000 (10:03 +0100)]
doc/ctdb.1.xml: update "ctdb ip" documentation
metze
(This used to be ctdb commit
283338275c1e02811ce5062b24cc0da2288f64cc)
Stefan Metzmacher [Tue, 23 Feb 2010 09:01:50 +0000 (10:01 +0100)]
doc/ctdb.1.xml: document "ctdb ifaces"
metze
(This used to be ctdb commit
5ac32d3152ba11bacfab47c72ba998ac495fac00)
Stefan Metzmacher [Tue, 23 Feb 2010 07:35:08 +0000 (08:35 +0100)]
doc/ctdb.1.xml: document PARTIALLYONLINE status
metze
(This used to be ctdb commit
51a455940464accece218b1a018be444993b3b4b)
Stefan Metzmacher [Fri, 12 Feb 2010 08:54:46 +0000 (09:54 +0100)]
config/13.per_ip_routing: fix typo in error message
metze
(This used to be ctdb commit
4b06665b77cb24d488f4ef03cc9ad5fd5d0feb0e)
Stefan Metzmacher [Fri, 12 Feb 2010 13:06:40 +0000 (14:06 +0100)]
config/13.per_ip_routing: use better names for release_script and setup_script
As the basename of the script will be used for the readd script
from setup_iface_ip_readd_script, it's know easier to identify
what script is called by delete_ip_from_iface() while readding
ips to the interface.
metze
(This used to be ctdb commit
3ee225b0b6ed37c22478bd145ced56b1b9b86842)
Stefan Metzmacher [Fri, 12 Feb 2010 08:52:09 +0000 (09:52 +0100)]
config/13.per_ip_routing: register the setup script with setup_iface_ip_readd_script()
This is needed because we need to resetup the routing table when
the delete_ip_from_iface() function readds the ip to the interface.
metze
(This used to be ctdb commit
ea87185ec9977006ef72d5a68c875154e4c84099)
Stefan Metzmacher [Tue, 9 Feb 2010 15:34:59 +0000 (16:34 +0100)]
config/13.per_ip_routing: add a setup_per_ip_routing() function
This combines the logic into a shell function which can be used by the
"takeip" and "updateip" hooks.
We check the return values of the "ip" commands now
instead of ignoring them.
We now create a setup_script.sh similar to the release_script.sh
which makes it easier to analyze problems.
metze
(This used to be ctdb commit
624e8878851b4957cc7c02e922ec86926d6927ee)
Stefan Metzmacher [Fri, 12 Feb 2010 10:24:08 +0000 (11:24 +0100)]
server: add "setup" event
This is needed because the "init" event can't use 'ctdb' commands.
metze
(This used to be ctdb commit
1493436b6b24eb05a23b7a339071ad85f70de8f4)
Stefan Metzmacher [Fri, 12 Feb 2010 10:25:26 +0000 (11:25 +0100)]
config/10.interface: use delete_ip_from_iface also in the "init" event
metze
(This used to be ctdb commit
e2bc5c25116747c58505fe1cb3e2d164257377d1)
Stefan Metzmacher [Fri, 12 Feb 2010 09:33:54 +0000 (10:33 +0100)]
config/11.natgw: use delete_ip_from_iface() instead of remove_ip()
This also initializes the variables correctly for the
shutdown|removenatgw code path to delete_all.
metze
(This used to be ctdb commit
2c2cbed4fcbc868a990fa6b32fc96126ffc61bb5)
Stefan Metzmacher [Fri, 12 Feb 2010 09:24:44 +0000 (10:24 +0100)]
config: make remove_ip() a wrapper of delete_ip_from_iface()
metze
(This used to be ctdb commit
e66d6636b80e3614f183366ec92fc3c6d5c323da)
Stefan Metzmacher [Fri, 12 Feb 2010 09:23:17 +0000 (10:23 +0100)]
config: interface_modify states in a $CTDB_BASE/state/interface_modify directory
metze
(This used to be ctdb commit
756c8b953fef7132dae74b5b244baeb3108dec54)
Stefan Metzmacher [Fri, 12 Feb 2010 08:48:01 +0000 (09:48 +0100)]
config: add setup_iface_ip_readd_script() helper function
This adds a generic infrastructure to register scripts which will
be called when the delete_ip_from_iface() funtion needs to readd
secondary ips to an interface.
metze
(This used to be ctdb commit
ac97d65f44e8dc8bf2ec8f68e4db3448521755a2)
Stefan Metzmacher [Fri, 12 Feb 2010 08:55:28 +0000 (09:55 +0100)]
config: readd ips with a broadcast address in delete_ip_from_iface()
metze
(This used to be ctdb commit
e7a6f64cf5bce5abdc47f5db96b286c5a8d66aff)
Ronnie Sahlberg [Tue, 23 Feb 2010 01:43:49 +0000 (12:43 +1100)]
In ctdb_control_end_recovery,
We used to talloc_steal c (the command packet) and make it a child of the
"event script state context".
If we failed to create a eventscript child context for some reason,
this would have talloc freed state, but at the same time it would also
implicitely have freed c.
Once ctdb_control_end_recovery() returns the error back to the caller,
the caller would dereference both c, and also outdata which is a child of c
and we would either read garbage data or segv.
Change the ordering so we only talloc_steal c as a child of state IFF
we have successfully created a child context for the script.
BZ61068
(This used to be ctdb commit
259054c3632e42bbaa614ee7e888e6e850733d60)
Ronnie Sahlberg [Mon, 22 Feb 2010 23:14:51 +0000 (10:14 +1100)]
Make sure that the natgw eventscript also triggers on the "stopped" event
to remove the natgw configuration and ip assignments used.
BZ61036
(This used to be ctdb commit
344b1f95b126ecabeb4576330038b08bf88e8cb8)
Ronnie Sahlberg [Mon, 22 Feb 2010 04:34:26 +0000 (15:34 +1100)]
ctdb regsrvids is much more useful for testing if it sleeps once it has registered its srvid.
Othervise, as soon as it terminates, ctdbd will deregister the id automatically.
(This used to be ctdb commit
23b059dcb8074872d7900b225790d4df7da071b6)
Ronnie Sahlberg [Mon, 22 Feb 2010 03:06:52 +0000 (14:06 +1100)]
From Sumit Bose <sbose@redhat.com>
Fixes for init script to meet guidelines
(This used to be ctdb commit
9f484404030211df85a215fd2280568a2ec020fb)
Ronnie Sahlberg [Mon, 22 Feb 2010 03:00:33 +0000 (14:00 +1100)]
From Elia Pinto <gitter.spiros@gmail.com>
We dont need to include getopt.h under AIX
(This used to be ctdb commit
fcebbc3484ce56c57def745ea51c053dfb02a657)
Ronnie Sahlberg [Tue, 16 Feb 2010 00:18:43 +0000 (11:18 +1100)]
Ignore any scripts that timesout for most events, except startup.
Threat hung scripts always (except startup) as success.
(This used to be ctdb commit
b6d939c9758c7d2e39206838492f2f644dd61db7)
Ronnie Sahlberg [Fri, 12 Feb 2010 02:19:57 +0000 (13:19 +1100)]
try to restart rpc-rquotad if it is not running
bz60317
(This used to be ctdb commit
2263cd74d511247debadd0f6602bc6396b46ac5e)
Rusty Russell [Fri, 12 Feb 2010 06:32:56 +0000 (17:02 +1030)]
Leave sequence number alone when merely migrating records.
(Based on earlier version from Ronnie which modified tdb; this one
is standalone).
When storing records in a tdb that has "automatic seqnum updates"
also check if the actual data for the record has changed or not.
If it has not changed at all, except for possibly the header,
this is likely just a dmaster migration operation in which case
we want to write the record to the tdb but we do not want the tdb
sequence number to be increased.
This resolves the problem of notify.tdb being thrashed under load:
the heuristic in smbd to only reread this when the sequence number
increases (rarely) breaks down.
Before, running nbench --num-progs=512 across 4 nodes, we saw numbers like:
512 1496 118.33 MB/sec execute 60 sec latency 0.00 msec
And turning on latency tracking, this was typical in the logs:
ctdbd: High latency
9380914.000000s for operation lockwait on database notify.tdb
After this commit:
512 2451 143.85 MB/sec execute 60 sec latency 0.00 msec
And no more latency messages...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
9ed2f8b2fcb7e3f0d795eef22cfa317066490709)
Ronnie Sahlberg [Thu, 11 Feb 2010 01:00:43 +0000 (12:00 +1100)]
Reduce loglevel for two eventscript related debug messages
(This used to be ctdb commit
f8994790e65baebb81bbfad646cdda6234b6d29a)
Ronnie Sahlberg [Thu, 11 Feb 2010 00:54:46 +0000 (11:54 +1100)]
Reducing the log level for a debug message
DEBUG(DEBUG_DEBUG,("pnn %u starting migration of %08x t\
(This used to be ctdb commit
6ce4b21b00cce1530aff022584bf695c257a5d55)
Ronnie Sahlberg [Thu, 11 Feb 2010 00:49:48 +0000 (11:49 +1100)]
Reduce the log level for two debug messages
DEBUG(DEBUG_DEBUG,("pnn %u dmaster response %08x\n", ctdb->pnn, ctdb_has
DEBUG(DEBUG_DEBUG,("pnn %u dmaster request on %08x for %u from %u\n",
(This used to be ctdb commit
a3473e7a445b14520a49585c460429dfbfe1fce0)
Ronnie Sahlberg [Thu, 11 Feb 2010 00:32:22 +0000 (11:32 +1100)]
Add a variable CTDB_CHECK_SWAP_IS_NOT_USED="yes"
to control whether or not to check if we are swapping, and produce
useful output into the logfile if we are.
For production systems with dedicated nas-heads we should never swap.
But for developer/test systems we often use smaller nondedicated systems where
we can no longer guarantee that we will not be using swap.
(This used to be ctdb commit
db87849bf3380914a63a626412bec209dbea7d20)
Ronnie Sahlberg [Thu, 11 Feb 2010 00:19:08 +0000 (11:19 +1100)]
lower the loglevel for a debug message for redundant releases of public ips
(This used to be ctdb commit
cfc1a4f878b61c85063af649d2339431e799647d)
Ronnie Sahlberg [Thu, 11 Feb 2010 00:09:39 +0000 (11:09 +1100)]
Add a new variable : CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK
when set to "yes" this will skip checking if knfsd has hung or not.
bz59626
(This used to be ctdb commit
b0bf3794753c5bb898295b5109707953cc3dcec5)
Andrew Tridgell [Fri, 5 Feb 2010 06:11:29 +0000 (17:11 +1100)]
fixed printing of high latency
(This used to be ctdb commit
88aacab30a36d66fe03d120bbf655edfe791ec32)
Ronnie Sahlberg [Thu, 11 Feb 2010 03:08:41 +0000 (14:08 +1100)]
Merge commit 'martins/master'
(This used to be ctdb commit
06ae8630dfe297e0d7ebcdbb43969170f3d06e20)
Martin Schwenke [Wed, 10 Feb 2010 09:27:53 +0000 (20:27 +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@meltin.net>
(This used to be ctdb commit
11e72356e849ed4cb315c942e30e9bcadc624f42)
Martin Schwenke [Wed, 10 Feb 2010 09:27:53 +0000 (20:27 +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@meltin.net>
(This used to be ctdb commit
8a1cb5dc1ddf82f3b9cbb23e40b3914b3d5c2783)
Martin Schwenke [Wed, 10 Feb 2010 09:24:28 +0000 (20:24 +1100)]
Merge commit 'origin/master'
(This used to be ctdb commit
19523fbb12db1ec1e5ee38de1b2d3b99a74c6ca4)
Ronnie Sahlberg [Tue, 9 Feb 2010 07:34:47 +0000 (18:34 +1100)]
commands that relate to manual failover of ip addresses (moveip)
can sometimes take long so allow for a longer timeout for the controls used.
(This used to be ctdb commit
144c69b633eeb17e120f962162feed6de3dc16a6)
Ronnie Sahlberg [Tue, 9 Feb 2010 03:35:10 +0000 (14:35 +1100)]
dont just exit(0) upon successful completion of waiting for an ipreallocate to finish.
return success back to the caller instead.
otherwise things like 'ctdb enable -n all' will just finish after the first disabled node has become enabled.
(This used to be ctdb commit
f4eb41cd3a1099da8265351818fba9bd4688a188)
Rusty Russell [Tue, 9 Feb 2010 02:16:35 +0000 (12:46 +1030)]
event scripts: add logging for low memory conditions
We should never enter swap; if we do, show the memory state of the machine and the process list. This will help us diagnose what caused the condition before it's too late and the box starts OOM-killing processes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit
627a6d67a0e9e61f8713e62695b3518c51909230)
Andrew Tridgell [Sun, 7 Feb 2010 08:02:06 +0000 (19:02 +1100)]
ctdb: migrate to new dlinklist.h from Samba
(This used to be ctdb commit
f63c091f12f8d582e9518673365c7c52479c470c)
Martin Schwenke [Fri, 5 Feb 2010 04:30:39 +0000 (15:30 +1100)]
onnode documentation - update documentation to reflect recent onnode changes.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit
2fb2eb0fd7396de33474ce43fe95c66a5784d05b)
Martin Schwenke [Fri, 5 Feb 2010 03:00:23 +0000 (14:00 +1100)]
Merge branch 'master' of git://git.samba.org/sahlberg/ctdb
(This used to be ctdb commit
a442668923d4d8f8d624e00138fe37d76d593d21)
Andrew Tridgell [Thu, 4 Feb 2010 03:36:14 +0000 (14:36 +1100)]
ctdb: when we fill the client packet queue we need to drop the client
We can't just drop packets to the list, as those packets could be part
of the core protocol the client is using. This happens (for example)
when Samba is doing a traverse. If we drop a traverse packet then
Samba hangs indefinately. We are better off dropping the ctdb socket
to Samba.
(This used to be ctdb commit
a7a86dafa4d88a6bbc6a71b77ed79a178fd802a6)
Andrew Tridgell [Thu, 4 Feb 2010 03:14:18 +0000 (14:14 +1100)]
ctdb: move ctdb_io.c to use TLIST_*() macros
This will make large packet queues much more efficient
(This used to be ctdb commit
e3f198056230073135ea6354bbef30c5bb022f8f)
Andrew Tridgell [Thu, 4 Feb 2010 03:13:49 +0000 (14:13 +1100)]
util: added TLIST_*() macros
The TLIST_*() macros are like the DLIST_*() macros, but take both a
head and tail pointer for the list. This means that adding an element
to the end of the list is efficient (it doesn't need to walk the
list).
We should move all uses of the DLIST_*() macros which use
DLIST_ADD_END() to use the TLIST_*() macros instead.
(This used to be ctdb commit
2d05a71349e9ade869b62cf261c2a9a21818a474)
Ronnie Sahlberg [Wed, 3 Feb 2010 23:03:21 +0000 (10:03 +1100)]
When trying to enable/disable a node.
Check if the node is already enabled/disabled and log an information
message if so.
(This used to be ctdb commit
c3eec8f10764a647106087099eeb47b7196f7aac)
Ronnie Sahlberg [Wed, 3 Feb 2010 22:54:06 +0000 (09:54 +1100)]
We only queued up to 1000 packets per queue before we start dropping
packets, to avoid the queue to grow excessively if smbd has blocked.
This could cause traverse packets to become discarded in case the main
smbd daemon does a traverse of a database while there is a recovery
(sending a erconfigured message to smbd, causing an avalanche of unlock
messages to be sent across the cluster.)
This avalance of messages could cause also the tranversal message to be
discarded causing the main smbd process to hang indefinitely waiting
for the traversal message that will never arrive.
Bump the maximum queue length before starting to discard messages from
1000 to
1000000 and at the same time rework the queueing slightly so we
can append messages cheaply to the queue instead of walking the list
from head to tail every time.
(This used to be ctdb commit
59ba5d7f80e0465e5076533374fb9ee862ed7bb6)
Ronnie Sahlberg [Wed, 3 Feb 2010 22:45:32 +0000 (09:45 +1100)]
add two new debug controls to send and receive messages
ctdb msglisten and msgsend
(This used to be ctdb commit
8c89aac20260dc7f3746e29fe99f17422a77cb88)
Ronnie Sahlberg [Wed, 3 Feb 2010 19:37:41 +0000 (06:37 +1100)]
Drop the debug level for logging fd creation to DEBUG_DEBUG
(This used to be ctdb commit
eae1d4f9e52e73b4d8769868fffdafa590d03784)
Volker Lendecke [Fri, 29 Jan 2010 17:21:09 +0000 (18:21 +0100)]
tdb: fix an early release of the global lock that can cause data corruption
There was a bug in tdb where the
tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
(ending the transaction-"mutex") was done before the
/* remove the recovery marker */
This means that when a transaction is committed there is a window where another
opener of the file sees the transaction marker while the transaction committer
is still fully functional and working on it. This led to transaction being
rolled back by that second opener of the file while transaction_commit() gave
no error to the caller.
This patch moves the F_UNLCK to after the recovery marker was removed, closing
this window.
(This used to be ctdb commit
898b5edfe757cb145960b8f3631029bfd5592119)
Martin Schwenke [Fri, 22 Jan 2010 06:19:12 +0000 (17:19 +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@meltin.net>
(This used to be ctdb commit
0406d406da70aaee7ad6aac236114905c5d03ed2)
Martin Schwenke [Fri, 22 Jan 2010 06:14:50 +0000 (17:14 +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@meltin.net>
(This used to be ctdb commit
ee8b2e298351d05197a2e1494f3331433644c1e6)
Martin Schwenke [Fri, 22 Jan 2010 06:13:17 +0000 (17:13 +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@meltin.net>
(This used to be ctdb commit
44696e15cdb23e7656d3bb0ead54f509495738a7)
Martin Schwenke [Fri, 22 Jan 2010 06:05:11 +0000 (17:05 +1100)]
Merge commit 'origin/master'
(This used to be ctdb commit
cb00f86752d276ef0ac4dad97f7b380439603286)
Martin Schwenke [Fri, 22 Jan 2010 02:19:00 +0000 (13:19 +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@meltin.net>
(This used to be ctdb commit
522fbb012524fe41a67dbe43589a282dda6bcbe2)
Martin Schwenke [Fri, 22 Jan 2010 02:19:00 +0000 (13:19 +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@meltin.net>
(This used to be ctdb commit
9a9b36149042d4d8f455959582ec5c882162266a)
Martin Schwenke [Thu, 21 Jan 2010 02:40:03 +0000 (13:40 +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@meltin.net>
(This used to be ctdb commit
60aa570aaa77d293b963105b3f605f9625a4594b)
Martin Schwenke [Thu, 21 Jan 2010 02:16:18 +0000 (13:16 +1100)]
onnode - respect $CTDB_BASE rather than hard-coding /etc/ctdb.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit
503e4908b3028330bc25dc6de8561dbd53ee6a8d)
Martin Schwenke [Thu, 21 Jan 2010 02:40:03 +0000 (13:40 +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@meltin.net>
(This used to be ctdb commit
6b5a5bb62369284585057caf09f05d2d5e3b9927)
Martin Schwenke [Thu, 21 Jan 2010 02:16:18 +0000 (13:16 +1100)]
onnode - respect $CTDB_BASE rather than hard-coding /etc/ctdb.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit
a9aa2e06774e8cd59a86d3343d3da2a2769561b5)
Stefan Metzmacher [Mon, 18 Jan 2010 12:05:54 +0000 (13:05 +0100)]
config: 10.interface: search "ethtool" in $PATH instead of using a hardcoded path
This is very useful for testing, I use such a script:
cat ~/bin/ethtool
#!/bin/sh
IFACE=$1
case "$IFACE" in
Neth2)
;;
Neth3)
;;
Neth4)
;;
Neth5)
;;
*)
exec /usr/sbin/ethtool $@
;;
esac
ip link set down $IFACE
exec /usr/sbin/ethtool $@
metze
(This used to be ctdb commit
3bab985cf615720eded4d47b4f9f37a9c28840aa)
Stefan Metzmacher [Tue, 19 Jan 2010 07:42:48 +0000 (08:42 +0100)]
server: reload the public addresses before doing a takeover run
metze
(This used to be ctdb commit
0e41a2204fa8a1e77dc83c0d4b253ab272b5c72d)
Stefan Metzmacher [Mon, 18 Jan 2010 14:04:32 +0000 (15:04 +0100)]
server: ban ourself if the ctdb and kernel knowledge of a public ip differs
metze
(This used to be ctdb commit
48e0af91113d6cead6cae3f28d8d8f610cacaa71)
Stefan Metzmacher [Mon, 18 Jan 2010 14:38:01 +0000 (15:38 +0100)]
server: give an error if we're getting an takeover_ip event with a wrong pnn
metze
(This used to be ctdb commit
2f44d6f3d290cc1b37b19ec34edfbad12cc0c0a7)
Stefan Metzmacher [Mon, 18 Jan 2010 14:08:15 +0000 (15:08 +0100)]
server: return an error if we get an takeover ip event and we cannot serve the ip
metze
(This used to be ctdb commit
f5c221e6abc118aefa489aa7e07755af952fd2bb)
Stefan Metzmacher [Mon, 18 Jan 2010 14:12:46 +0000 (15:12 +0100)]
server: print node number as signed integer on release ip event
metze
(This used to be ctdb commit
6c456face30606641f6b8beaad3121c9b05ca763)
Stefan Metzmacher [Mon, 18 Jan 2010 14:22:16 +0000 (15:22 +0100)]
server: debug redundant takeover ip events with level INFO
metze
(This used to be ctdb commit
7bc9969c4c28f2c4a4848bd730db3c63bb9204fe)
Stefan Metzmacher [Mon, 18 Jan 2010 14:04:32 +0000 (15:04 +0100)]
server: be less verbose on redundant release_ip events
metze
(This used to be ctdb commit
72ef5f891f85ce51f5ca7e0c03d0c7cc955be110)
Stefan Metzmacher [Sat, 16 Jan 2010 14:01:17 +0000 (15:01 +0100)]
server: add a ctdb_do_updateip()
metze
(This used to be ctdb commit
eded224368dded2264e53546c196b1b485cb2094)
Stefan Metzmacher [Sat, 16 Jan 2010 12:30:58 +0000 (13:30 +0100)]
server: split out a ctdb_do_takeover_ip() function
metze
(This used to be ctdb commit
8fd6f4aab0c173b4c9c4c02c546e7d2ec1a98423)
Stefan Metzmacher [Sat, 16 Jan 2010 12:20:45 +0000 (13:20 +0100)]
server: split out a ctdb_announce_vnn_iface() function
metze
(This used to be ctdb commit
ec87a51660cfa8a6851923f757fed31f7ffc7153)
Stefan Metzmacher [Mon, 21 Dec 2009 07:45:19 +0000 (08:45 +0100)]
events: add updateip event to 13.per_ip_routing
metze
(This used to be ctdb commit
829150e814a5e6c85d0f21421f46f41e81d74c53)