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

1057 Commits

Author SHA1 Message Date
Ronnie Sahlberg
dd14afe6aa after we have checked dest address that it is a public address
update addr to the source address so the rpintout in the log matches
the client that attached to samba

(This used to be ctdb commit 72098b71c79469c86769ca82bbd484c81902d27c)
2007-07-30 16:10:14 +10:00
Ronnie Sahlberg
64f61364a7 add a small tool to compare rb tree with a timeval_compare()+add an
entry to the end of the list DLIST (worst case insert)

(This used to be ctdb commit dcdf4a1f1c6675ae11ab26726c867d7782954fc6)
2007-07-30 10:50:35 +10:00
Ronnie Sahlberg
c76f323f73 fix the remaining bugs with tree delete that testing found.
the binary tree should work reasonably well now for delete.
insert always worked fine.

(This used to be ctdb commit 452cda26b206549504480b77483308b44cfa8b01)
2007-07-30 09:09:34 +10:00
Ronnie Sahlberg
8df376b3f0 remove dead code
(This used to be ctdb commit 97ffcda5e56f04aed2f4f8b889b4eb6311f69c4d)
2007-07-26 07:22:36 +10:00
Ronnie Sahlberg
84851b674c fix some remaining bugs with deleting nodes
(This used to be ctdb commit 8aec0e0bef794afce1d2abf762bfadee4ab7e619)
2007-07-26 07:21:32 +10:00
Ronnie Sahlberg
8e0a12463b there were situations where we were not guaranteed that a sibling had 2
child nodes which would cause a segv when trying to dereferencing those 
two child nodes in order to read their color

(This used to be ctdb commit 56f5fb8f8f3e667f5bc13f09fb5de01f5f2e0fae)
2007-07-25 17:53:55 +10:00
Ronnie Sahlberg
904e5ba55e if sibling is NULL it is a leaf node and thus black.
(This used to be ctdb commit 400488472ba64514fa6534d5de90edba6c5e27c6)
2007-07-25 17:22:04 +10:00
Ronnie Sahlberg
e666808f60 no need to have a separate assignment of the tcparray pointer followed
by a talloc_steal()
use the returned pointer in talloc_steal as the value to assign

(This used to be ctdb commit 5c6375ad3bbecfa725ec3b1477f259e5a8191866)
2007-07-25 08:03:58 +10:00
Ronnie Sahlberg
13e56a81a9 initial version of talloc based red-black trees
very initial version

(This used to be ctdb commit 121f5c9dfc8e441313e42d94bed9c9f13ec91398)
2007-07-24 18:51:13 +10:00
Ronnie Sahlberg
81294825e7 when we build the arp structure for sending gratious arp (and tcp
tickles) just talloc_steal the enture tcp_array into the arp 
structure instead of copying each of the entries into a linked list
and then releasing the tcparray.

(This used to be ctdb commit 468e237740cf37a65872ef700bbb1284ede8352a)
2007-07-24 07:46:51 +10:00
Ronnie Sahlberg
ea56d1d20e set the tcp tickle update flag to true once we have done a takeover and
tickled all connections
othervise the other nodes will still remember this list until next time 
we have had a connection/client closing.

(This used to be ctdb commit cb8e5d4bbee2f14f498735489f673ff3679dfd9d)
2007-07-20 19:11:45 +10:00
Ronnie Sahlberg
81767b2a7b when a client connects with TCP_CLIENT we should look at the
destination address to find the public address   not the source address

(This used to be ctdb commit d6d4a7f38a52c1c2579a54d14cb7a6981fb42f5b)
2007-07-20 17:04:08 +10:00
Ronnie Sahlberg
fca90ce3c3 updated ctdb tickle management
there is an array for each node/public address that contains tcp tickles

we send a TCP_ADD as a broadcast to all nodes when a client is added

if tcp tickles are removed, they are only removed immediately from the 
local node.
once every 20 seconds a node will push/broadcast out the tickle list for 
all public addresses it manages.   this will remove any deleted tickles 
from the remote nodes

(This used to be ctdb commit e3c432a915222e1392d91835bc7a73a96ab61ac9)
2007-07-20 15:05:55 +10:00
Ronnie Sahlberg
7b17afdfcd change the tickle list from one global list into an array per public
ip/node

once we have started sending all tickles for a specific ip   delete the 
entire array   so that the tickles dont remain forever in the ctdb 
server

add a control to send the full list of every tickle that is registered 
for a particular public ip/node

(This used to be ctdb commit d0eee33e44d3f8e26debbec21d41e2cbdbb520e6)
2007-07-20 10:06:41 +10:00
Ronnie Sahlberg
865e68db2b merge from tridge
(This used to be ctdb commit af820a27041168595f6fd03046cfe1a5d781cefc)
2007-07-19 15:07:27 +10:00
Andrew Tridgell
394190d3cc - log registering of tcp clients
- don\'t remove a tcp entry if we do not own the ip
(This used to be ctdb commit 400aa284b9785ce6409e7600df429f5849e3867d)
2007-07-19 15:04:54 +10:00
Andrew Tridgell
689195b455 make sure we still run events when waiting for ctdb_event_script()
(This used to be ctdb commit 05efbfe9ff9691c1d7441e7b9855aed25791faf0)
2007-07-19 13:36:00 +10:00
Ronnie Sahlberg
6c0ffe7413 merge from tridge
(This used to be ctdb commit 9ec696d6ab6a3657800b7ba6e29a2b2f7e48e187)
2007-07-19 07:29:53 +10:00
Andrew Tridgell
fb22d3bd2c merged from ronnie
(This used to be ctdb commit 765b07fa5d1af07c8c7212d19d8e9574060b3039)
2007-07-18 20:13:57 +10:00
Ronnie Sahlberg
4d1f3acc94 add a check if start_node is beyond the end of the nodemap and reset it
back to 0 if it is to prevent an infinite loop.

this could happen if in the future we add a mechanism to add/remove 
nodes to a cluster at runtime

(This used to be ctdb commit 217e80a468713fec86ccb0608460e3401046bb98)
2007-07-16 08:36:09 +10:00
Ronnie Sahlberg
49f98e79fd change the way we pick/find a new node to takeover for a failed node
to keep a static that controls at which noide to start searching the 
list for takeover candidates next time we need to find a node.

each time we find a node to takeover, reset the start variable to point 
to the next node in the list

this makes the distribution of takeover nodes much more even

(This used to be ctdb commit e9800df5a21079ea478d16f7dd2fd4707de85650)
2007-07-16 08:28:44 +10:00
Ronnie Sahlberg
7e532f8f83 we dont do nfstickles unless ctdb manages nfs
(This used to be ctdb commit 0622b4a969abdc8bd11f200ed5ae1c7b1d188db7)
2007-07-15 11:43:11 +10:00
Ronnie Sahlberg
643b87fbae fix bug introduced in previous commit
(This used to be ctdb commit 8396a7500225c90165ebcfbdc2c65673740e6b25)
2007-07-15 11:37:22 +10:00
Ronnie Sahlberg
e96f733052 there is no point in doing anything in 10.interfaces unless we have a
public interface

(This used to be ctdb commit c0335ee92b16a1e2dfcb37a39872b66a35b0ab94)
2007-07-15 11:28:53 +10:00
Ronnie Sahlberg
8e89b27098 try netstat as a last attempt to check a tcp port in
ctdb_check_tcp_ports() as well

(This used to be ctdb commit ad0292726f9cfc8afe3733b30ac2d5621e9a48f1)
2007-07-15 09:29:08 +10:00
Ronnie Sahlberg
4c276ded1f if we dont have nc or netcat, try using netstat as a final attempt to
check for tcp ports

(the check for these tools should not really use hardcoded paths)

(This used to be ctdb commit 56d77082c07a519dd3804cc24cc7ba889b8469ff)
2007-07-15 09:26:54 +10:00
Ronnie Sahlberg
3890fde07f if we dont have /etc/sysconfig and we dont have /etc/default
check /etc/ctdb/sysconfig as a last option

(This used to be ctdb commit 1043929ceb0cd04ab6466e9a5d7d52f9af1cb8e8)
2007-07-15 09:13:50 +10:00
Ronnie Sahlberg
82824e0680 when we have found that /etc/rc.d/init.d/SERVICE exists, then run that
script and not /etc/rc.d/SERVICE

(This used to be ctdb commit 7f0c3a02ef11fd19c8cd5116fd451ebd10ba5d1b)
2007-07-15 08:54:48 +10:00
Ronnie Sahlberg
e7738e9a4b add some configure magic to make it configure and build properly on
linux and aix

(This used to be ctdb commit 6a422e53a60829c7c8d97e31e6ed14ee38cc2d2d)
2007-07-14 15:16:52 +10:00
Ronnie Sahlberg
217142d1e9 add some support for controlling Linux or AIX in the makefile
this should really be done by configure

(This used to be ctdb commit 5a855599288995659e81f1bdbed157bdb207f94a)
2007-07-14 10:58:51 +10:00
Ronnie Sahlberg
a8211f9d1f add an initial system_aix.c to manage raw sockets under aix
(This used to be ctdb commit 277527befedd6f5dfde1c51698245197afd83d99)
2007-07-14 10:27:34 +10:00
Ronnie Sahlberg
6b143c4c5e update the comment at the top of file to reflect the purpose of the file
(This used to be ctdb commit 4d7670102f44ff0f99dafeb050843be38cb258b0)
2007-07-13 17:10:09 +10:00
Ronnie Sahlberg
f09566a81a add a private_data field to the killtcp structure and let the system
specific routines populate it as it see fit when creating a 
capture socket.
pass this structure to read_tcp and close capture socket as parameter

(This used to be ctdb commit 79bbfcfb2223889126fe307d5bbfd24917da07ee)
2007-07-13 17:07:10 +10:00
Andrew Tridgell
8f637e6317 ensure killtcp structure is initialised
(This used to be ctdb commit 2fe7d1ce87e55e125411e7406a9e00b8f55e3cb7)
2007-07-13 11:55:58 +10:00
Andrew Tridgell
1e14ecd176 - merge from ronnie
- cleaner handling of system capture socket

(This used to be ctdb commit d194a41a71b8466d0726dcbae3970a86386fcb3c)
2007-07-13 11:31:18 +10:00
Ronnie Sahlberg
89d13add13 merge from tridge
(This used to be ctdb commit c5002a222d88d4872baea6db5b3e82437307c0ac)
2007-07-13 11:30:19 +10:00
Andrew Tridgell
d2a5af7eb8 fully save/restore scheduler parameters
(This used to be ctdb commit 59408eabe7515d49a6eef3b6fb2590a1cd1df956)
2007-07-13 09:35:46 +10:00
Andrew Tridgell
698a8bc909 fixed the sense of do_setsched
(This used to be ctdb commit 68bca2454ff43ce6d8aab2f87d669d33f5f2a10c)
2007-07-13 09:14:31 +10:00
Andrew Tridgell
0becf46deb allow extra option override in /etc/sysconfig/ctdb
(This used to be ctdb commit f46fae64263ea4776e4bbf9cf14dff17b5b68ddb)
2007-07-13 09:14:15 +10:00
Andrew Tridgell
fc73bc5c24 added --nosetsched option to ctdbd
(This used to be ctdb commit 4cbbb88c1735c7d112e751e22da1c1c69e09bf4a)
2007-07-13 08:47:02 +10:00
Ronnie Sahlberg
850e634166 netinet/if_ether.h is more portable than net/ethernet.h
(This used to be ctdb commit ee84ea17529a27e22c1a0503d07aaeec1ef731e2)
2007-07-12 11:43:30 +10:00
Ronnie Sahlberg
9cde594006 the posix.4 name for the priority field is sched_priority
not __sched_priority

(This used to be ctdb commit c08c5a36b3f1dd2cb72278058cb5664816e1d339)
2007-07-12 11:31:20 +10:00
Ronnie Sahlberg
a650497680 as an optimization for when we want to send multiple tickles at a time
let the caller create the sending socket and use a single socket instead 
of one new one for each tickle.
pass a sending socket to ctdb_sys_send_tcp()

ctdb_sys_kill_tcp is not longer used so remove it

set the socketflags for close on exec and nonblocking in the helper that 
creates the sockets instead of in the caller

add a helper to create a sending socket to send tickles from

(This used to be ctdb commit 469f3fb238a0674a2b48fdf1a7e657e32428178a)
2007-07-12 09:22:06 +10:00
Ronnie Sahlberg
823b7d4a5f rename killtcp->fd to killtcp->capture_fd
we might want to have two sockets attached to the killtcp structure
one for capturing and a second one for sending  so we dont have to 
create a new socket for each tickle we want to send

(This used to be ctdb commit b3e82ec38047bbec1edfd88ade264077d4cbd2ee)
2007-07-12 08:52:24 +10:00
Ronnie Sahlberg
4b6d9485ab ctdb killtcp no longer takes a <numrst> argument to control how many
times to try the reset.

the reset retry attempt is now handled inside the daemon

update the 60.nfs script and remove this parameter that is no longer 
used

(This used to be ctdb commit 30fb09b8b9a989e5cfe86b6daf2dcd2487013344)
2007-07-12 08:31:56 +10:00
Ronnie Sahlberg
76ab80104a make the ctdb tool use the killtcp control in the daemon instead of
calling killtcp directly

(This used to be ctdb commit d21e3e9cf11bdcba6234302e033d6549c557dd69)
2007-07-12 08:30:04 +10:00
Ronnie Sahlberg
1ed0c3a9f7 add daemon code for the new kill_tcp control
(This used to be ctdb commit 8fe4ae62255ecb2db36bea736ff17409ba6614c5)
2007-07-11 18:24:25 +10:00
Ronnie Sahlberg
e4db03f7e6 add a ctdb_ prefix to two public functions
(This used to be ctdb commit 32adee5426aa75ddcd4d648ef326ed03d5ff5c46)
2007-07-11 18:13:03 +10:00
Ronnie Sahlberg
aa080f66d9 first cut at a better and more scalable socketkiller
that can kill multiple connections asynchronously using one listening 
socket

(This used to be ctdb commit 22bb44f3d745aa354becd75d30774992f6c40b3a)
2007-07-11 17:43:51 +10:00
Ronnie Sahlberg
0c44e0ad46 add a ctdb_kill_tcp_callback() that will perform a kill tcp using a
background process

(This used to be ctdb commit dcfcaacff56347d94c244512eb72219b05ef9c3d)
2007-07-11 12:33:14 +10:00