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

1728 Commits

Author SHA1 Message Date
Ronnie Sahlberg
5836576237 move CTDB_MANAGES_NFS from /etc/sysconfig/nfs to /etc/sysconfig/ctdb
(This used to be ctdb commit 92be23dbd6a5bf32d4d1af4a41437fbcd7d8eaf2)
2008-05-22 06:08:38 +10:00
Ronnie Sahlberg
e9664e5a4c move the CTDB_MANAGES_ISCSI setting from /etc/sysconfig/iscsi to /etc/sysconfig/ctdb
(This used to be ctdb commit a953a0fb450955b62d747bdc82c5b968fe0ed378)
2008-05-22 06:04:36 +10:00
Ronnie Sahlberg
f4ed8efa05 move the config optoin CTDB_MANAGES_VSFTPD from /etc/sysconfig/vsftpd to /etc/sysconfig/ctdb
(This used to be ctdb commit 1ad0295f86370979d0537f7290f5e9c7d1ff6e94)
2008-05-22 06:01:17 +10:00
Ronnie Sahlberg
92a0c0fc13 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)
2008-05-21 11:50:41 +10:00
Ronnie Sahlberg
9c23bf7776 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)
2008-05-21 11:44:50 +10:00
Ronnie Sahlberg
cc5dc9fe31 dont emit the can not start transaction with locks held at all.
it just pollutes the logs

(This used to be ctdb commit c66e44d44f8d1142394ce5c6a68ac09fd67211fe)
2008-05-21 11:23:46 +10:00
Ronnie Sahlberg
26e5f71308 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)
2008-05-21 11:15:14 +10:00
Ronnie Sahlberg
e50dfb07bf 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)
2008-05-16 15:14:17 +10:00
Ronnie Sahlberg
112a1fcb91 new version .38
(This used to be ctdb commit f0b98a32be2043a465d4d0ab42e6c2407d9d60f2)
2008-05-16 09:51:42 +10:00
Ronnie Sahlberg
9da30f488d add "machinereadable output" support to "ctdb getmonmode"
(This used to be ctdb commit 9aa09aee618fa71787c5d0e7c885e83f4d82236c)
2008-05-16 09:21:44 +10:00
Ronnie Sahlberg
f4fd4d0af8 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)
2008-05-16 08:20:40 +10:00
Ronnie Sahlberg
37b681627e 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)
2008-05-15 15:01:01 +10:00
Ronnie Sahlberg
f2661ec859 remove some unnessecary tests if ->vnn is null or not
(This used to be ctdb commit f0169ac8166a19d65ce254496e21d095aed87c2f)
2008-05-15 13:28:19 +10:00
Ronnie Sahlberg
09cc3ccff5 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)
2008-05-15 12:28:52 +10:00
Ronnie Sahlberg
3e14bbcce6 Merge git://git.samba.org/tridge/ctdb
(This used to be ctdb commit d5fb4489f83f1f956b2c083cfad1861c5ddde283)
2008-05-15 08:02:51 +10:00
Andrew Tridgell
8ec3665231 put the return in the right place
We were refusing the 'startrecovery' event

(This used to be ctdb commit 788d38812d73729f11d12e9812b16092c0ae4123)
2008-05-14 22:05:09 +10:00
Andrew Tridgell
e465110f95 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)
2008-05-14 20:57:04 +10:00
Ronnie Sahlberg
909ff219e0 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)
2008-05-14 15:47:47 +10:00
Ronnie Sahlberg
2bc0e5a69f add a new container to hold a socketaddr for either ipv4 or ipv6
(This used to be ctdb commit 93b98838824fae5f47e4ed6b95ae9e4e7597bec3)
2008-05-14 15:40:44 +10:00
Ronnie Sahlberg
7d04ca2fc4 Add a missing include
(This used to be ctdb commit 6131f4b4fc7b65f83f3d57927b23393c84bd2a2b)
2008-05-14 15:37:20 +10:00
Ronnie Sahlberg
9aba594429 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)
2008-05-14 15:33:01 +10:00
Andrew Tridgell
510fb39b9b Merge commit 'ronnie-ctdb/master' into tridge
(This used to be ctdb commit b616961c16667328a81efa00a1c880efa4e791f1)
2008-05-14 14:37:11 +10:00
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