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

972 Commits

Author SHA1 Message Date
Andrew Tridgell
405e123ffb removed redundent debug message
(This used to be ctdb commit 9ee742b7cc43be7da6b568308912a3f2cfe4f4d3)
2007-08-20 11:13:38 +10:00
Andrew Tridgell
46639ac19e merged new event script calling code from ronnnie
(This used to be ctdb commit bbacad61b3eee4276ffe44ed2a23949aca8152cf)
2007-08-20 11:10:30 +10:00
Ronnie Sahlberg
1ee8c79db7 start winbind before smbd
(This used to be ctdb commit d6a2e22a6d688cfcf5631c8de68fc8ef721635d6)
2007-08-16 11:34:35 +10:00
Ronnie Sahlberg
ce91401724 we should start winbindd before we start smb
(This used to be ctdb commit 03aad3ea55c4816a3790ac9336026b4872a65310)
2007-08-16 11:18:16 +10:00
Ronnie Sahlberg
7322e82bcb add text to the event script timeout log on how to find out which script
timed out

(This used to be ctdb commit bd6db995fb00ed45c5f0a50bbe6cf5d0fe22a194)
2007-08-15 15:08:42 +10:00
Ronnie Sahlberg
3b9d50f3ee change the now rather small /etc/ctdb/events script into a service
specific script /etc/ctdb/events.d/00.ctdb

get rid of CTDB_EVENTS_SCRIPT and --event-script

(This used to be ctdb commit 81ccfaf838e5772d4a58eb6a70224b7b39aba9f3)
2007-08-15 15:01:31 +10:00
Ronnie Sahlberg
ff58f7c7ea add a comment that the talloc_free also removes the script from the tree
(This used to be ctdb commit ce71f6e9cf983cc4fe66935ad6c18d55dfed03a5)
2007-08-15 14:46:06 +10:00
Ronnie Sahlberg
4023576e50 call the service specific event scripts directly from the forked child
instead for from /etc/ctdb/events so that we can get better debugging 
output in the logs when something fails in the scripts

(This used to be ctdb commit 4ed96b768aea1611e8002f7095d3c4d12ccf77a3)
2007-08-15 14:44:03 +10:00
Ronnie Sahlberg
6fc0653b97 zero out the sa struct to supress a valgrind error
(This used to be ctdb commit b17ff60ad4c5fac76d3f77dacb10c30ae564bf09)
2007-08-15 12:34:41 +10:00
Andrew Tridgell
f2fb717402 merge from ronnie
(This used to be ctdb commit 0a91fe52f34d997c1a3cde0fa356deaaf290a4a9)
2007-08-15 11:48:03 +10:00
Ronnie Sahlberg
1fa787e667 fix typo
(This used to be ctdb commit c7a8e7b506f98240c0e9f705fe1f504a6a56a332)
2007-08-15 11:38:27 +10:00
Ronnie Sahlberg
83dbfecad7 add a description on how the event scripts works to the README and make
sure it is installed in /etc/ctdb/events.d

(This used to be ctdb commit adec62a924af5bb023f346e705515b09dbe64f21)
2007-08-15 11:36:01 +10:00
Ronnie Sahlberg
e0957ba4a4 add a function to return the first entry that is stored in a tree where
the key is an array of uint32_t

(This used to be ctdb commit 99553397aade4f1c4d17ef14dad406934958c80a)
2007-08-15 10:57:21 +10:00
Ronnie Sahlberg
5a02262a06 comment that ctdb_event_script_v() is called from a forked childs
context and thus can make blocking calls

(This used to be ctdb commit b31d98281f15995ad340d2510e08e04ed46e271a)
2007-08-15 10:48:10 +10:00
Ronnie Sahlberg
56d5ef27b6 add a wrapper function to create the key used to insert/lookup a certain
tcp connection in the tree that stores the tcp connections to kill by 
sending an RST

add a define that specified the keylength instead of hardcoding it as 4

(This used to be ctdb commit 6a8322cbae10f2c78b2e286c75aeb25ece12ea7f)
2007-08-15 10:01:00 +10:00
Andrew Tridgell
f03defff70 merge changes needed for samba4
(This used to be ctdb commit a7f80f78cd62401b3516da3640bf24d6362db872)
2007-08-15 09:03:58 +10:00
Ronnie Sahlberg
6d5af34024 from Chris Cowan
patches to smnotify to make it compile under AIX.

On AIX, we need to specify $(POPT_OBJ) explicitely

On AIX we can not use the -C flag to rpcgen since it is not implemented

On AIX we must explicitely force an #include of rpc/rpc.h in the idl 
file since rpcgen does not automatically add it to the generated files

(This used to be ctdb commit 8c3e7ce645ec829bc465302831cc6b23452525d6)
2007-08-15 07:59:01 +10:00
Ronnie Sahlberg
9c6e37fea4 enhanced tests to verify the tree integrity when adding/removing nodes
(This used to be ctdb commit 7885a4fa6e4ac50081e440ed6c82101ec807999f)
2007-08-13 14:29:19 +10:00
Ronnie Sahlberg
a405cc32d9 remove an extra blankline
(This used to be ctdb commit c71f237e384b33e3c560af3329c615bda613ca04)
2007-08-09 16:11:11 +10:00
Ronnie Sahlberg
adb49f02f0 change the mem hierarchy for trees. let the node be owned by the data
we store in the tree and use a node destructor so that when the data is 
talloc_free()d we also remove the node from the tree.

(This used to be ctdb commit b8dabd1811ebd85ee031563e95085f720a2fa04d)
2007-08-09 14:08:59 +10:00
Ronnie Sahlberg
18deb7e015 remove an unused function
(This used to be ctdb commit 38a26d1f3709fbce551bc3a7af8bacd0ff465bca)
2007-08-09 07:59:50 +10:00
Ronnie Sahlberg
5332b61c4f run the test for 60 seconds if that is what we claim
(This used to be ctdb commit ff0c0526e21c35fe7a599e61cd0f84352c7f6ad6)
2007-08-08 17:49:08 +10:00
Ronnie Sahlberg
22e8064ae9 add more extensive test cases and verify that we are not losing any
memory inside the tree

(This used to be ctdb commit 838376b52d65af509532a141d83b51975c7cc881)
2007-08-08 17:26:40 +10:00
Ronnie Sahlberg
9c216d0d76 when we want to kill a tcp connection we stored the connection
description (src + dst sockaddr_in) in a linked list.
everytime we receive a captured packet from the network we had to walk 
this list in linear time to see if the packet matched a connection we 
wanted to RST.
which wouldnt scale very well.


replace the linked list with a redblack tree that is indexed by
src address, src port,  dst address,   dst port
to make checking whether the packet belongs to a connection we want to 
RST very fast and scalable


the reason we need to capture packets when we want to kill a TCP 
connection is because we must wait for an ACK coming back from the 
remote host  so that we can learn which sequence number to use in the 
RST.
Most tcp today will ingore any and all RST segments unless the 
sequencenumber lies exactly on the right edge of the window to make 
spoofing RST a little bit more difficult.

(This used to be ctdb commit ced18caea8582af042287beb6333dd1f8ba3344d)
2007-08-08 15:09:19 +10:00
Ronnie Sahlberg
203306400e add helpers to traverse a tree where the key is an array of uint32
(This used to be ctdb commit d328c66827cafff6356e96df2a782930274fe139)
2007-08-08 13:50:18 +10:00
Ronnie Sahlberg
9525b010aa add helpers to add/lookup/delete nodes in a tree where the key is an
array of uint32

(This used to be ctdb commit b7e0996e7735c8629d07453b9d335990c2dbc3db)
2007-08-08 12:30:12 +10:00
Ronnie Sahlberg
c1bfda5772 add a tree insert function that takes a callback fucntion to populate
the data of the tree.
this callback makes it more convenient to manage cases where one might 
want to insert multiple entries into the tree with the same key

rename the tree->tree pointer to tree->root  since this is supposed to 
point to the root of the tree

add a small test utility

(This used to be ctdb commit f6313bed9c53e0d1c36c9e08ac707e88e2a4fcd5)
2007-08-08 11:21:18 +10:00
Ronnie Sahlberg
26d3cd38a9 change fprintf(stderr to DEBUG(0, now that client DEBUGs are redirected
to stderr

(This used to be ctdb commit 14078130d295014a751f3e0039bc8eaf427440f9)
2007-08-08 10:19:42 +10:00
Ronnie Sahlberg
c522b852c4 merge from tridge
(This used to be ctdb commit b6ffb429ab33a66e374e9481bbf4fe6b47a67dab)
2007-08-08 10:14:44 +10:00
Ronnie Sahlberg
65d78aade4 compile rb_tree.c by default.
this code is not yet called from anywhere but is at least now compiled

(This used to be ctdb commit 4bc06e4d1e6e2ff57e33bae93613b12e7ea26bb0)
2007-08-08 08:25:20 +10:00
Ronnie Sahlberg
49f0317b21 when inserting data in the tree, if there was already a node with the
same key then replace the data in the node with the new data and return 
the pointer to the previous data held in the node.

this allows a caller to avoid having to first check if a node already 
exists before inserting a possibly duplicate/colliding entry and lets 
the caller do whatever it needs to do after the fact.

(This used to be ctdb commit 6634cabb910c26400780d51727ff2d1ba5e16e36)
2007-08-08 08:20:46 +10:00
Ronnie Sahlberg
a85054adcf /etc/sysconfig/nfs can now discover the public ipaddress automagically
(This used to be ctdb commit 75e6fe48e4085eedf99ca1223a0e92208e77f716)
2007-08-08 07:58:13 +10:00
Ronnie Sahlberg
24d1ee09ec dont wait indefinitely for the initial getvnn to complete
(This used to be ctdb commit ef38725ad8c5f1792feacb14b8888f246187da15)
2007-08-08 07:35:53 +10:00
Andrew Tridgell
8a81a03b9e merge from ronnie
(This used to be ctdb commit e06f70f064e39f1a4a394f00b81b6b1d215534d4)
2007-08-07 13:40:13 +10:00
Ronnie Sahlberg
d69055b789 change error output in ctdb and in ctdb_cmdline_client to print to
stderr instead of stdout

(This used to be ctdb commit 6e6e165c2d8f0963ce37567c23aaa012fc3e89d9)
2007-08-07 12:51:25 +10:00
Ronnie Sahlberg
2b51871bad add a ctdb command to print the default public ip of a host.
(This used to be ctdb commit 7de5489f6ebd0e5671e7afa5cb51471043ee46d1)
2007-08-07 12:10:05 +10:00
Ronnie Sahlberg
b5a3653471 merge from tridge
(This used to be ctdb commit e81b5455af04a76ff53a0eceed9db7e4599c221e)
2007-08-07 10:47:30 +10:00
Ronnie Sahlberg
5c1a7f19fc move scsi/scsi_io.c to utils/scsi/scsi_io.c
(This used to be ctdb commit 157e5a0e96af133d28a36847c82efd23fb2354e3)
2007-08-07 09:03:51 +10:00
Ronnie Sahlberg
209f63d42a we dont use sm-notify any more
remove it from the webpage

(This used to be ctdb commit d5447d4ce487f3575054beba07bf255a6a51d2e4)
2007-08-07 07:40:33 +10:00
Ronnie Sahlberg
8b58fe2489 do not restart lockd/statd when we takeover an ip address this is
overkill since
1, we now kill the tcpconnections for lockd in 60.nfs
2, rpc.statd on linux sends out the notifications using the wrong 
interface anyway  which breaks a lot of clients  including linux !



use our own smnotify tool instead of sm-notify

(This used to be ctdb commit 0163ad0ec01be6189a98ea91e5cec40f6750218f)
2007-08-04 11:23:04 +10:00
Ronnie Sahlberg
3d7b4e9322 update the specfile to install smnotify
(This used to be ctdb commit a7ae82f62474711bfb3dc90e91c6e2b75bf3ee8e)
2007-08-04 10:16:37 +10:00
Ronnie Sahlberg
bc832646f7 install smnotify in $(bindir)
(This used to be ctdb commit 61bc93b7b23b74c5b5c7a8e2d6bc5b75c8f73fe1)
2007-08-04 10:15:07 +10:00
Andrew Tridgell
5e0215a0be merge from ronnie
(This used to be ctdb commit e2f11745df88d22e98fc5d5e1ca69acac13f1423)
2007-08-03 13:18:44 +10:00
Ronnie Sahlberg
9262e2ab8a dont wait for the default rpc timeout when trying to bing to a client.
abort after 3 seconds

fix makefile so that we generate the header before trying to compile 
smnotify.o

(This used to be ctdb commit bda310b74d6364bf88032874a1f3a2fb156f9736)
2007-08-03 10:47:37 +10:00
Ronnie Sahlberg
da1d5fb2cc add a small tool that can send smnotify packets
(This used to be ctdb commit 2bf3e1311ed9c68eeae9e18344da9ca08f0d4297)
2007-08-03 10:18:48 +10:00
Ronnie Sahlberg
ec837e33d7 update the manpage for the -n option to make it clear we are referring
to the node number and not the node hostname

(This used to be ctdb commit dd9b60887cadb6a8f442230cc06888fd82e7c952)
2007-08-03 07:53:52 +10:00
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