12 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

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

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

This reverts commit f71287a28d66db202fe52f9a43b6daf2389d7f66.

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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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 :-)

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

12 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

12 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

12 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

12 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.

12 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

12 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

12 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

12 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

12 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

12 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

12 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.

12 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.

12 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

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

12 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

12 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

12 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

12 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

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

12 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

12 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.

12 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

12 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.

12 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.

12 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.

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

12 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

12 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

12 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

12 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

12 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)

12 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

12 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.

12 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" ...

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

12 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"

12 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

12 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.

12 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

12 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

12 years agoMerge git://
Ronnie Sahlberg [Wed, 14 May 2008 22:02:51 +0000 (08:02 +1000)]
Merge git://

12 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

12 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

This needs extensive testing.

12 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.

12 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

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

12 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...

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

12 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

12 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.

12 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

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

12 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    <world>

12 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

12 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

12 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

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

12 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.

12 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

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

12 years agoMerge git://
Ronnie Sahlberg [Thu, 8 May 2008 07:49:48 +0000 (17:49 +1000)]
Merge git://

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

12 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

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

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

12 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

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

12 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

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)

12 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)

12 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

12 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

12 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

12 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

12 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

12 years agoupdate version to .34
Ronnie Sahlberg [Thu, 24 Apr 2008 12:06:04 +0000 (22:06 +1000)]
update version to .34

12 years agowhen deleting a public ip from a node that is currently hosting this ip, try to move...
Ronnie Sahlberg [Thu, 24 Apr 2008 11:51:08 +0000 (21:51 +1000)]
when deleting a public ip from a node that is currently hosting this ip, try to move the ip address to a different node first

12 years agomake 'ctdb catdb' produce output that resembles the output of tdbdump
Ronnie Sahlberg [Wed, 23 Apr 2008 11:49:52 +0000 (21:49 +1000)]
make 'ctdb catdb' produce output that resembles the output of tdbdump

12 years agowhen adding a new public ip address to a running node using the 'ctdb addip' command,
Ronnie Sahlberg [Wed, 23 Apr 2008 11:05:36 +0000 (21:05 +1000)]
when adding a new public ip address to a running node using the 'ctdb addip' command,
If no other node is hosting this public ip at the moment, then assign it immediately to the current node.

12 years agoRevert "- accept an optional set of tdb_flags from clients on open a database,"
Ronnie Sahlberg [Thu, 10 Apr 2008 04:45:45 +0000 (14:45 +1000)]
Revert "- accept an optional set of tdb_flags from clients on open a database,"

This reverts commit 49330f97c78ca0669615297ac3d8498651831214.

12 years agoRevert "Revert "- accept an optional set of tdb_flags from clients on open a database,""
Ronnie Sahlberg [Thu, 10 Apr 2008 04:57:41 +0000 (14:57 +1000)]
Revert "Revert "- accept an optional set of tdb_flags from clients on open a database,""

This reverts commit 171d1d71ef9f2373620bd7da3adaecb405338603.

12 years agoRevert "Revert "Revert "- accept an optional set of tdb_flags from clients on open...
Ronnie Sahlberg [Thu, 10 Apr 2008 05:59:51 +0000 (15:59 +1000)]
Revert "Revert "Revert "- accept an optional set of tdb_flags from clients on open a database,"""

remove the transaction stuff and push   so that the git tree will work

This reverts commit 539bbdd9b0d0346b42e66ef2fcfb16f39bbe098b.

12 years agomake ctdb eventrscipt accept the -n all argument to run the event script on all conne...
Ronnie Sahlberg [Tue, 15 Apr 2008 08:24:48 +0000 (18:24 +1000)]
make ctdb eventrscipt accept the -n all argument to run the event script on all connected nodes

12 years agowhen a node disgrees with us re who is recmaster
Ronnie Sahlberg [Mon, 21 Apr 2008 14:56:27 +0000 (00:56 +1000)]
when a node disgrees with us re who is recmaster
make it mark that node as a lcuprit so it eventually gets banned

12 years agoadd support for -n all in "ctdb -n all ip"
Ronnie Sahlberg [Tue, 22 Apr 2008 14:55:57 +0000 (00:55 +1000)]
add support for -n all   in "ctdb -n all ip"
this collects all public addresses from all nodes and presents the public ips
for the entire cluster

12 years agoadd support for -n all in "ctdb -n all ip"
Ronnie Sahlberg [Tue, 22 Apr 2008 14:55:57 +0000 (00:55 +1000)]
add support for -n all   in "ctdb -n all ip"
this collects all public addresses from all nodes and presents the public ips
for the entire cluster

12 years agofixed permissions on configure.rpm
Andrew Tridgell [Tue, 22 Apr 2008 14:48:25 +0000 (16:48 +0200)]
fixed permissions on configure.rpm

12 years agowhen a node disgrees with us re who is recmaster
Ronnie Sahlberg [Mon, 21 Apr 2008 14:56:27 +0000 (00:56 +1000)]
when a node disgrees with us re who is recmaster
make it mark that node as a lcuprit so it eventually gets banned