Andrew Tridgell
d655a64b5b
kill the lockwait child if the pipe goes away
...
(This used to be ctdb commit bdfa8ba9932fade074a05a6cb6bc14ae3b84618c)
2007-05-14 13:49:01 +10:00
Andrew Tridgell
9e70b95159
don't allow setvnnmap while not frozen
...
(This used to be ctdb commit a73f47f565894cc7e346177d87f2e6813837e1c6)
2007-05-14 13:48:40 +10:00
Andrew Tridgell
5d71cc78bb
don't allow setrecmaster while not frozen
...
(This used to be ctdb commit e84b05ba6062ffc45b7f3c23e88feef1d39069c4)
2007-05-14 13:48:14 +10:00
Andrew Tridgell
5839eb1e80
make sure the ctdb control socket is secure
...
(This used to be ctdb commit 2954f2e501a418af578e75e8705b0b39a77c1861)
2007-05-13 09:20:16 +10:00
Andrew Tridgell
81826da2df
added error messages in ctdb_control replies
...
(This used to be ctdb commit bd848f5b760e6b2a73ebfc67fd8adb3c31479fb5)
2007-05-12 21:25:26 +10:00
Andrew Tridgell
58dc8d4e19
prioritise the dmaster in case of matching rsn
...
(This used to be ctdb commit 4996a12174aa0d215a5b14cb970bdf83eed34a39)
2007-05-12 19:57:12 +10:00
Andrew Tridgell
68fc85d162
the retry client code is no longer needed now that we use a freeze on recovery
...
(This used to be ctdb commit 4213475a2db93b149705bfbb578c78936124c608)
2007-05-12 19:55:55 +10:00
Andrew Tridgell
df49a66de4
ensure we propogate the correct rsn for a request dmaster
...
(This used to be ctdb commit 70c1c67db865db8a49b56e8e3e8fd56ec5063208)
2007-05-12 19:55:18 +10:00
Andrew Tridgell
78eb2f96af
simplify the generation checking on incoming call packets
...
(This used to be ctdb commit 87ee47f7fbbf71228bc9cc16faff86b4c59333a2)
2007-05-12 19:54:40 +10:00
Andrew Tridgell
36ccc10389
make sure we ignore requeued ctdb_call packets of older generations except for packets from the client
...
(This used to be ctdb commit facab105fbd7fe50f96bdd763ae50ddc54fbdacc)
2007-05-12 18:08:50 +10:00
Andrew Tridgell
7dcf82cda4
- nicer message if freeze child dies
...
- change local generation count after recovery/freeze started
(This used to be ctdb commit d9768142797f083a8c09b55d6a8a93cc12089348)
2007-05-12 15:59:49 +10:00
Andrew Tridgell
2c90d9e794
show total frozen/recoving in status
...
(This used to be ctdb commit 0d0eb66a63fe6912edb85bf7387ac76acb70babd)
2007-05-12 15:51:08 +10:00
Andrew Tridgell
cb81a2eca8
watch for the freeze child exiting
...
(This used to be ctdb commit 7f350eca8598022ebd198b2476d1f2c2a8f03a8d)
2007-05-12 15:44:35 +10:00
Andrew Tridgell
f7e3004f0a
more robust freeze/thaw logic
...
(This used to be ctdb commit 51c1e51aeb7dfac1683584df7ef1bef98c092f76)
2007-05-12 15:29:06 +10:00
Andrew Tridgell
9cf77dd23f
separate out the freeze/thaw handling from recovery
...
(This used to be ctdb commit 0b0640bd8b8334961f240e0cf276ac112cd6e616)
2007-05-12 15:15:27 +10:00
Andrew Tridgell
74a799a83b
added lockwait child code for entering recovery mode. A child processes holds lockall locks for the entire recovery process
...
(This used to be ctdb commit f892f30def75b0d964c35eae38c4cf675597dd28)
2007-05-12 14:34:21 +10:00
Andrew Tridgell
85aff64ed8
fixed debug message
...
(This used to be ctdb commit 9802bf1ef9104b31977020e803b0f81da71c7169)
2007-05-11 17:29:21 +10:00
Andrew Tridgell
63acf8ab95
- merge from ronnie
...
- increment rsn only in become_dmaster
- add torture check for rsn regression in ctdb_ltdb_store
(This used to be ctdb commit 8047506a08bb53ee01aa64f25c9f72839e1e2d68)
2007-05-11 10:33:43 +10:00
Ronnie Sahlberg
9eeb4f1a51
we must bump the rsn everytime we do a REQ_DMASTER or a REPLY_DMASTER
...
to make sure that the "merge records based on rsn during recovery" will
merge correctly.
this is extra important since samba3 never bumps the record when it
writes new data to it !
(This used to be ctdb commit 857e67204065603592c2dbbadbd8667ebba9ccdb)
2007-05-11 06:08:17 +10:00
Ronnie Sahlberg
325713dfeb
make ctdb_control catdb work again
...
(This used to be ctdb commit 40a8fb68c71be0b9f54ae88bf8aa39a4c71f3b5a)
2007-05-11 05:40:11 +10:00
Andrew Tridgell
f8765b19bf
- got rid of the complex hand marshalling in the recovery controls
...
- fixed the re-send of ctdb calls after a generation change
- fixed a reqid idr leak in controls
- removed the write_record test code
- use the new nonblock lockall code to prevent ctdbd from ever doing a
blocking lock that could deadlock with smbd
- moved more of the recovery controls into ctdb_recover.c
(This used to be ctdb commit 565a21aa4f1e842309986ab97d6244801153deec)
2007-05-10 17:43:45 +10:00
Andrew Tridgell
15bc97cdaa
better timeout handling for calls, controls and traverses
...
(This used to be ctdb commit 63346a6c59d4821b4c443939b5d88db8cd20f5fe)
2007-05-10 14:06:48 +10:00
Andrew Tridgell
2a82665532
fixed setvnnmap to use wire structures too
...
(This used to be ctdb commit 1208e4219d220b80e2f74974cac8ed2b8956d3ef)
2007-05-10 08:22:26 +10:00
Andrew Tridgell
682df74d59
separate the wire format and internal format for the vnn_map
...
(This used to be ctdb commit 9a71718d87c5162f1423d85c2e86a01f6771925e)
2007-05-10 08:13:19 +10:00
Andrew Tridgell
a8f83423f4
moved the vnn_map initialisation out of the cmdline code
...
(This used to be ctdb commit 81492b840d608dc724d5a25ddef6eb0ce12b95fb)
2007-05-10 07:55:46 +10:00
Andrew Tridgell
ba47b43c6b
merged ronnies code to delay client requests when in recovery mode
...
(This used to be ctdb commit dfca37076d642f3407c63dfe3b685287d27c8f8d)
2007-05-10 07:43:18 +10:00
Ronnie Sahlberg
bbaaf2bbf4
hang the event from the retry structure instead of the hdr structure
...
(This used to be ctdb commit 8536c8c3a30a986ba4945d02aef82b47495ce3f8)
2007-05-09 14:08:11 +10:00
Ronnie Sahlberg
c938c1b5de
when we are in recovery mode and we get a REQ_CALL from a client,
...
defer it for one second and try again
(This used to be ctdb commit 606fb6414b97d1813056982cda7c0fe84d746e67)
2007-05-09 14:06:47 +10:00
Andrew Tridgell
d2a90cc5a5
merge from ronnie
...
(This used to be ctdb commit f67a4842e7b1efb2ad61c41e4895c7698e564bf3)
2007-05-09 11:54:37 +10:00
Ronnie Sahlberg
6929739b7f
add a command line flag to ctdbd to start a recovery daemon.
...
update the recovery test script to start all ctdb daemons with a
recovery daemon
(This used to be ctdb commit 47794e16df285cacefc30208d892d931a6e46b96)
2007-05-09 09:59:23 +10:00
Andrew Tridgell
fdb8144e62
fixed a problem with the number of timed events growing without bound with the new seqnum code
...
(This used to be ctdb commit 6109ae3dae8d93c93a2dc76cc561ea6e21458aa6)
2007-05-08 21:16:29 +10:00
Ronnie Sahlberg
e11eebd070
fix alignment bug for pulldb
...
(This used to be ctdb commit f1188289c18805c2c5f8bae61d73df3fc762faee)
2007-05-08 14:42:00 +10:00
Ronnie Sahlberg
a1866c6eeb
hang the timeout event off state and thus we dont need to explicitely
...
free it and also we wont accidentally return from the function without
killing the event first
(This used to be ctdb commit e3d72d024ef7342a808e5c488fd646a39e5fac78)
2007-05-07 07:54:17 +10:00
Ronnie Sahlberg
6bfb5f61ca
it now works to talloc_free() the timed event if we no longer want it to
...
trigger
this must have been a sideeffect of a different bug in the recoverd.c
code that has now been fixed
(This used to be ctdb commit 676446fd1083c371ad0ff72dd8c636ec8e6d1423)
2007-05-07 07:47:16 +10:00
Ronnie Sahlberg
a9657f6aa5
add new controls to get and set the recovery master node of a daemon
...
i.e. which node is "elected" to check for and drive recovery
(This used to be ctdb commit d577093eb4b619392c71ab5ce81e8c02565d93f0)
2007-05-07 05:02:48 +10:00
Ronnie Sahlberg
c9aafae5ce
dont allocate arrays where we can just return a single integer
...
(This used to be ctdb commit 07bc338e490e0f7018808a2450bc54863eb88c94)
2007-05-06 08:05:22 +10:00
Ronnie Sahlberg
dceab7ff3e
dont use arrays where a uint32_t works just as well
...
(This used to be ctdb commit 843e974b29c93df891ae7cf13323ee960a334f60)
2007-05-06 07:52:20 +10:00
Ronnie Sahlberg
ad41dff7bf
add a ifdeffed out block to the call.
...
we really should kill the event in case the call completed before the
timeout so that we can also make timed_out non-static
(This used to be ctdb commit f297eed589b1d4e188f77f195683365cf91d0e62)
2007-05-06 07:32:16 +10:00
Ronnie Sahlberg
4f2cdc2d8b
hte timed_out variable needs to be static and can not be on the stack
...
since if the command times out and we return from ctdb_control we may
have events that can trigger later which will overwrite data that is no
longer in our stackframe
(This used to be ctdb commit 93942543092be618c0bd8ef68b470b0789bad7ad)
2007-05-06 07:07:47 +10:00
Ronnie Sahlberg
0f6d9c73d8
merge from tridge
...
(This used to be ctdb commit 08173e3ab77178b9841db0081a51b93291d9e8dc)
2007-05-06 04:38:41 +10:00
Ronnie Sahlberg
25edbc9a50
add a control to get the pid of a daemon.
...
this makes it possible to kill a specific daemon in the recover test
script
(This used to be ctdb commit 2fa394b4c80988cb1a6d04b236ec64cc9d9e8a40)
2007-05-06 04:31:22 +10:00
Andrew Tridgell
7d48810645
merged vnn map broadcast from ronnie
...
(This used to be ctdb commit c0fa029435fdaa0be006b28eddb6b31beb2ee605)
2007-05-05 17:35:28 +10:00
Andrew Tridgell
542b76136e
- take advantage of the new EVENT_FD_AUTOCLOSE flag
...
- use the tdb_chainlock_mark() call to allow us to guarantee forward progress in the ctdb_lockwait code
(This used to be ctdb commit e201e98aad0fef6a779a80f3b1ae7792953e2d6b)
2007-05-05 17:19:59 +10:00
Andrew Tridgell
cc8ac1ca6b
allow the events system to be chosen on the command line
...
(This used to be ctdb commit 2fe976d7a376a763472cc7952a78b6249ce416c8)
2007-05-05 17:18:43 +10:00
Ronnie Sahlberg
2e64727079
merge from tridge
...
(This used to be ctdb commit 8648104f8d76d22427c14422b126f7e979cc2d95)
2007-05-05 16:51:34 +10:00
Andrew Tridgell
9636c97c5a
show number of connected clients in status output
...
(This used to be ctdb commit 99765bbe327bfe9c43415f4943281458f25be51b)
2007-05-05 14:09:46 +10:00
Ronnie Sahlberg
5cb817f031
split the vnn broadcast address into two
...
one broadcast address for all nodes
and one broadcast address for all nodes in the current vnnmap
update all useage of the old flag to now only broadcast to the vnnmap
except for tools/ctdb_control where it makes more sense to broadcast to
all nodes
(This used to be ctdb commit dfb65b88cf67ad9d61268c4b47a6d8ae346f47df)
2007-05-05 13:17:26 +10:00
Andrew Tridgell
410d41480a
added a dumpmemory control, used to find memory leaks
...
(This used to be ctdb commit 44fdafaf421e3e906796d529aed2f7c5df201b94)
2007-05-05 11:03:10 +10:00
Andrew Tridgell
adc64aed0a
- fixed a crash bug after client disconnect in ctdb_control
...
- added total memory used to ctdb_control status output
(This used to be ctdb commit a99ffe4372edc63d83d8c8ebf9a60b3413301f5a)
2007-05-05 08:33:35 +10:00
Andrew Tridgell
d8f4e6b209
- added counters for controls in ctdb_control status
...
(This used to be ctdb commit 858061372fc9902837a1a5b8bcfc0ada58eec193)
2007-05-05 08:11:54 +10:00