samba.git
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.

(This used to be ctdb commit 3d85d2cf669686f89cacdc481eaa97aef1ba62c0)

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.

(This used to be ctdb commit 7fb6cf549de1b5e9ac5a3e4483c7591850ea2464)

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

(This used to be ctdb commit 2908e092710d7fa2245161b3315747e17e4226c0)

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

(This used to be ctdb commit 92be23dbd6a5bf32d4d1af4a41437fbcd7d8eaf2)

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

(This used to be ctdb commit a953a0fb450955b62d747bdc82c5b968fe0ed378)

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

(This used to be ctdb commit 1ad0295f86370979d0537f7290f5e9c7d1ff6e94)

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

(This used to be ctdb commit c8181476748395fe6ec5284c49e9d37b882d15ea)

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)

(This used to be ctdb commit 1360c2f08a463f288b344d02025e84113743026d)

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

(This used to be ctdb commit c66e44d44f8d1142394ce5c6a68ac09fd67211fe)

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.

(This used to be ctdb commit 56af7df33456bf10d19b97cb005257720ac0b610)

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

(This used to be ctdb commit d32b16a4e5ecc31563c6f2767e7d483f3d980284)

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

(This used to be ctdb commit f0b98a32be2043a465d4d0ab42e6c2407d9d60f2)

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"

(This used to be ctdb commit 9aa09aee618fa71787c5d0e7c885e83f4d82236c)

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

(This used to be ctdb commit 68029894f80804c9f31fc90ed0c1b58f75812c3d)

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.

(This used to be ctdb commit 2c292039a0139dcf5bb2bd964eb6f8902d094c50)

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

(This used to be ctdb commit f0169ac8166a19d65ce254496e21d095aed87c2f)

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

(This used to be ctdb commit 3038d0b74895b51af4f85f2f304508ed16d245f4)

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

(This used to be ctdb commit d5fb4489f83f1f956b2c083cfad1861c5ddde283)

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

(This used to be ctdb commit 788d38812d73729f11d12e9812b16092c0ae4123)

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.

(This used to be ctdb commit e3cdb8f2be6a44ec877efcd75c7297edb008a80b)

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.

(This used to be ctdb commit 406a2a1e364cf71eb15e5aeec3b87c62f825da92)

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

(This used to be ctdb commit 93b98838824fae5f47e4ed6b95ae9e4e7597bec3)

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

(This used to be ctdb commit 6131f4b4fc7b65f83f3d57927b23393c84bd2a2b)

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

(This used to be ctdb commit 7f4c7cf6355a88b1a02d3a4d1fa25427106953f9)

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

(This used to be ctdb commit b616961c16667328a81efa00a1c880efa4e791f1)

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

(This used to be ctdb commit b712762a1b8a3028625085e32136df4458b292c0)

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.

(This used to be ctdb commit 13d3eb9a8bc7fad14fcd3e7e023c1336657424d6)

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

(This used to be ctdb commit 8d6ecf47318188448d934ab76e40da7e4cece67d)

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

(This used to be ctdb commit 423a2b0965ed6aaaf1dce8864a07ed93944bcf16)

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>

(This used to be ctdb commit 7c569720beb626617d800211faaf9029f0deb4cf)

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

(This used to be ctdb commit c4c2c53918da6fb566d6e9cbd6b02e61ae2921e7)

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

(This used to be ctdb commit 3e6160e5d90a0661eb833b163c11be2267117d0b)

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

(This used to be ctdb commit 7b624add53c270f803177237c08e867f70bc85cc)

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

(This used to be ctdb commit d36f6a5ceb57364449b246a4e6664a7da6cb0040)

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.

(This used to be ctdb commit 5833e6b99d9afaf35dc8354df8676b9115418b23)

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

(This used to be ctdb commit cb14ee57dd0a589242da1ac2830bb7939df460a5)

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

(This used to be ctdb commit 17b1e3b2d72c453a0b2f5a783c28f9dd17334620)

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

(This used to be ctdb commit 947bcc76ff0e90b613f20246be67ff014098a74d)

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

(This used to be ctdb commit e8f3431597bc9ec67387ea7e702d2d00f36007f0)

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

(This used to be ctdb commit bc251ac7029c2689776a8c31b28ac1d233d52d4f)

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

(This used to be ctdb commit cb2c05d5d3f8908eecdad1ae6a1dc8efa1ffcb1e)

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

(This used to be ctdb commit 2ef839c95a48cd8a5f0ed385e92bdb89de71b4a2)

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

(This used to be ctdb commit f4385712134ea783a0c79a687c5d4e6faa1cc4a7)

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

(This used to be ctdb commit 9e08ab6c9f54f5a2c5790927e9aff107ca85a2cc)

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)

(This used to be ctdb commit 0f1883c69c689b28b0c04148774840b2c4081df6)

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)

(This used to be ctdb commit 8556e9dc897c6b9b9be0b52f391effb1f72fbd80)

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

(This used to be ctdb commit e513277fb09b951427be8351d04c877e0a15359d)

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

(This used to be ctdb commit 7e587acaf8006254e89ff9b4bf48454821c85863)

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

(This used to be ctdb commit 34b952e4adc53ee82345275a0e28231fa1b2533e)

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

(This used to be ctdb commit 50f1255ea9ed15bb8fa11cf838b29afa77e857fd)

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

(This used to be ctdb commit 40c7a536c6b428caef7904a1de860d82a70748af)

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

(This used to be ctdb commit 56d9c8b222436814fa39bc583318e6fd8e6c74c3)

16 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

(This used to be ctdb commit 9395a05de669c69396e701fb36409ec49d3ebef6)

16 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

(This used to be ctdb commit 8e894d8baf20a455b50c5c1b1ac0540d9e766c5d)

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

(This used to be ctdb commit a63825e32658b36e0964584758b9a276c18056b8)

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

(This used to be ctdb commit 4063aed8c6babf02726a1663375ea5d32c423e8c)

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

(This used to be ctdb commit 79ca87e53dc4c1c73c511680d28db644140a326c)

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

(This used to be ctdb commit 7dad1c34f94a433bbb5784cb7156b84bd2e8cd1b)

16 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

(This used to be ctdb commit 772052e071718f20a19d24d5e06a5a2ef87549f2)

16 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

(This used to be ctdb commit 42ceac4d7f31470e9d626a1709de79658aebde7e)

16 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

(This used to be ctdb commit cbf79b2158ab21a58aef967e89f0bd60890a7972)

16 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

(This used to be ctdb commit 0a4e667f42c6fb23be13651f7b0d0a545a49900b)

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

(This used to be ctdb commit badf34692449bf658cef488c0da6c3eb90187555)

16 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

(This used to be ctdb commit eff3f326f8ce6070c9f3c430cd14d1b71a8db220)

16 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

(This used to be ctdb commit 3fad7d67f2c66ac3a65cfd821fd6db6342f4a3f0)

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

(This used to be ctdb commit 876d3aca18c27c2239116c8feb6582b3a68c6571)

16 years ago- accept an optional set of tdb_flags from clients on open a database,
Andrew Tridgell [Thu, 10 Apr 2008 05:25:48 +0000 (15:25 +1000)]
- accept an optional set of tdb_flags from clients on open a database,
  thus allowing the client to pass through the TDB_NOSYNC flag

- ensure that tdb_store() operations on persistent databases that don't
  have TDB_NOSYNC set happen inside a transaction wrapper, thus making
  them crash safe

(This used to be ctdb commit 49330f97c78ca0669615297ac3d8498651831214)

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

(This used to be ctdb commit 539bbdd9b0d0346b42e66ef2fcfb16f39bbe098b)

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

(This used to be ctdb commit 171d1d71ef9f2373620bd7da3adaecb405338603)

16 years agofix compiler warning during a fatal error failing to lock down the socket
Ronnie Sahlberg [Wed, 9 Apr 2008 23:56:49 +0000 (09:56 +1000)]
fix compiler warning during a fatal error failing to lock down the socket

(This used to be ctdb commit 0ad22de1a614dc2d1926546027be5f5eea3381ed)

16 years agoshell scripts need extra spaces sometime
Ronnie Sahlberg [Wed, 9 Apr 2008 21:01:22 +0000 (07:01 +1000)]
shell scripts need extra spaces sometime

(This used to be ctdb commit f6409b19972fa94257af9aa51def539f639bc226)

16 years agoupdate to version .33
Ronnie Sahlberg [Wed, 9 Apr 2008 20:55:31 +0000 (06:55 +1000)]
update to version .33

(This used to be ctdb commit 2ac9e29c13e9ce5903d26bcc3b845e3b05a53edc)

16 years agoFrom Chris Cowan
Ronnie Sahlberg [Wed, 9 Apr 2008 20:51:53 +0000 (06:51 +1000)]
From Chris Cowan
secure the domain socket and set permissions properly

(This used to be ctdb commit ac6a362fc2fc4a56b4c310478a96eb12daace176)

16 years agoadd possibility to provide site local modifications to the event system
Ronnie Sahlberg [Wed, 9 Apr 2008 20:50:12 +0000 (06:50 +1000)]
add possibility to provide site local modifications to the event system
through a /etc/ctdb/rc.local script that is sources by /etc/ctdb/functions

(This used to be ctdb commit a5b7dd97e3faf0c4f289240307d0e22a67cf2353)

16 years agoadd a ctdb command to print the ctdb version
Ronnie Sahlberg [Thu, 3 Apr 2008 06:07:00 +0000 (17:07 +1100)]
add a ctdb command to print the ctdb version

(This used to be ctdb commit 401fb01f8cb06886e2c5c277a9a70512a9b68579)

16 years agowe allocated one byte too little in the blob we need to send as the control to the...
Ronnie Sahlberg [Thu, 3 Apr 2008 05:35:23 +0000 (16:35 +1100)]
we allocated one byte too little in the blob we need to send as the control to the server.

(This used to be ctdb commit 10e585413c217d9b9c32ff3d2fb3d8f24183c458)

16 years agoFrom Chris Cowan
Ronnie Sahlberg [Wed, 2 Apr 2008 23:58:51 +0000 (10:58 +1100)]
From Chris Cowan

Add support in AIX to track the PID of a client that connects to the unix domain socket

(This used to be ctdb commit 4c006c675d577d4a45f4db2929af6d50bc28dd9e)

16 years agobump version to .32
Ronnie Sahlberg [Wed, 2 Apr 2008 01:09:27 +0000 (12:09 +1100)]
bump version to .32

(This used to be ctdb commit 794ed5852c09deaffd1817f8a443b4711ed4d06f)

16 years agoadd a mechanism to force a node to run the eventscripts with arbitrary arguments
Ronnie Sahlberg [Wed, 2 Apr 2008 00:13:30 +0000 (11:13 +1100)]
add a mechanism to force a node to run the eventscripts with arbitrary arguments

ctdb eventscript "command argument argument ..."

(This used to be ctdb commit 118a16e763d8332c6ce4d8b8e194775fb874c8c8)

16 years agodecorate the memdump output with a nice field for ctdb_client structures to show...
Ronnie Sahlberg [Tue, 1 Apr 2008 06:17:21 +0000 (17:17 +1100)]
decorate the memdump output with a nice field for ctdb_client structures to show the pid of the client that attached

(This used to be ctdb commit 0d9314302d0b988b6ab5d533deef40c5b343c249)

16 years agoadd improvements to tracking memory usage in ctdbd adn the recovery daemon
Ronnie Sahlberg [Tue, 1 Apr 2008 04:34:54 +0000 (15:34 +1100)]
add improvements to tracking memory usage in ctdbd adn the recovery daemon

and a ctdb command to pull the talloc memory map from a recovery daemon
ctdb rddumpmemory

(This used to be ctdb commit d23950be7406cf288f48b660c0f57a9b8d7bdd05)

16 years agofrom tridge: decorate dumpmemory output so that packets that are queued show up with...
Ronnie Sahlberg [Tue, 1 Apr 2008 00:31:42 +0000 (11:31 +1100)]
from tridge: decorate dumpmemory output so that packets that are queued show up with a little more information to make memory leak debugging easier

(This used to be ctdb commit 890832ba37d92c7996b38735451f93592c37ff79)

16 years agoreturn 0 if iscsi is disabled
Ronnie Sahlberg [Mon, 31 Mar 2008 01:58:20 +0000 (12:58 +1100)]
return 0 if iscsi is disabled

(This used to be ctdb commit b76400e282cab60ac6b6039dbb33d93bb1350199)

16 years agomake sure the iface string is nullterminated in the addip control packet
Ronnie Sahlberg [Mon, 31 Mar 2008 01:49:39 +0000 (12:49 +1100)]
make sure the iface string is nullterminated in the addip control packet

(This used to be ctdb commit 983490556bc12fe03de4c22b5fdc12d15c11d43c)

16 years agoupdate the iscis support under RHEL5 to allow one iscsi target to be defined for...
Ronnie Sahlberg [Mon, 31 Mar 2008 00:00:08 +0000 (11:00 +1100)]
update the iscis support under RHEL5 to allow one iscsi target to be defined for each public address in the cluster.

update the documentation for iscsi

(This used to be ctdb commit c1130e58296e63be3787ec59690941b2677a3378)

16 years agoAdd two new controls to add/delete public ip address from a node at runtime.
Ronnie Sahlberg [Wed, 26 Mar 2008 22:23:27 +0000 (09:23 +1100)]
Add two new controls to add/delete public ip address from a node at runtime.

The controls only modify the runtime setting of which public addresses a node
can server and does not modify /etc/ctdb/public_addresses.
To make the change permanent you also need to edit /etc/ctdb/public_addresses
manually.

After ip addresses have been added/deleted you need to invoke a recovery
for the ip addresses to be redistributed.

(This used to be ctdb commit f8294d103fdd8a720d0b0c337d3973c7fdf76b5c)

16 years agofix a memory leak
Ronnie Sahlberg [Tue, 25 Mar 2008 00:11:13 +0000 (11:11 +1100)]
fix a memory leak

allocate the memory to the 'call' context and not off the 'ctdb' context

(This used to be ctdb commit be89005bd5d13409e377d425db2aad1c0d5b3826)

16 years agoupdate to version 1.0.31
Ronnie Sahlberg [Mon, 24 Mar 2008 22:43:47 +0000 (09:43 +1100)]
update to version 1.0.31

(This used to be ctdb commit a0c9a451afde0c99efdc92e1fd418991bb81fa2b)

16 years agoFrom M Dietz,
Ronnie Sahlberg [Mon, 24 Mar 2008 21:27:38 +0000 (08:27 +1100)]
From M Dietz,
Add back the controls to enable/disable monitoring we used to have for debugging but removed a while ago

(This used to be ctdb commit 8477f6a079e2beb8c09c19702733c4e17f5032fe)

16 years agoin ctdb_call_local() we can not talloc_steal() the returned data and hang it off...
Ronnie Sahlberg [Wed, 19 Mar 2008 02:54:17 +0000 (13:54 +1100)]
in ctdb_call_local() we can not talloc_steal() the returned data and hang it off ctdb.
This can cause a memory leak if the call is terminated before we have managed to respond to the client.
(and the call is talloc_free()d but the data is still hanging off ctdb)

instead we must talloc_steal() the data and hang it off the call structure to avoid the memory leak.

In order to do this we must also change the call structure that is passed into ctdb_call_local() to be allocated through talloc().

This structure was previously either a static variable, or an element of a larger talloc()ed structure (ctdb_call_state or ctdb_client_call_state) so
we must change all creations of a ctdb_call into explicitely creating it through talloc()

(This used to be ctdb commit 4becf32aea088a25686e8bc330eb47d85ae0ef8f)

16 years agodont steal reply_data.dptr to ctdb if there is no data, since then we would leak
Ronnie Sahlberg [Wed, 19 Mar 2008 01:08:29 +0000 (12:08 +1100)]
dont steal reply_data.dptr to ctdb if there is no data, since then we would leak
memory

(This used to be ctdb commit 53c4f483bb122e6fa13abcc6d4584130f20af461)

16 years agochange the log level for the message when someone connects to a non-public ip
Ronnie Sahlberg [Wed, 12 Mar 2008 20:54:55 +0000 (07:54 +1100)]
change the log level for the message when someone connects to a non-public ip

(This used to be ctdb commit bc9c4f0d52e9b06aceb08cea99ed3fd20b44616c)

16 years agoRedo the vacukming process to mkake it scalable.
Ronnie Sahlberg [Wed, 12 Mar 2008 20:53:29 +0000 (07:53 +1100)]
Redo the vacukming process to mkake it scalable.

Vacumming used to delete one record at a time on all nodes, that was
m*n behaviour and would require a huge storm of ctdb->ctdb controls and just wouldnt scale at all.

The new vacuming process collects all records to be deleted locally and then only sends 1 control to the other nodes. This control contains a list of all records to be deleted.

(This used to be ctdb commit 9e625ece19a91f362c9539fa73b6b2108f0d9c53)

16 years agoupdate to version 1.0.30
Ronnie Sahlberg [Tue, 4 Mar 2008 02:40:29 +0000 (13:40 +1100)]
update to version 1.0.30

(This used to be ctdb commit 89529ea81379335b3db09774d192fb7cefe37338)

16 years agoUpdate ctdb uptime to provide machinereadable output
Ronnie Sahlberg [Tue, 4 Mar 2008 02:29:48 +0000 (13:29 +1100)]
Update ctdb uptime to provide machinereadable output

(This used to be ctdb commit 4f7f8aa6f178115b551ac35f7df2ec5aad054fe2)

16 years agoprovide machinereadble -Y output for 'ctdb getdebug'
Ronnie Sahlberg [Tue, 4 Mar 2008 02:23:06 +0000 (13:23 +1100)]
provide machinereadble -Y output for 'ctdb getdebug'

(This used to be ctdb commit 646f4d9a01637685e967fb3ecc042fc97c0b7529)

16 years agomake 'ctdb ip' provide machinereadble output using '-Y'
Ronnie Sahlberg [Tue, 4 Mar 2008 02:18:27 +0000 (13:18 +1100)]
make 'ctdb ip' provide machinereadble output using '-Y'

(This used to be ctdb commit 446e2f4e650b12d6fce5677a6841006462c23dba)

16 years agodocument some public tunables
Ronnie Sahlberg [Tue, 4 Mar 2008 02:06:46 +0000 (13:06 +1100)]
document some public tunables

(This used to be ctdb commit 61fd50e2b3aa9a3ed32bc81a8e28464f267dc490)

16 years agodocument some new ctdb command
Ronnie Sahlberg [Tue, 4 Mar 2008 01:37:24 +0000 (12:37 +1100)]
document some new ctdb command

(This used to be ctdb commit f3648a8a5b3934ea42c7d2550f729a5bd61a4d0f)

16 years agoA new command to 'ctdb'
Ronnie Sahlberg [Tue, 4 Mar 2008 01:20:23 +0000 (12:20 +1100)]
A new command to 'ctdb'

ctdb moveip <IPADDRESS> <NODE>

which can be used to manually fail an ip address over to a specific node.

This can only be used if DeteministicIPs are disabled and also only if NoIPFailback is enabled.

(This used to be ctdb commit ffee062b7e26a6aa6ad254edb58399040ecaa542)