10 years agoMerge branch 'martins'
Ronnie Sahlberg [Wed, 18 Feb 2009 02:10:03 +0000 (13:10 +1100)]
Merge branch 'martins'

(This used to be ctdb commit fe4eea45c6b5702a794424037c3f2ab4241d5e5e)

10 years agoadd a licence file
Ronnie Sahlberg [Fri, 6 Feb 2009 21:10:34 +0000 (08:10 +1100)]
add a licence file

(This used to be ctdb commit 59a04a50e64aae0a89b165d0428e23a8bcf8eb24)

10 years agouse netstat to check first and only fall back to netcat if netstat is unavailable
root [Thu, 5 Feb 2009 03:44:46 +0000 (14:44 +1100)]
use netstat to check first and only fall back to netcat if netstat is unavailable

(This used to be ctdb commit dfb16ce9ed65048d30109851737a9075d071ecdb)

10 years agonew version 1.0.71
Ronnie Sahlberg [Mon, 2 Feb 2009 03:04:40 +0000 (14:04 +1100)]
new version 1.0.71

(This used to be ctdb commit a6cdf9106074890b76d2eabe496af244e0134d31)

10 years agoadd a simple test script to test ctdb_check_tcp_ports
Michael Adam [Fri, 30 Jan 2009 17:30:25 +0000 (18:30 +0100)]
add a simple test script to test ctdb_check_tcp_ports


(This used to be ctdb commit 2634f1bd216ce18f061a282a53314cb1650dbd05)

10 years agoctdb_check_tcp_ports: correctly detect listeners on ipv6 :::<port> w/out netcat
Michael Adam [Fri, 30 Jan 2009 17:14:41 +0000 (18:14 +0100)]
ctdb_check_tcp_ports: correctly detect listeners on ipv6 :::<port> w/out netcat

The netstat test only grepped for the ipv4 wildcard address.
Now the ipv6 wildcard listener is correctly detected as well.


(This used to be ctdb commit 78e7928797e239e71f96eb001460a0dbf943e18f)

10 years agoctdb_check_tcp_ports: fail the check if neither netstat nor netcat/nc is found
Michael Adam [Fri, 30 Jan 2009 15:41:37 +0000 (16:41 +0100)]
ctdb_check_tcp_ports: fail the check if neither netstat nor netcat/nc is found


(This used to be ctdb commit 25d04bbe9528fafc68751f7beb22daeee3163d34)

10 years agoctdb_check_tcp_ports: cope with multiple locations of netcat or nc
Michael Adam [Fri, 30 Jan 2009 15:10:05 +0000 (16:10 +0100)]
ctdb_check_tcp_ports: cope with multiple locations of netcat or nc

This fixes tcp port monitor events on systems, where netcat or nc
is not found in /usr/bin/, Debian, for instance.

The patch also separates the process of finding the binaries and
calling them, moving the detection outside of the loop over the
ports list.


(This used to be ctdb commit 3adf100e7f0c04aaf2da9ae4c6984cdb708c3b57)

10 years agoremove include <netinet/in.h> from public ctdb.h
Michael Adam [Thu, 29 Jan 2009 12:22:02 +0000 (13:22 +0100)]
remove include <netinet/in.h> from public ctdb.h

This is not portable.
The ctdb build includes the necessary headers from includes.h.
And users of ctdb should cope with including the necessary
prerequisite headers themselves.


(This used to be ctdb commit fedc6983f5dee39152e6f400f89a3e07eab57f0c)

10 years agopackaging: add a maketarball script
Michael Adam [Thu, 29 Jan 2009 10:46:04 +0000 (11:46 +0100)]
packaging: add a maketarball script

The script extracts the version number from the spec file.
It takes an extra argument, that can be appended to the
version in the tar ball name and directory prefix.


(This used to be ctdb commit 7c813406d6ba55f6a7418f80b13b0bc83cb67928)

10 years agoFix the build on AIX: sys/socket.h needs to be included before ctdb.h
Michael Adam [Wed, 28 Jan 2009 16:40:24 +0000 (17:40 +0100)]
Fix the build on AIX: sys/socket.h needs to be included before ctdb.h

(for struct sockaddr to be defined)

Thanks to William Jojo <w.jojo@hvcc.edu> for reporting.


(This used to be ctdb commit 7558bca1e99884c02747adb7cbea799d04ee24d5)

10 years agoautoconf: Make sure the result of the mkdir_has_mode test gets cached.
Michael Adam [Thu, 29 Jan 2009 09:22:02 +0000 (10:22 +0100)]
autoconf: Make sure the result of the mkdir_has_mode test gets cached.

This fixes the autoconf 2.63 warning
"suspicious cache-id, must contain _cv_ to be cached".

Thanks to William Jojo <w.jojo@hvcc.edu> for reporting.


(This used to be ctdb commit f7be553ed0826d31759812d58db91589ccdf8a8c)

10 years agoevents.d/41.httpd: fix a comment typo
Michael Adam [Tue, 27 Jan 2009 16:17:58 +0000 (17:17 +0100)]
events.d/41.httpd: fix a comment typo


(This used to be ctdb commit c9a0330989421afc138db6d195acf93f5eeda9fb)

10 years agoFix treatment of link local ipv6 addresses: set the scope id.
Michael Adam [Mon, 19 Jan 2009 14:33:24 +0000 (15:33 +0100)]
Fix treatment of link local ipv6 addresses: set the scope id.

metze / Michael

Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 9d12de1ca6107801dada927729e755c0949d73bf)

10 years agoctdb_util: use the parse_ip() function - avoid code duplication
Michael Adam [Mon, 19 Jan 2009 13:14:07 +0000 (14:14 +0100)]
ctdb_util: use the parse_ip() function - avoid code duplication


Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 1461b78c47810073f8637bc4592cacaadcdaf14b)

10 years agoctdb_sys_have_ip: fix ipv6 support for aix, too.
Michael Adam [Mon, 19 Jan 2009 18:08:37 +0000 (19:08 +0100)]
ctdb_sys_have_ip: fix ipv6 support for aix, too.


Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 8b5f1e80e3e2e9ca2198e1baee8af36aa5d6c5b5)

10 years agoctdb_sys_have_ip: don't overwrite input data (setting port to 0)
Stefan Metzmacher [Mon, 19 Jan 2009 12:24:09 +0000 (13:24 +0100)]
ctdb_sys_have_ip: don't overwrite input data (setting port to 0)


Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit de71ce2195bb4f6a96b12437a2d4d1424fd1c59c)

10 years agoFix verification of IP allocation with ipv6 addresses on Linux.
Michael Adam [Mon, 19 Jan 2009 11:02:18 +0000 (12:02 +0100)]
Fix verification of IP allocation with ipv6 addresses on Linux.

Set sin_port or sin6_port to 0, depending on sa_family.


Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit e0c70110e241b065c42c1c07f32c3657bac5d98b)

10 years agoevents 50.samba: fix control of nmbd without separate nmb service script.
Michael Adam [Mon, 19 Jan 2009 20:22:58 +0000 (21:22 +0100)]
events 50.samba: fix control of nmbd without separate nmb service script.

protect all potentially empty $CTDB_SERVICE_* script names


(This used to be ctdb commit df0afcbf9a0308fcd6ddcce1ac9366f785576f44)

10 years agopackaging(RPM): detect and use ccache if available
Michael Adam [Mon, 19 Jan 2009 13:46:30 +0000 (14:46 +0100)]
packaging(RPM): detect and use ccache if available


(This used to be ctdb commit c412c9e2d69a3f07e195259f6ad5767fa8160a94)

10 years agoMakefile: remove extra "/" in paths
Michael Adam [Mon, 19 Jan 2009 08:42:48 +0000 (09:42 +0100)]
Makefile: remove extra "/" in paths


(This used to be ctdb commit b74ef95004989bcfca5fc6468a6f978a196116ca)

10 years agomakerpms: fix detection of support for --rsyncable flag in gzip.
Michael Adam [Sat, 17 Jan 2009 15:18:02 +0000 (16:18 +0100)]
makerpms: fix detection of support for --rsyncable flag in gzip.


(This used to be ctdb commit 0dafb869265d0c369bb5ce45fbcabc2232d6fced)

10 years agoctdb.init: fix typo
Michael Adam [Fri, 16 Jan 2009 13:01:37 +0000 (14:01 +0100)]
ctdb.init: fix typo


(This used to be ctdb commit 145b85c948603cf977a5c5b53d9d9f63fbdba221)

10 years agoevents 50.samba: also support suse and ubuntu/debain systems
Michael Adam [Fri, 16 Jan 2009 12:33:13 +0000 (13:33 +0100)]
events 50.samba: also support suse and ubuntu/debain systems

for managing samba and winbind

This uses CTDB_INIT_STYLE as exported by ctdb.init.

suse systems usually have separate init scripts for
smb for smbd and nmb for nmbd, and the ubuntu/debian
start script for smbd and nmbd is called samba instead
of smb (on redhat).


(This used to be ctdb commit 5fe84f96f3f79baba1f44ba57ce217f501b3c1f8)

10 years agofuncions: make (nice_)service a noop for empty service name
Michael Adam [Fri, 16 Jan 2009 12:31:02 +0000 (13:31 +0100)]
funcions: make (nice_)service a noop for empty service name


(This used to be ctdb commit 4cac2a16b70be772e4f1520020762f63c0bf3efe)

10 years agoctdb.init: use detect_init_style() in the init script
Michael Adam [Fri, 16 Jan 2009 12:28:19 +0000 (13:28 +0100)]
ctdb.init: use detect_init_style() in the init script

and export CTDB_INIT_STYLE, so that event scripts
as called by ctdbd can use it.


(This used to be ctdb commit 56a10594ea9e44e3f034ac11161fd06e5ae46544)

10 years agofunctions: add detect_init_style().
Michael Adam [Fri, 16 Jan 2009 12:26:57 +0000 (13:26 +0100)]
functions: add detect_init_style().


(This used to be ctdb commit ab34a9480b59c649a4fc73a466c8ca0975453ed9)

10 years agonew version
root [Thu, 15 Jan 2009 23:13:53 +0000 (10:13 +1100)]
new version

(This used to be ctdb commit 73a7b611bf2ef87e92d6b18c538a260aa988a2e5)

10 years agoctdb.init: add $network to RequiredStop to match RequiredStart.
Michael Adam [Fri, 19 Dec 2008 10:50:06 +0000 (11:50 +0100)]
ctdb.init: add $network to RequiredStop to match RequiredStart.

This is to make rpm checks (eg.g for SuSE systems) survive.


(This used to be ctdb commit 22cafa88f59ebe50c11f5b65a414800db79405a9)

10 years agoFix circular dependency error with autoconf 2.6.3.
Andreas Schneider [Wed, 29 Oct 2008 13:12:04 +0000 (14:12 +0100)]
Fix circular dependency error with autoconf 2.6.3.

Signed-off-by: Andreas Schneider <anschneider@suse.de>
(cherry picked from commit b39611c36bb904774fd4032bf2f8003fbdeb5d34)

Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 02893e04154c0590b235082c5a6e5726ceb25dba)

10 years agomakerpms: fix creation of tarball when gzip does not know "--rsynceable"
Michael Adam [Wed, 17 Dec 2008 15:01:49 +0000 (16:01 +0100)]
makerpms: fix creation of tarball when gzip does not know "--rsynceable"

--rsynceable is a patch to gzip that not all distributors / packagers
add to gzip. (It has just bitten me on openSUSE.) This path first detects
whether gzip knows about --rsynceable and then calls gzip accordingly.


(This used to be ctdb commit 62eccefc15e2ca737098980aa0b7d226df73a456)

10 years agoctdb.spec: fix version and (RPM-)release number.
Michael Adam [Wed, 17 Dec 2008 11:18:09 +0000 (12:18 +0100)]
ctdb.spec: fix version and (RPM-)release number.

Originally, 1.0 was the version in the spec file and 68 was the release.
But in fact everyone talked about ctdb version 1.0.68.
This puts this straight...


(This used to be ctdb commit a98a3ff2aad59d51fca6a2f3e2bdcfc99e84fa70)

10 years agomakerpms: confess
Michael Adam [Wed, 17 Dec 2008 11:17:15 +0000 (12:17 +0100)]
makerpms: confess


(This used to be ctdb commit 826511f759c3bfa7c587c97786b955572039d2ac)

10 years agomakerpms: don't hard-code the version number but extract it from ctdb.spec
Michael Adam [Wed, 17 Dec 2008 11:15:34 +0000 (12:15 +0100)]
makerpms: don't hard-code the version number but extract it from ctdb.spec


(This used to be ctdb commit 32eac6fc3cce2a9d0a38add56a8bb893e4a85076)

10 years agomakerpms: remove the need of calling makerpms.sh from the top level directory
Michael Adam [Wed, 17 Dec 2008 11:13:42 +0000 (12:13 +0100)]
makerpms: remove the need of calling makerpms.sh from the top level directory

Instead, extract needed information from the dirname of the invoked name.


(This used to be ctdb commit cf1e46d734ed51b4ac2eb8a09f2f787ae5c51092)

10 years agomakerpms: don't cd to $SPECDIR but rpmbuild -ba $SPECDIR/$SPECFILE instead
Michael Adam [Wed, 17 Dec 2008 11:12:17 +0000 (12:12 +0100)]
makerpms: don't cd to $SPECDIR but rpmbuild -ba $SPECDIR/$SPECFILE instead


(This used to be ctdb commit 25dbefc92e7303a7b679a769eb06a7c25fdcf198)

10 years agomakerpms: catch error of git archive correctly (echo resets $?)
Michael Adam [Wed, 17 Dec 2008 11:09:13 +0000 (12:09 +0100)]
makerpms: catch error of git archive correctly (echo resets $?)


(This used to be ctdb commit 85e942a26f5e7d4584d31005ff88c36dca215a11)

10 years agomakerpms: move comment to appropriate place
Michael Adam [Wed, 17 Dec 2008 11:06:25 +0000 (12:06 +0100)]
makerpms: move comment to appropriate place


(This used to be ctdb commit ef4caf6874436ff3f451b95586893e39a8cec1ad)

10 years agomakerpms: use variable (SPECFILE) that is available instead of hard coded file name
Michael Adam [Wed, 17 Dec 2008 11:05:05 +0000 (12:05 +0100)]
makerpms: use variable (SPECFILE) that is available instead of hard coded file name


(This used to be ctdb commit 9661b7a4f3773d645d0525c4430e3cccf0f32eb5)

10 years agodoc: join broken lines in excerpt from log.ctdb
Michael Adam [Mon, 15 Dec 2008 23:30:55 +0000 (00:30 +0100)]
doc: join broken lines in excerpt from log.ctdb


(This used to be ctdb commit b7290b0a8325021515a904ac60fa9afa019c9db1)

10 years agoctdb.samba.org: fix instruction for turning off samba service autostart
Michael Adam [Mon, 15 Dec 2008 23:17:04 +0000 (00:17 +0100)]
ctdb.samba.org: fix instruction for turning off samba service autostart

Extend to show valid commands on Redhat and SuSE Linux.


(This used to be ctdb commit cdea4893c24511ffc1a7338ca3eb6cfd86d68086)

10 years agoMake message in 62_ctdb_persistent_unsafe.sh more informative.
Martin Schwenke [Fri, 16 Jan 2009 04:50:33 +0000 (15:50 +1100)]
Make message in 62_ctdb_persistent_unsafe.sh more informative.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4777b74b1e2eebe54cf27f3303f60e49023e7f6a)

10 years ago23_ctdb_moveip.sh sanity checks the list of IPs/nodes instead of
Martin Schwenke [Fri, 16 Jan 2009 04:12:40 +0000 (15:12 +1100)]
23_ctdb_moveip.sh sanity checks the list of IPs/nodes instead of
looping forever on older versions of CTDB.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 03dfcf9f284c9926479a8dd4e5acf1f5d2b964aa)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Fri, 16 Jan 2009 03:19:55 +0000 (14:19 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit 4928718a346f086f1683c78d52b0bf009c1150a3)

10 years agoGit should ignore the test_trigger event script.
Martin Schwenke [Fri, 16 Jan 2009 03:17:04 +0000 (14:17 +1100)]
Git should ignore the test_trigger event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 80dc86320dde7cc81db8c8fde97cfcbac7914920)

10 years agoFix segfault in ip takeover fallback code.
Stefan Metzmacher [Thu, 15 Jan 2009 12:20:33 +0000 (13:20 +0100)]
Fix segfault in ip takeover fallback code.


Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 3b88f3dec5227e8579672974f7028fb356ee1d94)

10 years agoRemove the sorts from 06_ctdb_getpid.sh - the PIDs should be listed in
Martin Schwenke [Tue, 13 Jan 2009 06:02:59 +0000 (17:02 +1100)]
Remove the sorts from 06_ctdb_getpid.sh - the PIDs should be listed in
node order.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4b97bdba3bc4df20efb1aae7d89a1e3430d35ca3)

10 years agofinish the ipv6 support.
root [Tue, 13 Jan 2009 05:17:20 +0000 (16:17 +1100)]
finish the ipv6 support.
allow clients to register either ipv4 or ipv6 client connections to the tickles list

(This used to be ctdb commit d9b44d7c3255b0fd7359b9afeb613e6ff4c4eaac)

10 years agoUse $CTDB_TEST_WRAPPER in other tests that need it.
Martin Schwenke [Tue, 13 Jan 2009 03:55:31 +0000 (14:55 +1100)]
Use $CTDB_TEST_WRAPPER in other tests that need it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 2912c1ade5db1e20bfa3a8017a702cc8a7da36f1)

10 years agoUse $CTDB_TEST_WRAPPER in 51_ctdb_bench.sh.
Martin Schwenke [Tue, 13 Jan 2009 03:51:40 +0000 (14:51 +1100)]
Use $CTDB_TEST_WRAPPER in 51_ctdb_bench.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 44ec4c57bf9928ef5d5cc117a6c2d92495dac489)

10 years agoFor now, make tests/run_tests.sh runs the new test suite. Add
Martin Schwenke [Mon, 12 Jan 2009 04:47:12 +0000 (15:47 +1100)]
For now, make tests/run_tests.sh runs the new test suite.  Add
tests/TODO.  Remove tests/start_daemons.sh - no longer used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5cdbef46b74e6a5ba2383ef025e69fe605fa4f6e)

10 years agoTest binaries now go in tests/bin and ctdb_test_env now adds this
Martin Schwenke [Fri, 9 Jan 2009 07:15:06 +0000 (18:15 +1100)]
Test binaries now go in tests/bin and ctdb_test_env now adds this
directory to $PATH if local daemons are being used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a497010f67d6a8e68f4d6d7e516b88d2261b1062)

10 years agoAdd tests/README. ctdb_test_env and, therefore, run_tests can now be
Martin Schwenke [Fri, 9 Jan 2009 06:52:38 +0000 (17:52 +1100)]
Add tests/README.  ctdb_test_env and, therefore, run_tests can now be
run from the tests subdirectory... and most other sensible places.
is now intented that this directory can contain test binaries too.
daemons_start() now passes a full path to the events.d directory when
starting ctdbd.  Also fixed the path to ctdbd.  41_ctdb_ban.sh and
42_ctdb_unban.sh fail immediately if they fail to select a test node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3ecce31d3a3f72b9fa851ac99291865c119e551e)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Thu, 8 Jan 2009 06:28:09 +0000 (17:28 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit 928c30213fb9f0c32d82995892ccdd8e054c9d6e)

10 years agoDelete some unstructured tests ({fetch,peristent,transaction}.sh) and
Martin Schwenke [Thu, 8 Jan 2009 06:12:03 +0000 (17:12 +1100)]
Delete some unstructured tests ({fetch,peristent,transaction}.sh) and
replace them with new simple tests (52_ctdb_fetch.sh,
53_ctdb_transaction.sh, 61_ctdb_persistent_safe.sh,
62_ctdb_persistent_unsafe.sh).  Remove "_simple" from some test
filenames in the simple subdirectory - that's redundant.  Always run
ctdb as $CTDB to allow $VALGRIND magic to be used.  Use pgrep/pkill to
detect/kill local daemons so those running under valgrind can be found
too - to support this, always run local daemons with the full path to
the executable.  run_tests now supports -s option to print sumamry
when done - with more and more tests, it is getting hard to follow
progress.  Sort the output of commands in 06_ctdb_getpid.sh to make
sure they compare nicely and also allow the processes' executables to
be called "memcheck" to catch those running under valgrind.  Remove
redundant calls to onnode in commands run from calls
try_command_on_node in some tests.  41_ctdb_ban.sh and
42_ctdb_unban.sh avoid banning the recmaster, since this causes the
recmaster to be reassigned and all nodes to be unbanned.  Minor

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 33cdf3e4bcfadf8e20822ca352babf7acca16821)

10 years agonew version 1.0.69
Ronnie Sahlberg [Thu, 18 Dec 2008 03:31:28 +0000 (14:31 +1100)]
new version 1.0.69

(This used to be ctdb commit fd85e53794ef7fe24c51c94534370545a0711bd4)

10 years agoRemove old ctdbd.sh test script. Remove unneeded nodes.txt and
Martin Schwenke [Thu, 18 Dec 2008 03:25:07 +0000 (14:25 +1100)]
Remove old ctdbd.sh test script.  Remove unneeded nodes.txt and
public_addresses files - these are now created in tests/var as needed.
09_ctdb_ping.sh now recognises new "node disconnected" message.
Replace custom recovery detection code (which could not have been
working) with a call to "ctdb recover" in 32_ctdb_enable_simple.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 486ed3b5b483f1c12c2d978ec6564bd33a2c6aee)

10 years agoRemove bench.sh test and replace with new test 51_ctdb_bench.sh.
Martin Schwenke [Thu, 18 Dec 2008 00:28:43 +0000 (11:28 +1100)]
Remove bench.sh test and replace with new test 51_ctdb_bench.sh.
Function try_command_on_node node passes any options other than -v to
onnode.  Minor update to 14_ctdb_statistics.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e627f8e5fe8e2e3ea423b7dbd12d74597fb4983b)

10 years agoBug fixes for ctdb_bench from Ronnie.
Martin Schwenke [Wed, 17 Dec 2008 22:45:49 +0000 (09:45 +1100)]
Bug fixes for ctdb_bench from Ronnie.

(This used to be ctdb commit 2c055831f0d56e42d055e1d72fb6f0db5f71def1)

10 years agoctdb_test_env now sets $CTDB_TIMEOUT. Fixed
Martin Schwenke [Wed, 17 Dec 2008 05:59:23 +0000 (16:59 +1100)]
ctdb_test_env now sets $CTDB_TIMEOUT.  Fixed
26_ctdb_config_check_error_on_unreachable_ctdb.sh to work with new
generic error message when trying to talk to disconnected node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 33afe9bae732e62994e5957ee143a9c49571898b)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Wed, 17 Dec 2008 04:05:44 +0000 (15:05 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit 099a1605574c7a8d232fd4c2d0c65e55aedeafad)

10 years agoNew test 26_ctdb_config_check_error_on_unreachable_ctdb.sh.
Martin Schwenke [Tue, 16 Dec 2008 06:32:34 +0000 (17:32 +1100)]
New test 26_ctdb_config_check_error_on_unreachable_ctdb.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a99204ad8bd4d3b15c8219762442682a3d1285cf)

10 years agoadd better errorchecking that nodes we try to talk to using the "ctdb" tool actually...
root [Wed, 17 Dec 2008 03:26:01 +0000 (14:26 +1100)]
add better errorchecking that nodes we try to talk to using the "ctdb" tool actually exist and that it is connected.

two new dedicated ctdb error codes
21: node does not exist
22: node is disconnected

(This used to be ctdb commit 7ee6db06162ad5a554058bb6160ad37b24fe42e0)

10 years agodont call ctdb_fatal() just because we are asked to restart a connection
Ronnie Sahlberg [Wed, 17 Dec 2008 01:01:40 +0000 (12:01 +1100)]
dont call ctdb_fatal() just because we are asked to restart a connection
to a remote node and ctdb->methods is NULL.

This can happen when we are in the middle of a normal shutdown of the
daemon and we have already shut down the transport layer (thus setting
ctdb->methods == NULL in the transport layer destructor)
band there is some unprocessed data related to a remote node.

This prevents an ugly race condition where ctdb might sometimes (rare)
cause a core dump during "ctdb shutdown".

(This used to be ctdb commit fc4e8b5a5d3699221620a8d76701c8589f2b4ff1)

10 years agoFinish 24_ctdb_getdbmap.sh. New test 25_dumpmemory.sh.
Martin Schwenke [Tue, 16 Dec 2008 06:22:22 +0000 (17:22 +1100)]
Finish 24_ctdb_getdbmap.sh.  New test 25_dumpmemory.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f5aeab0390b735291ee82359f50d508619211623)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Tue, 16 Dec 2008 00:21:55 +0000 (11:21 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit da61a9822f66ff227b8859bf15ba76fd9afb9d12)

10 years agoskip directories containing macros (%) in ctdb_check_directories_probe
Michael Adam [Mon, 15 Dec 2008 17:21:37 +0000 (18:21 +0100)]
skip directories containing macros (%) in ctdb_check_directories_probe

This prevents the monitor action of 50.samba from failing
on e.g. a typical [homes] service with "path = /home/%S" .


(This used to be ctdb commit 023d6c2e3017d323b5a70f987f3b4e0b8b8f0f7b)

10 years agoctdb.init: add Default-Start to init script to enable autostart.
Michael Adam [Sat, 5 Jul 2008 12:28:27 +0000 (14:28 +0200)]
ctdb.init: add Default-Start to init script to enable autostart.


(This used to be ctdb commit a1a0fa6eb37b5432cc2b176e252856d37fcc4fc8)

10 years agoctdb.init: check availability of ctdb (with ping) before calling ctdb status
Michael Adam [Fri, 12 Dec 2008 15:57:58 +0000 (16:57 +0100)]
ctdb.init: check availability of ctdb (with ping) before calling ctdb status


(This used to be ctdb commit 0f7444966d8147cf5a742320f51fbb9909d6d42d)

10 years agoctdb.init: behave correctly when calling "service ctdb stop" on stopped service
Michael Adam [Fri, 12 Dec 2008 15:00:07 +0000 (16:00 +0100)]
ctdb.init: behave correctly when calling "service ctdb stop" on stopped service

When "service ctdb stop" is called and the ctdbd is not running,
don't print the "Failed to connect to daemon" error messages.
But print a warning and exit with status success instead.


(This used to be ctdb commit fac9ad26b2239818e6fc371fbfaa894fa64045be)

10 years agoctdb.init: fix return code of "service ctdb stop" on non-redhat systems
Michael Adam [Fri, 12 Dec 2008 15:05:04 +0000 (16:05 +0100)]
ctdb.init: fix return code of "service ctdb stop" on non-redhat systems


(This used to be ctdb commit f3cb1386e7ea99adba78350bb50bf34d6bdcfe1d)

10 years agoctdb.init: fix status message of "service ctdb stop" on suse systems
Michael Adam [Fri, 12 Dec 2008 15:04:29 +0000 (16:04 +0100)]
ctdb.init: fix status message of "service ctdb stop" on suse systems


(This used to be ctdb commit 7834d9b79bf4e4d3c6ce63dd4c3a1e40b9d909e4)

10 years agopackaging: set docdir in calls to make (to get it right on e.g. SuSE systems).
Michael Adam [Sat, 5 Jul 2008 12:42:46 +0000 (14:42 +0200)]
packaging: set docdir in calls to make (to get it right on e.g. SuSE systems).

Currently docdir = /usr/share/doc is hardcoded in the Makefile.in.
Some systems use a different doc dir (SuSE uses /usr/share/doc/packages).

And not all versions of autoconf provide the --docdir parameter
(2.61 does, while 2.59 does not). So we use the quick solution
to specify "docdir=%{_docdir}" in the make calls in the spec file.


(This used to be ctdb commit 140768ce79d8ea3af2adb3ac011b58a29a09b50e)

10 years ago3 new tests. 24_ctdb_getdbmap.sh is only 1/2 implemented but does
Martin Schwenke [Mon, 15 Dec 2008 06:52:12 +0000 (17:52 +1100)]
3 new tests.  24_ctdb_getdbmap.sh is only 1/2 implemented but does
something vaguely useful.  ctdb_test_exit unsets $ctdb_test_exit_hook.
Fix bug in 17_ctdb_config_delete_ip.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f90f6e19952d58b8590fe550ecf2308bd9b065dc)

10 years agoAdd a recovery to ctdb_test_exit to improve test stability.
Martin Schwenke [Fri, 12 Dec 2008 07:44:21 +0000 (18:44 +1100)]
Add a recovery to ctdb_test_exit to improve test stability.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b7be3de004cb05dad05704096e2a75e128952b18)

10 years agoRename $CTDB_NUM_NODES to $CTDB_TEST_NUM_DAEMONS and only set it if
Martin Schwenke [Fri, 12 Dec 2008 06:25:38 +0000 (17:25 +1100)]
Rename $CTDB_NUM_NODES to $CTDB_TEST_NUM_DAEMONS and only set it if
$CTDB_TEST_REAL_CLUSTER is not set.  After a ctdb restart, force a
recovery to attempt to help tests that follows.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 497c40f69e06776861a780500da1952eb7ea8fc1)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Fri, 12 Dec 2008 04:39:53 +0000 (15:39 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit 4c5eb616f041e4a10d8f8b3251fc3db5a58e726f)

10 years agoNew version 1.0.68
Ronnie Sahlberg [Thu, 11 Dec 2008 22:39:55 +0000 (09:39 +1100)]
New version 1.0.68

(This used to be ctdb commit e50c9667b86160eb5dfb9868aff420b72f799a5f)

10 years agoImprove the monitor event test for ethernet interfaces (link detection).
Michael Adam [Wed, 10 Dec 2008 21:27:36 +0000 (22:27 +0100)]
Improve the monitor event test for ethernet interfaces (link detection).

On some systems, the ethtool link detection is not successful when a
cable is plugged but the interface has not been brought up previously.
This improves the test by bringing the interface up (without checking
for success here) and trying the ethtool test again afterwards.


(This used to be ctdb commit 0c2a7bf18c65452ca1c2f0539bf692507d91e3c6)

10 years agoUse "grep -q" instead of "grep ... > /dev/null" in events.d/10.interfaces
Michael Adam [Wed, 10 Dec 2008 21:19:31 +0000 (22:19 +0100)]
Use "grep -q" instead of "grep ... > /dev/null" in events.d/10.interfaces
This enhances readability.


(This used to be ctdb commit 9c6816e040d42d293eaf9ce41eff639135e8b2f5)

10 years agoAdd message about restart to 18_ctdb_freeze.sh.
Martin Schwenke [Thu, 11 Dec 2008 07:14:17 +0000 (18:14 +1100)]
Add message about restart to 18_ctdb_freeze.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 2a069118fee169460bdf68b9a639b0e96ac85266)

10 years agoWith local daemons the sockets are now numbered starting from 0. Fix
Martin Schwenke [Wed, 10 Dec 2008 05:13:42 +0000 (16:13 +1100)]
With local daemons the sockets are now numbered starting from 0.  Fix
setup of local daemons so that it correctly assigns no public IPs to a
single node each time.  Separate out daemon_setup so that the
selection of the node with no public IPs is only done once at the
beginning of testing.  Clean up all current tests, mostly with a view
to ensuring that a node selected for testing some kind of failover
actually has public addresses assigned.  Reenabled 01_ctdb_version.sh
- it now passes if rpm doesn't do anything useful on the node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 86807e8b7b179cbe87e559fb3b1f02c8b1990dc4)

10 years agoupdate the "ctdb recover" command.
root [Wed, 10 Dec 2008 01:06:51 +0000 (12:06 +1100)]
update the "ctdb recover" command.

block and wait until the clustered has completed the recovery before returning.
this  makes it easier to script since it avoids the common need for
   ctdb recover
   ... complex loop to wait for recovery to complete ...
   script continues

(This used to be ctdb commit 8a0df9324a03b0f17772c64a9331236126c22124)

10 years agoadd a CTDB_TIMEOUT variable for the ctdb tool.
root [Wed, 10 Dec 2008 01:01:19 +0000 (12:01 +1100)]
add a CTDB_TIMEOUT variable for the ctdb tool.
If set this specified the maximum runtime for the ctdb tool before it will terminate with status == 20
Just like the -T ...  option would.

(This used to be ctdb commit c404d57afb2adda039e676877838927d3073df11)

10 years agomake sure we return an errorcode when the ctdb command has hung and is timeodout...
root [Wed, 10 Dec 2008 00:49:51 +0000 (11:49 +1100)]
make sure we return an errorcode when the ctdb command has hung  and is timeodout by the -T <timeout> setting

(This used to be ctdb commit 993f626e603b9bbc02942bb55096d63b9a4f456b)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Wed, 10 Dec 2008 00:42:02 +0000 (11:42 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit 674d1660e5602f2fab1eaf219a6b8b5ddf24c402)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Wed, 10 Dec 2008 00:32:24 +0000 (11:32 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit b5eec91bd185c91a09b3f42ed26fee7b13a70d9d)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Wed, 10 Dec 2008 00:22:59 +0000 (11:22 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit 6cbe8923ead8226de1c20cfd8718e43fe8525ce1)

10 years agoAdded use of $ctdb_test_exit_hook to function ctdb_test_exit. Removed
Martin Schwenke [Tue, 9 Dec 2008 07:20:11 +0000 (18:20 +1100)]
Added use of $ctdb_test_exit_hook to function ctdb_test_exit.  Removed
sleeps from ban/unban tests.  Now expect "ctdb ping" to return false
if it fails, so made relevant change to 09_ctdb_ping.sh.  New
functions install_eventscript and uninstall_eventscript.  New
setup/cleanup tests 00_ctdb_install_eventscript.sh and
99_ctdb_uninstall_eventscript.sh.  New test 21_ctdb_disablemonitor.sh,
which is incredibly complex.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 23bffef2295772f5b795236d60b7fb6ea754b7fb)

10 years agoadd a helper that waits until the clueter is no longe rin recovery mode and return...
root [Tue, 9 Dec 2008 01:03:42 +0000 (12:03 +1100)]
add a helper that waits until the clueter is no longe rin recovery mode and return the generation number.

change the ban/unban logic to wait until we are not in recovery before it bans/unbans the node.

also wait until after the cluster has recovered from the ban/unban before returning so that the cluster is in recpovery mode == normal when the command returns.  this makes it much easier to script things ...

(This used to be ctdb commit 39c77371a2f995025a584691fe61af12dc6ed5d7)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Tue, 9 Dec 2008 00:46:34 +0000 (11:46 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit 2ecc701869c8bc2d823a8073453c6caf1575dc47)

10 years agoupdate to the flags handling
root [Mon, 8 Dec 2008 23:45:14 +0000 (10:45 +1100)]
update to the flags handling
make sure to abort the monitoring and restart if we failed to get the nodemap from a remote node

(This used to be ctdb commit 4eac0214e732e6c2f867d66ec71d4406680dbb94)

10 years agoIf ctdbd was started with the --socket option then we also set the CTDB_SOCKET variab...
root [Mon, 8 Dec 2008 06:29:17 +0000 (17:29 +1100)]
If ctdbd was started with the --socket option then we also set the CTDB_SOCKET variable so that the eventscripts can pick up the name proper

(This used to be ctdb commit 7b41b518c3ffebf1712445a8c6242509dc798003)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Mon, 8 Dec 2008 06:03:50 +0000 (17:03 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit 1b00fe0bac36422d30be167a009c452058975a21)

10 years agoreturn -1 if ctdb ping failed
root [Mon, 8 Dec 2008 01:57:40 +0000 (12:57 +1100)]
return -1 if ctdb ping failed

(This used to be ctdb commit 691b9c0f1771afa564a5959405f2e7a54c334d45)

10 years agoMerge commit 'origin/master' into martins
Martin Schwenke [Sun, 7 Dec 2008 21:57:46 +0000 (08:57 +1100)]
Merge commit 'origin/master' into martins

(This used to be ctdb commit ec354d602d20700e6769deb798436d08256a49d5)

10 years agoWhen running with local daemons, provided there is more than 2 of
Martin Schwenke [Sun, 7 Dec 2008 21:15:18 +0000 (08:15 +1100)]
When running with local daemons, provided there is more than 2 of
them, randomly pick a single node that will not have any public IPs
assigned.  This will make life a bit more interesting and will
simulate what happens on real clusters with a management node.  Some
tests were disabling a node to implicitly trigger a ctdb restart - now
use an explicit restart of ctdb when it is required.
17_ctdb_config_delete_ip.sh now randomly chooses a public IP on any
node to disable - this works around a problem where the hardcoded node
might not have any public addresses.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3d59783c0e9478f4766c380945d6200fc654f5d9)

10 years agoredo and update how we synchronize flags across the cluster.
root [Fri, 5 Dec 2008 05:32:30 +0000 (16:32 +1100)]
redo and update how we synchronize flags across the cluster.
this simplifies the code and should close a race condition between the local recovery daemon and a remote node when flags are changing.

(This used to be ctdb commit 32d460b8469eb53145f04161a5d01166f9b5f09e)

10 years agosome platforms are very picky about the third argument passed to bind().
root [Thu, 4 Dec 2008 23:33:38 +0000 (10:33 +1100)]
some platforms are very picky about the third argument passed to bind().
and would complain if sa.family is AF_INET and the third argument is not exactly the size of a sockaddr_in.

We used to pass a union containing both a sockaddr_in and a sockaddr_in6  which would mean that on those platforms bind() would fail since the passed structure for AF_INET would be too big.

Thus we need to set and pass the appropriate size to bind. At the same time for thos eplatforms we can also set sin[6]_size to the expected size.
(bind() on those platforms were isurprisingly perfectly ok with sin_len was "too big")

(This used to be ctdb commit 5d3018c37179966f75183d9a98790eaaaf1d2cfc)

10 years agoNew test for getmonmode. Overload node_has_status some more to
Martin Schwenke [Thu, 4 Dec 2008 06:19:51 +0000 (17:19 +1100)]
New test for getmonmode.  Overload node_has_status some more to
support checking the monitoring mode.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4e1c079deb0aafb99d4114bb6504ff5ba1cbdeb4)