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

1676 Commits

Author SHA1 Message Date
Andrew Tridgell
8be67e0e09 CTDB_NO_MEMORY_VOID() needs to return on error
(This used to be ctdb commit 6d21fd57bedffce2298ce7fe4c7d889c858ba7fa)
2008-07-04 16:58:29 +10:00
Andrew Tridgell
75b8cd1096 added option to start ctdb under valgrind
Just add CTDB_VALGRIND=yes in /etc/sysconfig/ctdb, and look at the
logs in /var/log/ctdb_valgrind.*

(This used to be ctdb commit 9acd577c97059e8924582ac52e9ce5785903f120)
2008-07-04 16:58:14 +10:00
Andrew Tridgell
07e145316c zero out the ctdb->freeze_handle when we free it
This prevents heap corruption when a freeze child dies

(This used to be ctdb commit 4edc6d40cb63936146af99030b7819683238abfc)
2008-07-04 16:05:04 +10:00
Ronnie Sahlberg
64c4639ce9 we dont need to explicitely thaw the databases from the recovery daemon
since this is already done implicitely when we changed recovery mode
back to normal

(This used to be ctdb commit af1f6cf7561fe9cb5c97f940d4458c83bdd8e2a0)
2008-07-03 12:46:09 +10:00
Ronnie Sahlberg
ef769e7237 track both when we last started and ended a recovery.
make ctdb uptime print how long the recovery took

in the recovery daemon when we check that the public ip address
allocation on the local node is correct (we have the ips we should have
and we dont have any we shouldnt have) use ctdb uptime and check the
recovery start/stop times and make sure we dont check for ip allocation
inconsistencies during a recovery  where the ip address allocation is in flux.

(This used to be ctdb commit f86551580349b7f662f9a07e4eb0c1189e38e429)
2008-07-02 13:55:59 +10:00
Ronnie Sahlberg
05b50ebe0a print the opcode when an async callback detects an error
(This used to be ctdb commit 423934629704683d3a3042570577fb4e04b17a6d)
2008-07-02 12:21:53 +10:00
Ronnie Sahlberg
bb2019bb0f update a comment to reflect that this is not always a real recovery
it can also be printed when we just do an ip reallocation

(This used to be ctdb commit e4c9e511fc5e15e0638ebb9117cb4a65ca8fda4b)
2008-07-02 12:01:19 +10:00
Ronnie Sahlberg
e75c7907fe new version
(This used to be ctdb commit af5d9435822917d36929e667063db69e6a426d3d)
2008-07-01 09:34:43 +10:00
Ronnie Sahlberg
ff4af5ff9f initdit/ctdb is not a config file
(This used to be ctdb commit 9f501cee9132114e7467a33dab5cfe0737f94f44)
2008-06-27 09:31:18 +10:00
Ronnie Sahlberg
03cbb27a79 make /etc/ctdb/functions executable and add a hashbang to it so
rpmlint wont complain

(This used to be ctdb commit 9b8179ad043a80e0e18eeba427a7b7b15690d039)
2008-06-27 09:29:38 +10:00
Ronnie Sahlberg
1ccc4a8e2b test
(This used to be ctdb commit 4f2d722cf29175c3c207e6ebb6d4f9e370767249)
2008-06-26 14:14:37 +10:00
Ronnie Sahlberg
f1b3ddc357 Revert "test"
This reverts commit f71287a28d66db202fe52f9a43b6daf2389d7f66.

(This used to be ctdb commit a928857e38d645baca62cea7f7367488d140dca7)
2008-06-26 14:00:36 +10:00
Ronnie Sahlberg
2cffc2e9c6 test
(This used to be ctdb commit f71287a28d66db202fe52f9a43b6daf2389d7f66)
2008-06-26 13:51:18 +10:00
Ronnie Sahlberg
c5de452dca reduce loglevel of the info message we are updating the flags on all nodes
(This used to be ctdb commit 9a98a21979558dcd6421b3fcb97d21ab82b792d8)
2008-06-26 13:15:41 +10:00
Ronnie Sahlberg
c5e7e0b2fd force an update of the flags from the recmaster after each monitoring run
(This used to be ctdb commit 251aeadc8b16a9c27a4bae78c97ad6e93e6cfdf4)
2008-06-26 13:08:37 +10:00
Ronnie Sahlberg
854a615de9 /etc/ctdb/functions should not be executable
(This used to be ctdb commit d481f0f3d11e66d259cbc84f34cb6ae27d09e42c)
2008-06-26 12:43:30 +10:00
Ronnie Sahlberg
cfc0af79ce third attempt for fixing a freeze child writing to the socket
(This used to be ctdb commit b8c8c5cb351747863c5d1366b57c96122ade5db0)
2008-06-26 11:52:26 +10:00
Ronnie Sahlberg
97f8bf16c5 verify that the recmaster has the correct flags for us and if not tell the recmaster what the flags should be
(This used to be ctdb commit 3387597926ad71e4140cc504b828486d99a3ec8e)
2008-06-26 11:08:09 +10:00
Ronnie Sahlberg
2910ea1606 only loop over the write it the write failed
(This used to be ctdb commit b99d687894cb69d863345713055d9c8dc1b29194)
2008-06-26 11:02:08 +10:00
Ronnie Sahlberg
77ef05e95b the write() from the freeze child process can fail
try writing many times and log an error if the write failed

(This used to be ctdb commit f15b224e42e81cda84b98f01f919d463e80fb89f)
2008-06-26 09:54:27 +10:00
Ronnie Sahlberg
aa82d15e75 it is 2008 not 2008 right now :-)
(This used to be ctdb commit 8734bd32809ad817ad28d96315a139674429c395)
2008-06-13 13:53:05 +10:00
Ronnie Sahlberg
79caa61de8 update to 1.0.42
(This used to be ctdb commit de8f1bedc56da05c03cfd0e4780839771d94a58f)
2008-06-13 13:50:28 +10:00
Ronnie Sahlberg
fd921aea28 ban the node after 3 failed scripts by default
(This used to be ctdb commit b4e6d8e37c7f985f357af82b4a524959bb97ec4c)
2008-06-13 13:45:23 +10:00
Ronnie Sahlberg
779468ab3f if the event scripts hangs EventScriptsBanCount consecutive times in a row
the node will ban itself for the default recovery ban period

(This used to be ctdb commit 7239d7ecd54037b11eddf47328a3129d281e7d4a)
2008-06-13 13:18:06 +10:00
Ronnie Sahlberg
30535c815d when a eventscript has timed out, log the event options (i.e. "monitor" "takeip 1.2..." etc)
to the log

(This used to be ctdb commit dbe31581abf35fc4a32d3cbf487dd34e2b9c937a)
2008-06-13 12:18:00 +10:00
Ronnie Sahlberg
e6d1d766c5 make it possible to re-start a recovery without marking the current node as
the culprit.

(This used to be ctdb commit 3a69fad0b1dee4a482461680c556358409e53c4d)
2008-06-13 11:47:42 +10:00
Ronnie Sahlberg
4b6b094860 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

(This used to be ctdb commit 72f89bac13cbe8c3ca3e7a942469cd2ff25abba2)
2008-06-12 16:53:36 +10:00
Ronnie Sahlberg
d8433cacb2 first cut to convert takeover_callback_state{}
to use ctdb_sock_addr instead of sockaddr_in

(This used to be ctdb commit 5444ebd0815e335a75ef4857546e23f490a22338)
2008-06-04 17:12:57 +10:00
Ronnie Sahlberg
598fba7fad 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

(This used to be ctdb commit b87fab857bc9b3537527be93b7f68484502d6b84)
2008-06-04 15:23:06 +10:00
Ronnie Sahlberg
7d39ac131b 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

(This used to be ctdb commit 86d6f53512d358ff68b58dac737ffa7576c3cce6)
2008-06-04 15:13:00 +10:00
Ronnie Sahlberg
1c88f422d5 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

(This used to be ctdb commit 4948574f5a290434f3edd0c052cf13f3645deec4)
2008-06-04 10:46:20 +10:00
Ronnie Sahlberg
a594ac1e91 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

(This used to be ctdb commit 181318fea6886c40d0aff02d0de777f28ffeddce)
2008-06-03 18:19:48 +10:00
Ronnie Sahlberg
fba38a5325 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.

(This used to be ctdb commit 00006222ece63ae3b7f3477646232ae5bbeee6f4)
2008-06-03 18:18:28 +10:00
Ronnie Sahlberg
a8cf6e7914 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.

(This used to be ctdb commit dfe0c44c1e8e9dab790686c5ba798986d04bf218)
2008-06-03 18:14:54 +10:00
Ronnie Sahlberg
2d06861247 debugleves can now be negative so print their value using %d instead of %u
(This used to be ctdb commit f0b55adae450cac3cf925e111e1dc9628cff4525)
2008-05-29 08:19:35 +10:00
Ronnie Sahlberg
04573c14b5 update to .41
(This used to be ctdb commit 30523c443777452cbca4a6924fd33c3f4caac5b6)
2008-05-28 14:51:46 +10:00
Ronnie Sahlberg
60a3fb926d dont bother casting to a void* private_data pointer,
just pass it as 'state' structure

(This used to be ctdb commit 1d7c3eb454e33cd17c74606c4ea011fd79959c80)
2008-05-28 13:40:12 +10:00
Ronnie Sahlberg
0b0f5bc5e6 remove another field we dont need in the childwrite_handle structure
(This used to be ctdb commit 70085523f4c35a20786023c489325554e2a6f9c1)
2008-05-28 13:31:58 +10:00
Ronnie Sahlberg
71ec7b25b0 remote a comment that is no longer relevant
remove a field in the childwrite_handle structure we dont need

(This used to be ctdb commit a53db1ec3f29f4418ff51e0f452026c12470bf93)
2008-05-28 13:30:22 +10:00
Ronnie Sahlberg
ceaf488f05 do persistent writes in a child process
(This used to be ctdb commit 2da3d1f876f5d654f849af8a3e588f5a61300c3d)
2008-05-28 13:04:25 +10:00
Ronnie Sahlberg
33fd7fd9c4 update to .40
(This used to be ctdb commit 9e1adfdd4cc606f4134fdeba8d3539e29e7e5056)
2008-05-27 08:23:46 +10:00
Ronnie Sahlberg
46220fc467 read the samba sysconfig from the samba eventscript
(This used to be ctdb commit fb9870916ce0798695b09d33208a19d5de1cfd29)
2008-05-27 08:21:18 +10:00
Ronnie Sahlberg
52e44b37e2 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.
(This used to be ctdb commit e07abdfbdb7963309898f0bf5382b8e951409f0a)
2008-05-22 18:33:54 +10:00
Ronnie Sahlberg
0941019cb7 restore a timeout value to the default settings instead of the hardcoded 3 second test value
(This used to be ctdb commit 437752d002a108bcbbf6dc8bfb5dbf16dc5f1c58)
2008-05-22 16:33:36 +10:00
Ronnie Sahlberg
dd6c9d5a78 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.

(This used to be ctdb commit 6f6de0becd179be9eb9a6bf70562b090205ce196)
2008-05-22 16:29:46 +10:00
Ronnie Sahlberg
d895f43504 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)
2008-05-22 13:12:53 +10:00
Ronnie Sahlberg
ed2cf0291d 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)
2008-05-22 12:47:33 +10:00
Ronnie Sahlberg
d60f5ce068 update version to .39
(This used to be ctdb commit 2908e092710d7fa2245161b3315747e17e4226c0)
2008-05-22 06:22:25 +10:00
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