metze/ctdb/wip.git
15 years agodon't use mmap in tdb if --nosetsched is set. That makes valgrind
Andrew Tridgell [Fri, 4 Jul 2008 07:32:21 +0000 (17:32 +1000)]
don't use mmap in tdb if --nosetsched is set. That makes valgrind
happier (it doesn't like the mmap/msync calls in tdb)

15 years agoprevent valgrind errors where we print unitialised values on control errors
Andrew Tridgell [Fri, 4 Jul 2008 07:15:06 +0000 (17:15 +1000)]
prevent valgrind errors where we print unitialised values on control errors

15 years agofixed a warning
Andrew Tridgell [Fri, 4 Jul 2008 07:04:37 +0000 (17:04 +1000)]
fixed a warning

15 years agofixed some incorrect CTDB_NO_MEMORY*() calls found after fixing the
Andrew Tridgell [Fri, 4 Jul 2008 07:04:26 +0000 (17:04 +1000)]
fixed some incorrect CTDB_NO_MEMORY*() calls found after fixing the
_VOID varient

15 years agoCTDB_NO_MEMORY_VOID() needs to return on error
Andrew Tridgell [Fri, 4 Jul 2008 06:58:29 +0000 (16:58 +1000)]
CTDB_NO_MEMORY_VOID() needs to return on error

15 years agoadded option to start ctdb under valgrind
Andrew Tridgell [Fri, 4 Jul 2008 06:58:14 +0000 (16:58 +1000)]
added option to start ctdb under valgrind

Just add CTDB_VALGRIND=yes in /etc/sysconfig/ctdb, and look at the
logs in /var/log/ctdb_valgrind.*

15 years agozero out the ctdb->freeze_handle when we free it
Andrew Tridgell [Fri, 4 Jul 2008 06:05:04 +0000 (16:05 +1000)]
zero out the ctdb->freeze_handle when we free it

This prevents heap corruption when a freeze child dies

15 years agowe dont need to explicitely thaw the databases from the recovery daemon
Ronnie Sahlberg [Thu, 3 Jul 2008 02:46:09 +0000 (12:46 +1000)]
we dont need to explicitely thaw the databases from the recovery daemon
since this is already done implicitely when we changed recovery mode
back to normal

15 years agotrack both when we last started and ended a recovery.
Ronnie Sahlberg [Wed, 2 Jul 2008 03:55:59 +0000 (13:55 +1000)]
track both when we last started and ended a recovery.
make ctdb uptime print how long the recovery took

in the recovery daemon when we check that the public ip address
allocation on the local node is correct (we have the ips we should have
and we dont have any we shouldnt have) use ctdb uptime and check the
recovery start/stop times and make sure we dont check for ip allocation
inconsistencies during a recovery  where the ip address allocation is in flux.

15 years agoprint the opcode when an async callback detects an error
Ronnie Sahlberg [Wed, 2 Jul 2008 02:21:53 +0000 (12:21 +1000)]
print the opcode when an async callback detects an error

15 years agoupdate a comment to reflect that this is not always a real recovery
Ronnie Sahlberg [Wed, 2 Jul 2008 02:01:19 +0000 (12:01 +1000)]
update a comment to reflect that this is not always a real recovery
it can also be printed when we just do an ip reallocation

15 years agonew version
Ronnie Sahlberg [Mon, 30 Jun 2008 23:34:43 +0000 (09:34 +1000)]
new version

15 years agoinitdit/ctdb is not a config file
Ronnie Sahlberg [Thu, 26 Jun 2008 23:31:18 +0000 (09:31 +1000)]
initdit/ctdb is not a config file

15 years agomake /etc/ctdb/functions executable and add a hashbang to it so
Ronnie Sahlberg [Thu, 26 Jun 2008 23:29:38 +0000 (09:29 +1000)]
make /etc/ctdb/functions executable and add a hashbang to it so
rpmlint wont complain

15 years agotest
Ronnie Sahlberg [Thu, 26 Jun 2008 04:14:37 +0000 (14:14 +1000)]
test

15 years agoRevert "test"
Ronnie Sahlberg [Thu, 26 Jun 2008 04:00:36 +0000 (14:00 +1000)]
Revert "test"

This reverts commit f71287a28d66db202fe52f9a43b6daf2389d7f66.

15 years agotest
Ronnie Sahlberg [Thu, 26 Jun 2008 03:51:18 +0000 (13:51 +1000)]
test

15 years agoreduce loglevel of the info message we are updating the flags on all nodes
Ronnie Sahlberg [Thu, 26 Jun 2008 03:15:41 +0000 (13:15 +1000)]
reduce loglevel of the info message we are updating the flags on all nodes

15 years agoforce an update of the flags from the recmaster after each monitoring run
Ronnie Sahlberg [Thu, 26 Jun 2008 03:08:37 +0000 (13:08 +1000)]
force an update of the flags from the recmaster after each monitoring run

15 years ago/etc/ctdb/functions should not be executable
Ronnie Sahlberg [Thu, 26 Jun 2008 02:43:30 +0000 (12:43 +1000)]
/etc/ctdb/functions should not be executable

15 years agothird attempt for fixing a freeze child writing to the socket
Ronnie Sahlberg [Thu, 26 Jun 2008 01:52:26 +0000 (11:52 +1000)]
third attempt for fixing a freeze child writing to the socket

15 years agoverify that the recmaster has the correct flags for us and if not tell the recmaste...
Ronnie Sahlberg [Thu, 26 Jun 2008 01:08:09 +0000 (11:08 +1000)]
verify that the recmaster has the correct flags for us   and if not tell the recmaster what the flags should be

15 years agoonly loop over the write it the write failed
Ronnie Sahlberg [Thu, 26 Jun 2008 01:02:08 +0000 (11:02 +1000)]
only loop over the write it the write failed

15 years agothe write() from the freeze child process can fail
Ronnie Sahlberg [Wed, 25 Jun 2008 23:54:27 +0000 (09:54 +1000)]
the write() from the freeze child process can fail
try writing many times and log an error if the write failed

15 years agoit is 2008 not 2008 right now :-)
Ronnie Sahlberg [Fri, 13 Jun 2008 03:53:05 +0000 (13:53 +1000)]
it is 2008   not 2008 right now :-)

15 years agoupdate to 1.0.42
Ronnie Sahlberg [Fri, 13 Jun 2008 03:50:28 +0000 (13:50 +1000)]
update to 1.0.42

15 years agoban the node after 3 failed scripts by default
Ronnie Sahlberg [Fri, 13 Jun 2008 03:45:23 +0000 (13:45 +1000)]
ban the node after 3 failed scripts by default

15 years agoif the event scripts hangs EventScriptsBanCount consecutive times in a row
Ronnie Sahlberg [Fri, 13 Jun 2008 03:18:06 +0000 (13:18 +1000)]
if the event scripts hangs EventScriptsBanCount consecutive times in a row
the node will ban itself for the default recovery ban period

15 years agowhen a eventscript has timed out, log the event options (i.e. "monitor" "takeip 1...
Ronnie Sahlberg [Fri, 13 Jun 2008 02:18:00 +0000 (12:18 +1000)]
when a eventscript has timed out, log the event options (i.e. "monitor" "takeip 1.2..." etc)
to the log

15 years agomake it possible to re-start a recovery without marking the current node as
Ronnie Sahlberg [Fri, 13 Jun 2008 01:47:42 +0000 (11:47 +1000)]
make it possible to re-start a recovery without marking the current node as
the culprit.

15 years agoadd a callback for failed nodes to the async control helper.
Ronnie Sahlberg [Thu, 12 Jun 2008 06:53:36 +0000 (16:53 +1000)]
add a callback for failed nodes to the async control helper.

this callback is called for every node where the control failed (or timed out)

when we issue the start recovery control from recovery master,
set any node that fails as a culprit   so it will eventually be banned

16 years agofirst cut to convert takeover_callback_state{}
Ronnie Sahlberg [Wed, 4 Jun 2008 07:12:57 +0000 (17:12 +1000)]
first cut to convert takeover_callback_state{}
to use ctdb_sock_addr instead of sockaddr_in

16 years agofix a comment
Ronnie Sahlberg [Wed, 4 Jun 2008 05:23:06 +0000 (15:23 +1000)]
fix a comment

note that we dont actually send the ipv6 "gratious arp" on the wire just yet.
(since ipv6 doesnt use arp)
but all the infrastructure is there when we implement sending raw neig.disc. packets

16 years agoconvert handling of gratious arps and their controls and helpers to
Ronnie Sahlberg [Wed, 4 Jun 2008 05:13:00 +0000 (15:13 +1000)]
convert handling of gratious arps and their controls and helpers to
use the ctdb_sock_addr structure so tehy work for both ipv4 and ipv6

16 years agoadd a parameter for the tdb-flags to the client function
Ronnie Sahlberg [Wed, 4 Jun 2008 00:46:20 +0000 (10:46 +1000)]
add a parameter for the tdb-flags to the client function
ctdb_attach()   so that we can pass TDB_NOSYNC when we attach to
a persistent database and want fast unsafe writes instead of
slow but safe tdb_transaction writes.

enhance the ctdb_persistent test suite to test both safe and unsafe writes

16 years agorun the persistent write test with 4 nodes by default
Ronnie Sahlberg [Tue, 3 Jun 2008 08:19:48 +0000 (18:19 +1000)]
run the persistent write test with 4 nodes by default

use the timelimit argument to the persistent writer to run the test for
30 seconds by default

16 years agoredesign the test of persistent writes
Ronnie Sahlberg [Tue, 3 Jun 2008 08:18:28 +0000 (18:18 +1000)]
redesign the test of persistent writes
so that we have n persistent writers on n nodes,
all writers writing persistently to the same record.

each writer on a node has its own "counter" in this record that is incremented by one in each iteration.
the persistent writer on node 0 also checks that all the counters in the record are increasing monotonically and if they are not, flagging it as an ERROR.

16 years agocreate the nodes file in a 'test' subdirectory and not the current directory
Ronnie Sahlberg [Tue, 3 Jun 2008 08:14:54 +0000 (18:14 +1000)]
create the nodes file in a 'test' subdirectory and not the current directory

delete all persistent databases when the test starts
(the tests only uses test databases in a special test directory)

do not set up any public addresses in the tests

wait until there are no disconnected or unhealthy nodes when starting the
test daemons instead of waiting for the recovery mode to change.
we do want to wait until the system has recovered and ALL nodes are ok.

16 years agodebugleves can now be negative so print their value using %d instead of %u
Ronnie Sahlberg [Wed, 28 May 2008 22:19:35 +0000 (08:19 +1000)]
debugleves can now be negative   so print their value using %d instead of %u

16 years agoupdate to .41
Ronnie Sahlberg [Wed, 28 May 2008 04:51:46 +0000 (14:51 +1000)]
update to .41

16 years agodont bother casting to a void* private_data pointer,
Ronnie Sahlberg [Wed, 28 May 2008 03:40:12 +0000 (13:40 +1000)]
dont bother casting to a void* private_data pointer,
just pass it as 'state' structure

16 years agoremove another field we dont need in the childwrite_handle structure
Ronnie Sahlberg [Wed, 28 May 2008 03:31:58 +0000 (13:31 +1000)]
remove another field we dont need in the childwrite_handle structure

16 years agoremote a comment that is no longer relevant
Ronnie Sahlberg [Wed, 28 May 2008 03:30:22 +0000 (13:30 +1000)]
remote a comment that is no longer relevant

remove a field in the childwrite_handle structure we dont need

16 years agodo persistent writes in a child process
Ronnie Sahlberg [Wed, 28 May 2008 03:04:25 +0000 (13:04 +1000)]
do persistent writes in a child process

16 years agoupdate to .40
Ronnie Sahlberg [Mon, 26 May 2008 22:23:46 +0000 (08:23 +1000)]
update to .40

16 years agoread the samba sysconfig from the samba eventscript
Ronnie Sahlberg [Mon, 26 May 2008 22:21:18 +0000 (08:21 +1000)]
read the samba sysconfig from the samba eventscript

16 years agodisable transactions for now, there are more situations where there are conflicting...
Ronnie Sahlberg [Thu, 22 May 2008 08:33:54 +0000 (18:33 +1000)]
disable transactions for now,  there are more situations where there are conflicting locks   and the "net" command is not prepared that the persistent store can fail.

16 years agorestore a timeout value to the default settings instead of the hardcoded 3 second...
Ronnie Sahlberg [Thu, 22 May 2008 06:33:36 +0000 (16:33 +1000)]
restore a timeout value to the default settings instead of the hardcoded 3 second test value

16 years agofix some memory hierarchy bugs in allocation of the state structure for persistent...
Ronnie Sahlberg [Thu, 22 May 2008 06:29:46 +0000 (16:29 +1000)]
fix some memory hierarchy bugs in allocation of the state structure for persistent writes.

since these two controls (UPDATE_RECORD and PERSISTENT_STORE) can respond
asynchronously to the control,   we can not allocate the state variable as a child off ctdb_req_control  instead we must allocate state as a child off ctdb itself
and steal ctdb_req_control so it becomes a child of state.

othervise both ctdb_req_control and also state will be released immediately after we have finished setting up the async reply and returned.

16 years agocleanup of the previous patch.
Ronnie Sahlberg [Thu, 22 May 2008 03:12:53 +0000 (13:12 +1000)]
cleanup of the previous patch.

With these patches, ctdbd will enforce and (by default) always use
tdb_transactions when updating/writing records to a persistent database.

This might come with a small performance degratation  since transactions
are slower than no transactions at all.

If a client, such as samba wants to use a persistent database but does NOT
want to pay the performance penalty, it can specify TDB_NOSYNC  as the
srvid parameter in the ctdb_control() for CTDB_CONTROL_DB_ATTACH_PERSISTENT.

In this case CTDBD will remember that "this database is not that important"
so I can use unsafe (no transaction) tdb_stores to write the updates.
It will be faster than the default (always use transaction) but less crash safe.

16 years agosecond try for safe transaction stores into persistend tdb databases
Ronnie Sahlberg [Thu, 22 May 2008 02:47:33 +0000 (12:47 +1000)]
second try for safe transaction stores into persistend tdb databases

for stores into persistent databases, ALWAYS use a lockwait child take out the lock for the record and never the daemon itself.

16 years agoupdate version to .39
Ronnie Sahlberg [Wed, 21 May 2008 20:22:25 +0000 (06:22 +1000)]
update version to .39

16 years agomove CTDB_MANAGES_NFS from /etc/sysconfig/nfs to /etc/sysconfig/ctdb
Ronnie Sahlberg [Wed, 21 May 2008 20:08:38 +0000 (06:08 +1000)]
move CTDB_MANAGES_NFS from /etc/sysconfig/nfs to /etc/sysconfig/ctdb

16 years agomove the CTDB_MANAGES_ISCSI setting from /etc/sysconfig/iscsi to /etc/sysconfig/ctdb
Ronnie Sahlberg [Wed, 21 May 2008 20:04:36 +0000 (06:04 +1000)]
move the CTDB_MANAGES_ISCSI setting from /etc/sysconfig/iscsi to /etc/sysconfig/ctdb

16 years agomove the config optoin CTDB_MANAGES_VSFTPD from /etc/sysconfig/vsftpd to /etc/sysconf...
Ronnie Sahlberg [Wed, 21 May 2008 20:01:17 +0000 (06:01 +1000)]
move the config optoin CTDB_MANAGES_VSFTPD from /etc/sysconfig/vsftpd to /etc/sysconfig/ctdb

16 years agolowe the loglevel for the warning that releaseip was called for a non-public address.
Ronnie Sahlberg [Wed, 21 May 2008 01:50:41 +0000 (11:50 +1000)]
lowe the loglevel for the warning that releaseip was called for a non-public address.

the address might be a public address on a different node so no need to fiull up the logs with thoise messages

16 years ago lower the loglevel for when we have "tickles" for an ip address that is not a public...
Ronnie Sahlberg [Wed, 21 May 2008 01:44:50 +0000 (11:44 +1000)]
 lower the loglevel for when we have "tickles" for an ip address that is not a public address on the local node (it may be a public address on other nodes)

16 years agodont emit the can not start transaction with locks held at all.
Ronnie Sahlberg [Wed, 21 May 2008 01:23:46 +0000 (11:23 +1000)]
dont emit the can not start transaction with locks held at all.
it just pollutes the logs

16 years agolower the debug level for the "can not start transaction" since we do expect this...
Ronnie Sahlberg [Wed, 21 May 2008 01:15:14 +0000 (11:15 +1000)]
lower the debug level for the "can not start transaction" since we do expect this to happen a few times inside ctdb (since we cant really block and wait for all locks to dissapear before we can write the header, for example when doing a dmaster miration)
in those cases we accept that we couldnt get a transaction and then just writes the data "unsafely" anyway.

16 years agoWhen ctdb has just been installed on a node, there wont be any persistent databases
Ronnie Sahlberg [Fri, 16 May 2008 05:14:17 +0000 (15:14 +1000)]
When ctdb has just been installed on a node, there wont be any persistent databases
stored yet.

Fix a cosmetic and annoying warning message when running "service ctdb start" and supress printing out that "warning your ls command to find the persistent databases didnt find any" ...

16 years agonew version .38
Ronnie Sahlberg [Thu, 15 May 2008 23:51:42 +0000 (09:51 +1000)]
new version .38

16 years agoadd "machinereadable output" support to "ctdb getmonmode"
Ronnie Sahlberg [Thu, 15 May 2008 23:21:44 +0000 (09:21 +1000)]
add "machinereadable output" support to "ctdb getmonmode"

16 years agodont disable/enable monitoring for each eventscript, instead
Ronnie Sahlberg [Thu, 15 May 2008 22:20:40 +0000 (08:20 +1000)]
dont disable/enable monitoring for each eventscript, instead
just disable the monitoring during the "startrecovery" event and enable it again once recovery has completed

16 years agodont check whether the "recovered" event was successful or not
Ronnie Sahlberg [Thu, 15 May 2008 05:01:01 +0000 (15:01 +1000)]
dont check whether the "recovered" event was successful or not
since  this event wont run unless the recovery mode is normal   but we
can not know what the recovery mode will be in the future on a remote node
so since we issue these commands   that will execute in the future at some other node
it is pointless to try to check if it worked or not

in particular if "failure to successfully run the eventscript" would then trigger a full new recovery which is disruptive and expensive.

16 years agoremove some unnessecary tests if ->vnn is null or not
Ronnie Sahlberg [Thu, 15 May 2008 03:28:19 +0000 (13:28 +1000)]
remove some unnessecary tests if ->vnn is null or not

16 years agoUpdate some debug statements. Dont say that recovery failed if the failed function...
Ronnie Sahlberg [Thu, 15 May 2008 02:28:52 +0000 (12:28 +1000)]
Update some debug statements. Dont say that recovery failed if the failed function was invoked from outside of recovery

16 years agoMerge git://git.samba.org/tridge/ctdb
Ronnie Sahlberg [Wed, 14 May 2008 22:02:51 +0000 (08:02 +1000)]
Merge git://git.samba.org/tridge/ctdb

16 years agoput the return in the right place
Andrew Tridgell [Wed, 14 May 2008 12:05:09 +0000 (22:05 +1000)]
put the return in the right place

We were refusing the 'startrecovery' event

16 years agoFix the chicken and egg problem with ctdb/samba and a registry smb.conf
Andrew Tridgell [Wed, 14 May 2008 10:57:04 +0000 (20:57 +1000)]
Fix the chicken and egg problem with ctdb/samba and a registry smb.conf

This attempts to fix the problem of ctdb event scripts blocking due to
attempted access to the ctdb databases during recovery. The changes are:

  - now only the 'shutdown' and 'startrecovery' events can be called
    with the databases locked in recovery. The event scripts must ensure
    that for these two events no database access is attempted

  - the recovered, takeip and releaseip events could previously be called
    inside a recovery. The code now ensures that this doesn't happen, delaying
    the events till after recovery has finished

  - the 50.samba event script now avoids using testparm unless it is really
    needed

This needs extensive testing.

16 years agoStart implementing support for ipv6.
Ronnie Sahlberg [Wed, 14 May 2008 05:47:47 +0000 (15:47 +1000)]
Start implementing support for ipv6.

This enhances the framework for sending tcp tickles to be able to send ipv6 tickles as well.

Since we can not use one single RAW socket to send both handcrafted ipv4 and ipv6 packets, instead of always opening TWO sockets, one ipv4 and one ipv6 we get rid of the helper ctdb_sys_open_sending_socket() and just open (and close)  a raw socket of the appropriate type inside ctdb_sys_send_tcp().
We know which type of socket v4/v6 to use based on the sin_family of the destination address.

Since ctdb_sys_send_tcp() opens its own socket  we no longer nede to pass a socket
descriptor as a parameter.  Get rid of this redundant parameter and fixup all callers.

16 years agoadd a new container to hold a socketaddr for either ipv4 or ipv6
Ronnie Sahlberg [Wed, 14 May 2008 05:40:44 +0000 (15:40 +1000)]
add a new container to hold a socketaddr for either ipv4 or ipv6

16 years agoAdd a missing include
Ronnie Sahlberg [Wed, 14 May 2008 05:37:20 +0000 (15:37 +1000)]
Add a missing include

16 years agomove the function to open a sending socket into the main executable since this functi...
Ronnie Sahlberg [Wed, 14 May 2008 05:33:01 +0000 (15:33 +1000)]
move the function to open a sending socket into the main executable since this function will dissapear soon...

16 years agoMerge commit 'ronnie-ctdb/master' into tridge
Andrew Tridgell [Wed, 14 May 2008 04:37:11 +0000 (14:37 +1000)]
Merge commit 'ronnie-ctdb/master' into tridge

16 years agoadd a checksum routine for tcp over ipv6
Ronnie Sahlberg [Wed, 14 May 2008 02:25:55 +0000 (12:25 +1000)]
add a checksum routine for tcp over ipv6

16 years agoWhen we run the init script to start the ctdb service
Ronnie Sahlberg [Mon, 12 May 2008 06:44:33 +0000 (16:44 +1000)]
When we run the init script to start the ctdb service
Use tdbdump to verify that all persistent database files are good
before we start the daemon.

16 years agoTry to use tdb transactions when updating a record and record header inside the ctdb...
Ronnie Sahlberg [Mon, 12 May 2008 03:37:31 +0000 (13:37 +1000)]
Try to use tdb transactions when updating a record and record header inside the ctdb daemon.

If a transaction could be started, do safe transaction store when updating the record inside the daemon.
If the transaction could not be started (maybe another samba process has a lock on the database?) then just do a normal store instead (instead of blocking the ctdb daemon).

The client can "signal" ctdb that updates to this database should, if possible, be done using safe transactions by specifying the TDB_NOSYNC flag when attaching to the database.
The TDB flags are passed to ctdb in the "srvid" field of the control header when attaching using the CTDB_CONTROL_DB_ATTACH_PERSISTENT.

Currently, samba3.2 does not yet tell ctdbd to handle any persistent databases using safe transactions.

If samba3.2 wants a particular persistent database to be handled using
safe transactions inside the ctdbd daemon, it should pass
TDB_NOSYNC as the flags to the call to attach to a persistent database
in ctdbd_db_attach()     it currently specifies 0 as the srvid

16 years agoUpdate to new release
Ronnie Sahlberg [Sun, 11 May 2008 21:24:02 +0000 (07:24 +1000)]
Update to new release

16 years agowhen pulling the nfs directories to check during 60.nfs monitor
Ronnie Sahlberg [Sun, 11 May 2008 04:30:43 +0000 (14:30 +1000)]
when pulling the nfs directories to check during 60.nfs monitor
grep for lines starting with a '/' character since exportfs will sometimes
split a single export line into two lines of output    like this :

[root@fscc-hs21-13 ~]# exportfs
/NFS4exports/tmp
                <world>
/NFS4exports    <world>

16 years agoctdb->methods becomes NULL when we shutdown the transport.
Ronnie Sahlberg [Sun, 11 May 2008 04:28:33 +0000 (14:28 +1000)]
ctdb->methods becomes NULL when we shutdown the transport.

If we shutdown the transport   and CTDB later decides to send a command out
for queueing, the call to ctdb->methods->allocate_pkt() will SEGV.

This could trigger for example when we are in the process of shuttind down CTDBD and have already shutdown the transport but we are still waiting for the
"shutdown" eventscripts to finish.
If the event scripts now take much much longer to execute for some reason, this
race condition becomes much more probable.

Decorate all dereferencing of ctdb->methods->    with a check that ctdb->menthods is non-NULL

16 years agoneed to specicy tree to git archive
Andrew Tridgell [Fri, 9 May 2008 23:35:13 +0000 (09:35 +1000)]
need to specicy tree to git archive

16 years agouse git archive to create tarball
Andrew Tridgell [Fri, 9 May 2008 23:24:51 +0000 (09:24 +1000)]
use git archive to create tarball

16 years agoupdate to new version
Ronnie Sahlberg [Fri, 9 May 2008 03:47:38 +0000 (13:47 +1000)]
update to new version

16 years agofix a bug where the public ip addresses of the cluster would not be redistributed...
Ronnie Sahlberg [Fri, 9 May 2008 03:41:31 +0000 (13:41 +1000)]
fix a bug where the public ip addresses of the cluster would not be redistributed across the cluster after a recovery was performed.

Remove a bogus check inside the recovery daemon that ONLY redistributed public addresses IFF the local node had/served public addresses.
This was a valid optimization long ago when we enforced that all nodes must use the same public addresses file   but is invalid today where we can have different public addresses configs on all nodes  and even have some nodes that do NOT use public addresses at all.

16 years agofixed realloc bug
Andrew Tridgell [Thu, 8 May 2008 09:59:24 +0000 (19:59 +1000)]
fixed realloc bug

Should always use type safe talloc functions when possible. In this case we were allocating bytes instead of uint32_t

16 years agofix merge corruption
Ronnie Sahlberg [Thu, 8 May 2008 09:52:27 +0000 (19:52 +1000)]
fix merge corruption

16 years agoMerge git://git.samba.org/tridge/ctdb
Ronnie Sahlberg [Thu, 8 May 2008 07:49:48 +0000 (17:49 +1000)]
Merge git://git.samba.org/tridge/ctdb

16 years agoMerge commit 'sofs1/tridge'
Andrew Tridgell [Thu, 8 May 2008 07:15:41 +0000 (17:15 +1000)]
Merge commit 'sofs1/tridge'

16 years agolisten_fd is auto-closed
root [Thu, 8 May 2008 07:14:00 +0000 (17:14 +1000)]
listen_fd is auto-closed

Closing it here just causes an epoll error, and may close a fd in use by
another structure to be closed. This caused a infinite recovery loop

16 years agoMerge branch 'master' of git://git.samba.org/sahlberg/ctdb
Andrew Tridgell [Thu, 8 May 2008 06:58:34 +0000 (16:58 +1000)]
Merge branch 'master' of git://git.samba.org/sahlberg/ctdb

16 years agoMerge commit 'ronnie-ctdb/master' into tridge
root [Thu, 8 May 2008 06:46:23 +0000 (16:46 +1000)]
Merge commit 'ronnie-ctdb/master' into tridge

16 years agoFrom Mathias Dietz
Ronnie Sahlberg [Wed, 7 May 2008 20:52:53 +0000 (06:52 +1000)]
From Mathias Dietz

Make the 60.nfs eventscript more forgiving when using non-us/english
characters in sharenames

16 years agoupdate to version .35
Ronnie Sahlberg [Wed, 7 May 2008 01:31:37 +0000 (11:31 +1000)]
update to version .35

16 years agoExpand the client async framework so that it can take a callback function.
Ronnie Sahlberg [Tue, 6 May 2008 05:42:59 +0000 (15:42 +1000)]
Expand the client async framework so that it can take a callback function.
This allows us to use the async framework also for controls that return
outdata.

Add a "capabilities" field to the ctdb_node structure. This field is
only initialized and kept valid inside the recovery daemon context and not
inside the main ctdb daemon.

change the GET_CAPABILITIES control to return the capabilities in outdata instead of in the res return variable.

When performing a recovery inside the recovery daemon, read the capabilities from all connected nodes and update the ctdb->nodes list of nodes.
when building the new vnnmap after the database rebuild in recovery, do not include any nodes which lack the LMASTER capability in the new vnnmap.
Unless there are no available connected node that sports the LMASTER capability in which case we let the local node (recmaster) take on the lmaster role temporarily (i.e. become a member of the vnnmap list)

16 years agomake sure we lose all elections for recmaster role if we do not have the recmaster...
Ronnie Sahlberg [Tue, 6 May 2008 03:56:56 +0000 (13:56 +1000)]
make sure we lose all elections for recmaster role if we do not have the recmaster capability.

(unless there are no other node at all available with this capability)

16 years agoclose and reopen the reclock pnn file at regular intervals.
Ronnie Sahlberg [Tue, 6 May 2008 03:27:17 +0000 (13:27 +1000)]
close and reopen the reclock pnn file at regular intervals.

handle failure to get/hold the reclock pnn file better and just
treat it as a transient backend filesystem error and try again later
instead of shutting down the recovery daemon

when we have lost the pnn file   and if we are recmaster
release the recmaster role so that someone else can become recmaster isntead

16 years agoMonitor that the recovery daemon is still running from the main ctdb daemon
Ronnie Sahlberg [Tue, 6 May 2008 01:19:17 +0000 (11:19 +1000)]
Monitor that the recovery daemon is still running from the main ctdb daemon
and if it has terminated, then we shut down the main daemon as well

16 years agoAdd ability to disable recmaster and lmaster roles through sysconfig file and
Ronnie Sahlberg [Tue, 6 May 2008 00:41:22 +0000 (10:41 +1000)]
Add ability to disable recmaster and lmaster roles through sysconfig file and
command line arguments

16 years agoAdd a capabilities field to the ctdb structure
Ronnie Sahlberg [Tue, 6 May 2008 00:02:27 +0000 (10:02 +1000)]
Add a capabilities field to the ctdb structure

Define two capabilities :
can be recmaster
can be lmaster
Default both capabilities to YES

Update the ctdb tool to read capabilities off a node

16 years agoUse DEBUG_ERR and not DEBUG_WARNING when we get a connection
Ronnie Sahlberg [Mon, 5 May 2008 21:57:43 +0000 (07:57 +1000)]
Use DEBUG_ERR and not DEBUG_WARNING when we get a connection
attempt from a non-ctdb host