1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

2545 Commits

Author SHA1 Message Date
Ronnie Sahlberg
c915f2e5d5 add an extra test for the bond devices and check that there is an active slave.
this to handle the case where all links do have a physical layer, but where all slaves have been disabled using ifdown

(This used to be ctdb commit bf50709630df000583f2b0ef0edc177c01d60eaf)
2009-11-05 12:12:06 +11:00
Ronnie Sahlberg
2501638e15 dont verify winbindd is running properly at startup
(This used to be ctdb commit 9e1b99221c8f257129641f6eda2795537b7ce9de)
2009-11-04 07:50:26 +11:00
Ronnie Sahlberg
666d1d019b new version 1.0.103
(This used to be ctdb commit 020e2e30e56b9675f345ee62d6bf585396208059)
2009-11-03 11:46:37 +11:00
Ronnie Sahlberg
4bf4e15379 move the check to skip vacuuming on persistent database to the ctdb_vacuuming_init() function
(This used to be ctdb commit fb83dba255fc91413a475b273e374e0c4d538137)
2009-11-03 10:48:27 +11:00
Michael Adam
e38dda00e7 packaging: use githash in rpm release by default.
setting USE_GITHASH=no in the environment makes
makerpms.sh omit the git hash

Michael

(This used to be ctdb commit 209ff041596e39688186c99995863ed3e816b8e4)
2009-11-03 00:16:28 +01:00
Michael Adam
fe9929165f server: disable vacuuming for persistent tdbs.
The vacuum process treats persistent databases the same as
non-persistent and thus ignores the extra state for transactions.
This way, it breaks the api-level transactions.

Michael

(This used to be ctdb commit f98fefbc566eefbfcc660646af6e25256ab82b13)
2009-11-03 00:16:28 +01:00
Michael Adam
c532347a45 client: randomize the transaction_start retry loop:
instead of sleeping 1 second, sleep between 1 and 100 milliseconds

Michael

(This used to be ctdb commit a5d90d8ed8b44355c4ffb9c32ded772025fcc174)
2009-10-30 22:02:21 +11:00
Michael Adam
de875c7eec Revert "dont exit on a commit failure"
This reverts commit 4e9a3a5dc232bac12ab387ea0cf4f1b279bed5c1.

Transaction commit should not be allowed to fail.
This is a real error.

Michael

(This used to be ctdb commit 825c506da76d7afd0714b75b8c8727874183a618)
2009-10-30 22:01:53 +11:00
Michael Adam
118185670d client: fix a race in the local race condition fix in transaction_start
The gap that remained is between checking whether a transaction commit
is in progress and taking the lock. Now we first take the lock and then
check whether a transaction commit is in progress. If so, we release the
lock, wait for one second and retry.

Michael

(This used to be ctdb commit b95524c08bf12914120cb6c818ecc1c99738fe37)
2009-10-30 22:01:16 +11:00
Michael Adam
c2855a11a8 client: add a debug message when a transaction_commit needs to be retried
Michael

(This used to be ctdb commit 9e4902c7d3ad1329c296f4196fcb1396f2a7a6a0)
2009-10-30 22:00:42 +11:00
Michael Adam
5fa3a2c96a packaging(RPM): don't touch the run levels in ctdb install/udpate.
We should really leave it up to the administrator to decide
whether ctdb should be started automatically at boot-time.

Michael

(This used to be ctdb commit c1d8496f9fd5e8046f3d990264258dfb054f3b32)
2009-10-30 21:42:34 +11:00
Ronnie Sahlberg
e33722a569 start the syslog child a little later, after we have forked and detached from the local shell
(This used to be ctdb commit 9ffd54b73c0d64b67e8e736d7cb54490e77ffa78)
2009-10-30 19:39:11 +11:00
Ronnie Sahlberg
5d73f19418 create a child process to write to syslog.
use a udp socket on the ctdbd port to send messages to teh syslog child process for loggign.

we need this when syslog becomes "slow",   like very slow, and on boxes where syslog is limited to 100 lines per second and starts to block after that

(This used to be ctdb commit 1446f4c247310e2ff2d522055bd8927d1a78d017)
2009-10-30 18:53:17 +11:00
Michael Adam
673a8588b1 server: fix debug message in trans2_commit (refusing persistent store during transaction)
log the right db_id
also log the client_id

Michael

(This used to be ctdb commit 48ac5c77698ab7a28d24629cc8a6985011c5d14d)
2009-10-30 09:29:25 +11:00
Michael Adam
45c17515c3 client: log db_id as 8-digit hex in ctdb_transaction_fetch_start()
Michael

(This used to be ctdb commit d7b9babda2f7c7f7b95ee19ec75c37200816c6ef)
2009-10-30 09:28:49 +11:00
Michael Adam
1de0c6f807 server: uniformly log db and client ids as 8-digit hex numbers in trans2_commit
Michael

(This used to be ctdb commit 2febdd23f754a2d4699bed36b941442ab362a376)
2009-10-30 09:28:06 +11:00
Michael Adam
7384dfe4a9 server: line-wrap a debug statement in trans2_commit
Michael

(This used to be ctdb commit 3be446434adb0f3095ac0ef4b7c4a6258780b863)
2009-10-30 09:27:33 +11:00
Michael Adam
7bfa959a86 server: output client_id in some debug messages in trans2_commit
Michael

(This used to be ctdb commit 11fefd02e6c9531ffb28b9e6acaf42ba39757d87)
2009-10-30 09:26:51 +11:00
Michael Adam
4d073bd779 server: fix a debug message in trans2_commit - log the correct db_id
Michael

(This used to be ctdb commit ab9657b5a66d5665e6c5fd1bf8eb4074a3bffeec)
2009-10-30 09:26:16 +11:00
Michael Adam
dca16d5f64 server: extend a debug message in ctdb_control_trans2_error()
Michael

(This used to be ctdb commit 0fb9573d1c838b436ab9be83e197b68f35f94acb)
2009-10-30 09:24:17 +11:00
Michael Adam
2187e6c379 server: add positive debug statements to trans2_commit and trans2_finished
When the operation completed / started successfully.

Michael

(This used to be ctdb commit 0df012d58eb83195ea0365be19e0566dbc394a66)
2009-10-30 09:23:29 +11:00
Michael Adam
361aec199e client: improve "control timed out" debug message
* add __location__
* wrap overly long line
* print unsigned ints as unsigned (reqid, opcode, destnode)

Michael

(This used to be ctdb commit 6b47ea111867c845974aa2687a658ebca2854816)
2009-10-30 09:22:52 +11:00
Michael Adam
0113744fec server: trans2_active: don't report a transaction active on the node that performs the transaction
Otherwise a node can lock itself out, e.g. when a commit control times out...

Michael

(This used to be ctdb commit cb432e30351d5e5a41e98da3c7b1c2a4d400a3a2)
2009-10-30 09:22:18 +11:00
Ronnie Sahlberg
784a89ec62 new version 1.0.102
(This used to be ctdb commit 4892222ffb255dccd8ced1cb047f199386bb3e98)
2009-10-29 13:49:27 +11:00
Wolfgang Mueller-Friedt
9713b8ea9a ensure tdb names end with .tdb. and any number of digits
(This used to be ctdb commit 8ab1349feb64a91cb500c130ea299e2182491f06)
2009-10-29 13:46:37 +11:00
Wolfgang Mueller-Friedt
2c137b7030 vacuuming needed additional check before getting rid of the record; there is a gap between selecting the records and deleting them, therefore we have to check if the records still can be deleted when we actually are about to delete them
(This used to be ctdb commit a6fbc65aca35c41c428a82d7402e43c6eaac1d6e)
2009-10-29 13:45:17 +11:00
Ronnie Sahlberg
f5e90ec3b5 Revert "From Wolfgang M."
This reverts commit 5b70fa8cfd5916d3c212823ad5cc1b251ae175ed.

(This used to be ctdb commit 363e7e939ad46b3f75c83c30d4163d63876c2456)
2009-10-29 13:44:12 +11:00
Ronnie Sahlberg
9e235af3a2 make the error logged when winbindd fails to access the dc during startup more scary and easier to spot in the logs
(This used to be ctdb commit 0c9b0466fd87b3f1e5d53f867c863217802ac43b)
2009-10-29 11:54:24 +11:00
Ronnie Sahlberg
fcd2ebc32b update the uptime command to indicate that time since last is either from alst recovery or from last failover
(This used to be ctdb commit 467da12a785ba3367ed9cbdf79440394e9703289)
2009-10-29 10:58:14 +11:00
Ronnie Sahlberg
023d09cd38 Revert "update the "uptime" command to indicate the "time since last" is the time since the last recovery OR failover."
This reverts commit 3b0d44497800a16400d05a30bdaf6e6c285d4b36.

(This used to be ctdb commit cb36bbb5418290e8e5b770d2d836285b15da2a6f)
2009-10-29 10:49:00 +11:00
Ronnie Sahlberg
a4b8a17b26 update the manpage for "update" to indicate the "time since last" indicates
the time since the last recovery OR failover

(This used to be ctdb commit 22712c577f64ec84851b4addcf4a46c7e99e0662)
2009-10-29 10:32:28 +11:00
Ronnie Sahlberg
279b7ca564 update the "uptime" command to indicate the "time since last" is the time since the last recovery OR failover.
(This used to be ctdb commit 3b0d44497800a16400d05a30bdaf6e6c285d4b36)
2009-10-29 10:37:10 +11:00
Michael Adam
2419eab0d9 ctdb_client: reformat a comment slightly to enhance clearness.
Michael

(This used to be ctdb commit 9560f8b7fe0f7ee0386a87c2653333071050fe4b)
2009-10-29 10:15:54 +11:00
Michael Adam
5d579cf665 client: fix race condition with concurrent transactions on the same node.
In ctdb_transaction_commit(), when the trans2_commit control fails, there
is a race condition in the 1 second sleep between the local transaction_cancel
and the call to ctdb_replay_transaction(): The database is not locked, and
neither is the transaction_lock record. So another client can start and possibly
complete a new transaction in this gap, but only on the same node: The locking
of the transaction_lock record on a different node which involves migration of
the record to the other node has been disabled by introduction of the
transaction_active flag on the db which closes precisely this gap from the start
of the commit until the call to TRANS2_FINISH or TRANS2_ERROR.
But this mechanism does not cover the case where a process on the same node
tries to start a transaction: There is no obstacle to locking the transaction_lock
record because the record does not need to be migrated.

This commit closes this race condition in ctdb_transaction_fetch_start()
by using the new ctdb_ctrl_transaction_active() call to ask the local
ctdb daemon whether it has a transaction running on the database.
If so, the check is repeated until the running transaction is done.

This does introduce an additional call to the local ctdbd when starting
transactions, but it does close the (hopefully) last race condition.

Michael

(This used to be ctdb commit 02ee9dfd3c6b09f5c5172a7e38738c20b7f0aecd)
2009-10-29 10:15:21 +11:00
Michael Adam
953ccee5c5 client: add ctdb_ctrl_transaction_active() which calls out to CTDB_TRANS2_ACTIVE
Michael

(This used to be ctdb commit 813cfd7c625ac8af4ef169cc92fb6d69f66004c9)
2009-10-29 10:15:00 +11:00
Michael Adam
abac42ca34 server: add a new ctdb control CTDB_TRANS2_ACTIVE
This aske the daemon wheter a transaction is currently active on a
given DB on that node. More precisely this asks for the transaction_active
flag in the ctdb_db_context that is set in the CTDB_TRANS2_COMMIT
control and cleared in the CTDB_TRANS2_ERROR or CTDB_TRANS2_FINISHED controls.

This will be useful for fixing race conditions in the transaction code.

Michael

(This used to be ctdb commit 8d430ae6968dfe566614379436fc3c56003fcd88)
2009-10-29 10:14:30 +11:00
Ronnie Sahlberg
019f3c930e version 1.0.101
(This used to be ctdb commit 47b67077bdfa64938bb0fa6d1ca8f56fbd5c960e)
2009-10-28 17:42:01 +11:00
Ronnie Sahlberg
d379b30182 create a separate context for non-monitor eventscripts so they dont collide
(This used to be ctdb commit 325de818f88f339a16dc4544e899a2d735933c44)
2009-10-28 17:35:15 +11:00
Ronnie Sahlberg
f8a8c0d6e4 return 0 in the event script callback if it was aborted by a different script
(This used to be ctdb commit 8d5cb2586a1d5a0255cc18295430927b914d4527)
2009-10-28 16:40:31 +11:00
Ronnie Sahlberg
d82fdcb56f new version 1.0.100
(This used to be ctdb commit fa34e8a5d588026029dca949151697817fe7f127)
2009-10-28 16:18:28 +11:00
Ronnie Sahlberg
e07ca41886 change the eventscript handling to allow EventScriptTimeout for each individual script isntead of for the entire set of scripts
restructure the talloc hierarchy to allow this

(This used to be ctdb commit 64da4402c6ad485f1d0a604878a7b0c01a0ea5f0)
2009-10-28 16:11:54 +11:00
Ronnie Sahlberg
3526bc830d Enhance the logging fromeventscripts.
When a single script is finished, also log the name of the script, the duration it took and the return status.

In the loop where we signal back to the main daemon that the script finished, do this once every 100ms instead of once every 1 second

(This used to be ctdb commit 6a1f7a7b1b3a0b8f89998db8fdad83bbb4e9b5a5)
2009-10-28 09:07:43 +11:00
Ronnie Sahlberg
0588b5f9c5 add a check that winbind can actually talk to teh dc during the startup event
and refuse to start up if it can not

(This used to be ctdb commit 4037b6e73a819a8e2463dfe0959b42875e05e106)
2009-10-27 15:45:03 +11:00
Ronnie Sahlberg
d1bf89a617 temporarily try allowing clients to attach to databases even if the node is banned/stopped or inactive in any other way.
(This used to be ctdb commit 227fe99f105bdc3a4f1000f238cbe3adeb3f22f0)
2009-10-27 15:17:45 +11:00
Ronnie Sahlberg
1d7681709b dont run the monitor event so frequently after a event has failed.
use _exit() instead of exit() when terminating an eventscript.

(This used to be ctdb commit cc30ee2f4f33cb75b2be980c2d4dff6c7c23852f)
2009-10-27 13:51:45 +11:00
Ronnie Sahlberg
4d40b86805 for debugging
add a global variable holding the pid of the main daemon.
change the tracking of time() in the event loop to only check/warn when called from the main daemon

(This used to be ctdb commit a10fc51f4c30e85ada6d4b7347b0f9a8ebc76637)
2009-10-27 13:18:52 +11:00
Stefan Metzmacher
3d713d9e53 ctdb_diagnostics: don't use hardcoded path to iptables
All event scripts use only the relative path, so we should
here.

Also PATH includes /sbin and /usr/sbin...

metze

(This used to be ctdb commit 20678e1506db1f96b58c326ee91339e797c07c22)
2009-10-26 14:23:09 +11:00
Stefan Metzmacher
1c6829f3c2 ctdb_client: fix DEBUG statement in ctdb_ctrl_modflags()
metze

(This used to be ctdb commit a244b75ee49556b0ff51e254cc812594ee3b23a7)
2009-10-26 14:22:07 +11:00
Stefan Metzmacher
198866d82d server: if takeover runs when the recovery master becomes unhealthy
The problem was this:

When the monitor event fails, the node->flags get updated,
and an update (containing the old and new flags) is sent to
the recovery master.

If the recovery master sends the update to itself (the same process),
it was compairing the node->flags variable with the received new flags.
This check always found both flag values to be equal
and never sets the rec->need_takeover_run variable to true.

There were two problem, first the push_flags_handler() function
didn't pass the received old flags.

And the ctdb_control_modflags() function ignored the received old flags.

metze

(This used to be ctdb commit 8ec633b64a05a2d903c2b9639909f15f6375548f)
2009-10-26 14:21:45 +11:00
Stefan Metzmacher
7a616a0d7b server: print out the full 64-bit srvid on 32-bit hosts
metze

(This used to be ctdb commit 440e870d61267054b24404bcb69e599226353949)
2009-10-26 14:20:52 +11:00