1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

1756 Commits

Author SHA1 Message Date
Ronnie Sahlberg
7178dfb656 add a checksum routine for tcp over ipv6
(This used to be ctdb commit b712762a1b8a3028625085e32136df4458b292c0)
2008-05-14 12:25:55 +10:00
Ronnie Sahlberg
d3e24f744a 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)
2008-05-12 16:44:33 +10:00
Ronnie Sahlberg
b8eb5925cf 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)
2008-05-12 13:37:31 +10:00
Ronnie Sahlberg
d5ec45ee80 Update to new release
(This used to be ctdb commit 423a2b0965ed6aaaf1dce8864a07ed93944bcf16)
2008-05-12 07:24:02 +10:00
Ronnie Sahlberg
49e38d9f96 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)
2008-05-11 14:30:43 +10:00
Ronnie Sahlberg
adf40341a7 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)
2008-05-11 14:28:33 +10:00
Andrew Tridgell
78a0203e66 need to specicy tree to git archive
(This used to be ctdb commit 3e6160e5d90a0661eb833b163c11be2267117d0b)
2008-05-10 09:35:13 +10:00
Andrew Tridgell
093ce0609d use git archive to create tarball
(This used to be ctdb commit 7b624add53c270f803177237c08e867f70bc85cc)
2008-05-10 09:24:51 +10:00
Ronnie Sahlberg
ac9b9679bb update to new version
(This used to be ctdb commit d36f6a5ceb57364449b246a4e6664a7da6cb0040)
2008-05-09 13:47:38 +10:00
Ronnie Sahlberg
f196afd58b 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)
2008-05-09 13:41:31 +10:00
Andrew Tridgell
abe6d816bb 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)
2008-05-08 19:59:24 +10:00
Ronnie Sahlberg
123d0b3b1e fix merge corruption
(This used to be ctdb commit 17b1e3b2d72c453a0b2f5a783c28f9dd17334620)
2008-05-08 19:52:27 +10:00
Ronnie Sahlberg
60103afff5 Merge git://git.samba.org/tridge/ctdb
(This used to be ctdb commit 947bcc76ff0e90b613f20246be67ff014098a74d)
2008-05-08 17:49:48 +10:00
Andrew Tridgell
366c42b2d6 Merge commit 'sofs1/tridge'
(This used to be ctdb commit e8f3431597bc9ec67387ea7e702d2d00f36007f0)
2008-05-08 17:15:41 +10:00
root
fb5cc54206 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)
2008-05-08 17:14:00 +10:00
Andrew Tridgell
e8a62cdca4 Merge branch 'master' of git://git.samba.org/sahlberg/ctdb
(This used to be ctdb commit cb2c05d5d3f8908eecdad1ae6a1dc8efa1ffcb1e)
2008-05-08 16:58:34 +10:00
root
69bdb33331 Merge commit 'ronnie-ctdb/master' into tridge
(This used to be ctdb commit 2ef839c95a48cd8a5f0ed385e92bdb89de71b4a2)
2008-05-08 16:46:23 +10:00
Ronnie Sahlberg
41e762a836 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)
2008-05-08 06:52:53 +10:00
Ronnie Sahlberg
d00c54932a update to version .35
(This used to be ctdb commit 9e08ab6c9f54f5a2c5790927e9aff107ca85a2cc)
2008-05-07 11:31:37 +10:00
Ronnie Sahlberg
92b61cd7d5 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)
2008-05-06 15:42:59 +10:00
Ronnie Sahlberg
2c23959616 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)
2008-05-06 13:56:56 +10:00
Ronnie Sahlberg
6863c8f573 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)
2008-05-06 13:27:17 +10:00
Ronnie Sahlberg
80f85dc390 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)
2008-05-06 11:19:17 +10:00
Ronnie Sahlberg
d86e48d5ff Add ability to disable recmaster and lmaster roles through sysconfig file and
command line arguments

(This used to be ctdb commit 34b952e4adc53ee82345275a0e28231fa1b2533e)
2008-05-06 10:41:22 +10:00
Ronnie Sahlberg
a9c45f9513 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)
2008-05-06 10:02:27 +10:00
Ronnie Sahlberg
f8dadebbcf 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)
2008-05-06 07:57:43 +10:00
Ronnie Sahlberg
f148f1b3ce update version to .34
(This used to be ctdb commit 56d9c8b222436814fa39bc583318e6fd8e6c74c3)
2008-04-24 22:06:04 +10:00
Ronnie Sahlberg
6fd1c60741 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)
2008-04-24 21:51:08 +10:00
Ronnie Sahlberg
6a5b593a9d make 'ctdb catdb' produce output that resembles the output of tdbdump
(This used to be ctdb commit 8e894d8baf20a455b50c5c1b1ac0540d9e766c5d)
2008-04-23 21:49:52 +10:00
Ronnie Sahlberg
60583c70bc 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)
2008-04-23 21:05:36 +10:00
Ronnie Sahlberg
aca21ff2da 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)
2008-04-22 22:24:54 +02:00
Ronnie Sahlberg
8f40189b61 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)
2008-04-22 22:24:45 +02:00
Ronnie Sahlberg
b13c0214b8 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)
2008-04-22 22:24:32 +02:00
Ronnie Sahlberg
b1b8aeb414 make ctdb eventrscipt accept the -n all argument to run the event script on all connected nodes
(This used to be ctdb commit 772052e071718f20a19d24d5e06a5a2ef87549f2)
2008-04-22 22:23:57 +02:00
Ronnie Sahlberg
4304a586e1 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)
2008-04-22 22:23:43 +02:00
Ronnie Sahlberg
bb237ab5ec 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)
2008-04-22 22:18:54 +02:00
Ronnie Sahlberg
a6cbe34c62 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)
2008-04-23 00:55:57 +10:00
Andrew Tridgell
8e8e428c7b fixed permissions on configure.rpm
(This used to be ctdb commit badf34692449bf658cef488c0da6c3eb90187555)
2008-04-22 16:48:25 +02:00
Ronnie Sahlberg
073f4a7cb4 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)
2008-04-22 00:56:27 +10:00
Ronnie Sahlberg
f153a45e56 make ctdb eventrscipt accept the -n all argument to run the event script on all connected nodes
(This used to be ctdb commit 3fad7d67f2c66ac3a65cfd821fd6db6342f4a3f0)
2008-04-15 18:24:48 +10:00
Ronnie Sahlberg
0e1a20b603 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)
2008-04-10 15:59:51 +10:00
Andrew Tridgell
dc15a9c1f6 - 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)
2008-04-10 15:25:48 +10:00
Ronnie Sahlberg
39f119b42c 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)
2008-04-10 14:57:41 +10:00
Ronnie Sahlberg
9684befa16 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)
2008-04-10 14:45:45 +10:00
Ronnie Sahlberg
cd1858d126 fix compiler warning during a fatal error failing to lock down the socket
(This used to be ctdb commit 0ad22de1a614dc2d1926546027be5f5eea3381ed)
2008-04-10 09:56:49 +10:00
Ronnie Sahlberg
ea86c31da6 shell scripts need extra spaces sometime
(This used to be ctdb commit f6409b19972fa94257af9aa51def539f639bc226)
2008-04-10 07:01:22 +10:00
Ronnie Sahlberg
3f087a98c4 update to version .33
(This used to be ctdb commit 2ac9e29c13e9ce5903d26bcc3b845e3b05a53edc)
2008-04-10 06:55:31 +10:00
Ronnie Sahlberg
2da3fe1b17 From Chris Cowan
secure the domain socket and set permissions properly

(This used to be ctdb commit ac6a362fc2fc4a56b4c310478a96eb12daace176)
2008-04-10 06:51:53 +10:00
Ronnie Sahlberg
b902e09350 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)
2008-04-10 06:50:12 +10:00
Ronnie Sahlberg
416409d31b add a ctdb command to print the ctdb version
(This used to be ctdb commit 401fb01f8cb06886e2c5c277a9a70512a9b68579)
2008-04-03 17:07:00 +11:00