]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
18 years agochange ctdb_validate_vnn to ctdb_validate_pnn
Ronnie Sahlberg [Tue, 4 Sep 2007 00:09:58 +0000 (10:09 +1000)] 
change ctdb_validate_vnn to ctdb_validate_pnn

(This used to be ctdb commit a4a1f41b69475b9dc16d8fd7f8965c32e96c32f0)

18 years agochange ctdb->vnn to ctdb->pnn
Ronnie Sahlberg [Tue, 4 Sep 2007 00:06:36 +0000 (10:06 +1000)] 
change ctdb->vnn to ctdb->pnn

(This used to be ctdb commit 8c776e5707e503ec6586aae39ac6b3ea5a2fd2bc)

18 years agochange how we do public addresses and takeover so that we can have
Ronnie Sahlberg [Mon, 3 Sep 2007 23:50:07 +0000 (09:50 +1000)] 
change how we do public addresses and takeover so that we can have
multiple public addresses spread across multiple interfaces on each
node.

this is a massive patch since we have previously made the assumtion that
we only have one public address per node.

get rid of the public_interface argument.  the public addresses file
now explicitely lists which interface the address belongs to

(This used to be ctdb commit 462ebbc791e906a6b874c862defea43235597ca8)

18 years agomerge from tridge
Ronnie Sahlberg [Sun, 2 Sep 2007 23:29:30 +0000 (09:29 +1000)] 
merge from tridge

(This used to be ctdb commit 5e2a9333363d76378d27f93231f217999a0c30e5)

18 years agoup the release number
Andrew Tridgell [Thu, 30 Aug 2007 07:51:05 +0000 (17:51 +1000)] 
up the release number
(This used to be ctdb commit 71a6213c92a12bf794c17c30ae4987149b68fe1b)

18 years agomerge from ronnie
Andrew Tridgell [Thu, 30 Aug 2007 07:16:23 +0000 (17:16 +1000)] 
merge from ronnie
(This used to be ctdb commit e8138d9375fc34ae0cb31cc0e6ca042baf83eff8)

18 years agowhen we start 60.nfs we must make sure that the shared storage
Ronnie Sahlberg [Thu, 30 Aug 2007 05:27:45 +0000 (15:27 +1000)] 
when we start 60.nfs   we must make sure that the shared storage
nfs-state directory actually exists (by creating it)
or else the lock manager will not start

(This used to be ctdb commit f2d15d04df842538c8d8331796a3c6fbe23463f2)

18 years agomerge from ronnie
Andrew Tridgell [Mon, 27 Aug 2007 08:04:53 +0000 (18:04 +1000)] 
merge from ronnie
(This used to be ctdb commit ab11fd70cf4d2165a5b55930cbad6fddf5397f54)

18 years agomerge from tridge
Ronnie Sahlberg [Mon, 27 Aug 2007 08:04:17 +0000 (18:04 +1000)] 
merge from tridge

(This used to be ctdb commit 7cb17a0752c683f9b244e6f61fa45a770593c68d)

18 years agoadd an extra debug statement when we send a SIGTERM to a process
Ronnie Sahlberg [Mon, 27 Aug 2007 07:33:46 +0000 (17:33 +1000)] 
add an extra debug statement when we send a SIGTERM to a process

(This used to be ctdb commit a9c1be9cf9efdc69bfc95657b70e9f8b8230cda8)

18 years agomake the ctdb shutdown command use the async _send() function to send
Ronnie Sahlberg [Mon, 27 Aug 2007 05:03:52 +0000 (15:03 +1000)] 
make the ctdb shutdown command use the async _send() function to send
the shutdown command
and return success to the caller if the _send() was successful

(This used to be ctdb commit 6bacaf8c7a96044708a6eda10cc8576adb7f5f79)

18 years agofixed segv when no public interface is set
Andrew Tridgell [Mon, 27 Aug 2007 01:49:42 +0000 (11:49 +1000)] 
fixed segv when no public interface is set
(This used to be ctdb commit 55b415f87bd3cba13c73ccd2fe661720754a6af7)

18 years agoadd async versions of the freeze node control and freeze all nodes in
Ronnie Sahlberg [Mon, 27 Aug 2007 00:31:22 +0000 (10:31 +1000)] 
add async versions of the freeze node control and freeze all nodes in
parallell

(This used to be ctdb commit f34e89f54d9f4380e76eb1b5b2385a4d8500b505)

18 years agochange the monitoring of recmode in the recovery daemon to use a fully
Ronnie Sahlberg [Sun, 26 Aug 2007 23:40:10 +0000 (09:40 +1000)] 
change the monitoring of recmode in the recovery daemon to use a fully
async eventdriven api for controls

(This used to be ctdb commit 8d0e43428c507967a0d96e6a4c5c821ac269c546)

18 years agoadd a control to pull the server id list off a node
Ronnie Sahlberg [Sun, 26 Aug 2007 00:57:02 +0000 (10:57 +1000)] 
add a control to pull the server id list off a node

(This used to be ctdb commit 38aa759aa88a042c31b401551f6a713fb7bbe84e)

18 years agoadd an initial implementation of a service_id structure and three
Ronnie Sahlberg [Fri, 24 Aug 2007 05:53:41 +0000 (15:53 +1000)] 
add an initial implementation of a service_id structure and three
controls to  register/unregister/check a server id.

a server id consists of TYPE:VNN:ID    where type is specific to the
application.  VNN is the node where the serverid was registered and ID
might be a node unique identifier such as a pid or similar.

Clients can register a server id for themself at the local ctdb daemon.
When a client dissappears   or when the domain socket connection for the
client drops  then any and all server ids registered across that domain
socket will also be automatically removed from the store.

clients can register as many server_ids as they want at the same time
but each TYPE:VNN:ID must be globally unique.

Clients have the option of explicitely unregister a server id by using
the UNREGISTER control.

Registration and unregistration can only be done by clients to the local
daemon. clients can not register their server id to a remote node.

clients can check if a server id does exist on any ctdb node in the
network by using the check control

(This used to be ctdb commit d44798feec26147c5cc05922cb2186f0ef0307be)

18 years agocleanup invoke_control_callback. we dont need to pass some of these
Ronnie Sahlberg [Fri, 24 Aug 2007 00:54:34 +0000 (10:54 +1000)] 
cleanup invoke_control_callback.   we dont need to pass some of these
parameters to _recv() since they are already set

(This used to be ctdb commit 2034dbebb26d7a2d51241943f6ccbe15bb6a5169)

18 years agochange the api for managing callbacks to controls so that isntead of
Ronnie Sahlberg [Fri, 24 Aug 2007 00:42:06 +0000 (10:42 +1000)] 
change the api for managing callbacks to controls   so that isntead of
passing it as a parameter we set the callback function explicitely from
the caller if the ..._send() function returned a valid state pointer.

(This used to be ctdb commit aa939570662786455f63299b62c99882cff29d42)

18 years agocomment why we do a talloc_steal
Ronnie Sahlberg [Thu, 23 Aug 2007 23:34:04 +0000 (09:34 +1000)] 
comment why we do a talloc_steal

(This used to be ctdb commit aba7972728307e0ae52ccf8c0dd5808110fb92d7)

18 years agoget rid of the explicit global timeout used in the previous example and
Ronnie Sahlberg [Thu, 23 Aug 2007 09:38:54 +0000 (19:38 +1000)] 
get rid of the explicit global timeout used in the previous example and
try this time by relying on the timeouts for the individual controls

(This used to be ctdb commit 448a0eb4fd896dc545aa0b4bb2ba4628491578be)

18 years agotry out a slightly different api for controls where you provide a
Ronnie Sahlberg [Thu, 23 Aug 2007 09:27:09 +0000 (19:27 +1000)] 
try out a slightly different api for controls where you provide a
callback function which is called upon completion (or timeout) of the
control.

modify scanning of recmaster in the monitoring_cluster code to try the
api out

(This used to be ctdb commit c37843f1d97b169afec910e7ddb4e5ac12c3015c)

18 years agobreak checking that the recoverymode on all nodes are ok out into its
Ronnie Sahlberg [Thu, 23 Aug 2007 03:48:39 +0000 (13:48 +1000)] 
break checking that the recoverymode on all nodes are ok  out into its
own function

(This used to be ctdb commit 813cf9a252af96da24122b80f24aabeed2911939)

18 years agohang the ctdb_req_control structure off the ctdb_client_control_state
Ronnie Sahlberg [Thu, 23 Aug 2007 03:00:10 +0000 (13:00 +1000)] 
hang the ctdb_req_control structure off the ctdb_client_control_state
struct  so that if we timeout a control we can print debug info such as
what opcode failed and to which node

we dont need the *status parameter to ctdb_client_control_state

create async versions of the getrecmaster control

pass a memory context to getrecmaster

(This used to be ctdb commit 558b680c82f830fba82c283c78c2de8a0b150b75)

18 years agoin ctdb_call_recv() we must check that state is non-NULL since
Ronnie Sahlberg [Thu, 23 Aug 2007 01:58:09 +0000 (11:58 +1000)] 
in ctdb_call_recv() we must check that state is non-NULL since
ctdb_call() may pass a null pointer to _recv() and this would cause a
segfault.
fortunately there appears there are no critical users for this codepath
right now so the risk was more theoretical IF clients start using this
call it coult segfault.

change ctdb_control() to become fully async so we later can make
recovery daemon do the expensive controls to nodes in parallell instead
of in sequence

(This used to be ctdb commit 379789cda6ef049f389f10136aaa1b37a4d063a9)

18 years agocreate an enum to describe the state of a control in flight instead of
Ronnie Sahlberg [Wed, 22 Aug 2007 23:53:10 +0000 (09:53 +1000)] 
create an enum to describe the state of a control in flight  instead of
using the enum that is for calls

(This used to be ctdb commit f9cf7076151af983a1c4ea56fbeb6d94ea508a34)

18 years agomerge from tridge
Ronnie Sahlberg [Wed, 22 Aug 2007 09:28:03 +0000 (19:28 +1000)] 
merge from tridge

(This used to be ctdb commit 3e17a62e7d9f2867d6f697d5dc5cdddf9fdc3497)

18 years agomerge from ronnie
Andrew Tridgell [Wed, 22 Aug 2007 07:31:29 +0000 (17:31 +1000)] 
merge from ronnie
(This used to be ctdb commit e0f1c1acb1188500674626d631e1a1b8726e72ad)

18 years agomerge from volker
Andrew Tridgell [Wed, 22 Aug 2007 07:18:55 +0000 (17:18 +1000)] 
merge from volker
(This used to be ctdb commit a5587b3c065f7115ad5e55429c2c9d9923d3b4dc)

18 years agomerge from volker
Andrew Tridgell [Wed, 22 Aug 2007 07:16:01 +0000 (17:16 +1000)] 
merge from volker
(This used to be ctdb commit 7007e4f2292aa96287b899d6b9e82c7b597ef58f)

18 years agowhen we receive a packet from the network, check explicitely that the
Ronnie Sahlberg [Wed, 22 Aug 2007 02:53:24 +0000 (12:53 +1000)] 
when we receive a packet from the network, check explicitely that the
node is not banned it the call is for a database record. i.e a REQ/REPLY
CALL/DMASTER

if we get such a call while banned, ignore the packet and write an entry
in the logfile

(This used to be ctdb commit 79eb0863609fbb12e28ebf734101b1d3f359b330)

18 years agocreate a define to represent the 'invalid' generation id we used in two
Ronnie Sahlberg [Wed, 22 Aug 2007 02:38:31 +0000 (12:38 +1000)] 
create a define to represent the 'invalid' generation id we used in two
places.

create a new helper function to generate new generation id values that
know about the invalid id and avoids generating it.

update the ctdb status tool to know about the invalid generation id and
print the string INVALID instead

(This used to be ctdb commit 4fbcd189543cb8a92227fdcd3d158472e558ccda)

18 years agoif the node is inactive i.e. banned or disconnected then that node is
Ronnie Sahlberg [Wed, 22 Aug 2007 01:34:48 +0000 (11:34 +1000)] 
if the node is inactive  i.e. banned or disconnected  then that node is
not participating in the cluster

if a client tries to attach to a database while the node is inactive,
return an error back to the client and fail the attach

(This used to be ctdb commit b26949f3c8e54f3bc60da04d7b4ac69f301068fc)

18 years agowhen a node becomes banned its databases are no longer part of ctdb
Ronnie Sahlberg [Wed, 22 Aug 2007 00:38:35 +0000 (10:38 +1000)] 
when a node becomes banned    its databases are no longer part of ctdb
and it should thus no longer serve any database access calls until it
has been reintroduced into the cluster.

when becoming banned,   reset the local generation id to 1   to prevent
any further database access calls from other nodes from being processed.

(This used to be ctdb commit b531021db43ebaa5f5d0ace28c59913d359bd8a8)

18 years agoif lockwait takes an excessive time to complete. log the time it took to
Ronnie Sahlberg [Tue, 21 Aug 2007 23:46:48 +0000 (09:46 +1000)] 
if lockwait takes an excessive time to complete. log the time it took to
complete and also the name of the database

(This used to be ctdb commit 221ef0348fd8113a017d229d8c2c7aa5c4dfb5c2)

18 years agochange the structure used for node flag change messages so that we can
Ronnie Sahlberg [Tue, 21 Aug 2007 07:25:15 +0000 (17:25 +1000)] 
change the structure used for node flag change messages so that we can
see both the old flags as well as the new flags (so we can tell which
flags changed)

send the CTDB_SRVID_RECONFIGURE messages to connected nodes only, not to
every node, connected or not, in the cluster.

in the handler inside the recovery daemon which is invoked for node flag
change messages, only do a takeover_run() and redistribute the ip addresses IF it was the
disabled or the unhealthy flags that changed. Also send out the cluster
reconfigured message in this case.
If any of the other flags changed we dont need to do the takeover_run(0
here since that will be done during recovery.

(This used to be ctdb commit 5549b2058e2c148a8ca9d419123acf3247bb8829)

18 years agowhen we shutdown the service due to receiving a 'ctdb shutdown' command
Ronnie Sahlberg [Mon, 20 Aug 2007 23:46:27 +0000 (09:46 +1000)] 
when we shutdown the service due to receiving a 'ctdb shutdown' command
from the administrator, log this as 'Received SHUTDOWN command. Stopping
CTDB daemon.'   so that the administrator will know when looking at the
log 'why' the ctdb service was terminated.

Previously the only thing logged was 'shutting down' which is not
detailed enough.

(This used to be ctdb commit 5b818c1b72b6594a8d6e45e1865026e3ce33ae63)

18 years agoadd an atexit() that will print "CTDB daemon shutting down" in the log
Ronnie Sahlberg [Mon, 20 Aug 2007 23:43:53 +0000 (09:43 +1000)] 
add an atexit() that will print "CTDB daemon shutting down" in the log
when the main daemon exits

(This used to be ctdb commit f7422397be2e319bfbee5bf0670583c353eda86d)

18 years agosetup the logfile much earlier in the startup procedure for ctdbd
Ronnie Sahlberg [Mon, 20 Aug 2007 23:33:03 +0000 (09:33 +1000)] 
setup the logfile much earlier in the startup procedure for ctdbd

change initial errors that cause ctdb to fail to start from printf to
DEBUG(0

add a DEBUG(0 to log that the ctdb service is starting

(This used to be ctdb commit 680b4fbb283dd68567a62a83345f11a6cc1dd0e5)

18 years agomake sure that the event script is executable and just ignore it
Ronnie Sahlberg [Mon, 20 Aug 2007 23:22:14 +0000 (09:22 +1000)] 
make sure that the event script is executable and just ignore it
othervise

(This used to be ctdb commit 65eb7845c70489d654acaaf99cd2c8eac7df11dc)

18 years agodont pollute the log with 'Registered PID XXX for client YYY' at log
Ronnie Sahlberg [Mon, 20 Aug 2007 22:42:42 +0000 (08:42 +1000)] 
dont pollute the log with 'Registered PID XXX for client YYY' at log
level 0.

change the log level to 3 for this information message

(This used to be ctdb commit f28d713d9cacd2312932b51175aa8402c96ef76b)

18 years agoif a public address has already been taken over by a node, then let that
Ronnie Sahlberg [Mon, 20 Aug 2007 04:16:58 +0000 (14:16 +1000)] 
if a public address has already been taken over by a node, then let that
public address remain at that node until either the node becomes
unhealthy or the original/primary node for that address becomes healthy
again.

Othervise what will happen is
1, if we ban a node,   the banning code immediately does a
takeover_run() and reassigns the public address to a different node in
the cluster.
2, a few seconds later (at most) the recovery daemon will detect that
the number of nodes has shrunk and will initiate a recovery.
During the recovery  the public address would again be assigned to a
node, this time a different node.

(This used to be ctdb commit 30a6b7a648e22873d8ce6289a3d6dc42c4b9e3b3)

18 years agomerge from tridge
Ronnie Sahlberg [Mon, 20 Aug 2007 03:29:27 +0000 (13:29 +1000)] 
merge from tridge

(This used to be ctdb commit 42f38e787eaa3d8534ce24fca4f29d9ff5bdb9e6)

18 years agoremoved redundent debug message
Andrew Tridgell [Mon, 20 Aug 2007 01:13:38 +0000 (11:13 +1000)] 
removed redundent debug message
(This used to be ctdb commit 9ee742b7cc43be7da6b568308912a3f2cfe4f4d3)

18 years agomerged new event script calling code from ronnnie
Andrew Tridgell [Mon, 20 Aug 2007 01:10:30 +0000 (11:10 +1000)] 
merged new event script calling code from ronnnie
(This used to be ctdb commit bbacad61b3eee4276ffe44ed2a23949aca8152cf)

18 years agostart winbind before smbd
Ronnie Sahlberg [Thu, 16 Aug 2007 01:34:35 +0000 (11:34 +1000)] 
start winbind before smbd

(This used to be ctdb commit d6a2e22a6d688cfcf5631c8de68fc8ef721635d6)

18 years agowe should start winbindd before we start smb
Ronnie Sahlberg [Thu, 16 Aug 2007 01:18:16 +0000 (11:18 +1000)] 
we should start winbindd before we start smb

(This used to be ctdb commit 03aad3ea55c4816a3790ac9336026b4872a65310)

18 years agoadd text to the event script timeout log on how to find out which script
Ronnie Sahlberg [Wed, 15 Aug 2007 05:08:42 +0000 (15:08 +1000)] 
add text to the event script timeout log on how to find out which script
timed out

(This used to be ctdb commit bd6db995fb00ed45c5f0a50bbe6cf5d0fe22a194)

18 years agochange the now rather small /etc/ctdb/events script into a service
Ronnie Sahlberg [Wed, 15 Aug 2007 05:01:31 +0000 (15:01 +1000)] 
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)

18 years agoadd a comment that the talloc_free also removes the script from the tree
Ronnie Sahlberg [Wed, 15 Aug 2007 04:46:06 +0000 (14:46 +1000)] 
add a comment that the talloc_free also removes the script from the tree

(This used to be ctdb commit ce71f6e9cf983cc4fe66935ad6c18d55dfed03a5)

18 years agocall the service specific event scripts directly from the forked child
Ronnie Sahlberg [Wed, 15 Aug 2007 04:44:03 +0000 (14:44 +1000)] 
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)

18 years agozero out the sa struct to supress a valgrind error
Ronnie Sahlberg [Wed, 15 Aug 2007 02:34:41 +0000 (12:34 +1000)] 
zero out the sa struct to supress a valgrind error

(This used to be ctdb commit b17ff60ad4c5fac76d3f77dacb10c30ae564bf09)

18 years agomerge from ronnie
Andrew Tridgell [Wed, 15 Aug 2007 01:48:03 +0000 (11:48 +1000)] 
merge from ronnie
(This used to be ctdb commit 0a91fe52f34d997c1a3cde0fa356deaaf290a4a9)

18 years agofix typo
Ronnie Sahlberg [Wed, 15 Aug 2007 01:38:27 +0000 (11:38 +1000)] 
fix typo

(This used to be ctdb commit c7a8e7b506f98240c0e9f705fe1f504a6a56a332)

18 years agoadd a description on how the event scripts works to the README and make
Ronnie Sahlberg [Wed, 15 Aug 2007 01:36:01 +0000 (11:36 +1000)] 
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)

18 years agoadd a function to return the first entry that is stored in a tree where
Ronnie Sahlberg [Wed, 15 Aug 2007 00:57:21 +0000 (10:57 +1000)] 
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)

18 years agocomment that ctdb_event_script_v() is called from a forked childs
Ronnie Sahlberg [Wed, 15 Aug 2007 00:48:10 +0000 (10:48 +1000)] 
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)

18 years agoadd a wrapper function to create the key used to insert/lookup a certain
Ronnie Sahlberg [Wed, 15 Aug 2007 00:01:00 +0000 (10:01 +1000)] 
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)

18 years agomerge changes needed for samba4
Andrew Tridgell [Tue, 14 Aug 2007 23:03:58 +0000 (09:03 +1000)] 
merge changes needed for samba4
(This used to be ctdb commit a7f80f78cd62401b3516da3640bf24d6362db872)

18 years agofrom Chris Cowan
Ronnie Sahlberg [Tue, 14 Aug 2007 21:59:01 +0000 (07:59 +1000)] 
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)

18 years agoenhanced tests to verify the tree integrity when adding/removing nodes
Ronnie Sahlberg [Mon, 13 Aug 2007 04:29:19 +0000 (14:29 +1000)] 
enhanced tests to verify the tree integrity when adding/removing nodes

(This used to be ctdb commit 7885a4fa6e4ac50081e440ed6c82101ec807999f)

18 years agoremove an extra blankline
Ronnie Sahlberg [Thu, 9 Aug 2007 06:11:11 +0000 (16:11 +1000)] 
remove an extra blankline

(This used to be ctdb commit c71f237e384b33e3c560af3329c615bda613ca04)

18 years agochange the mem hierarchy for trees. let the node be owned by the data
Ronnie Sahlberg [Thu, 9 Aug 2007 04:08:59 +0000 (14:08 +1000)] 
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)

18 years agoremove an unused function
Ronnie Sahlberg [Wed, 8 Aug 2007 21:59:50 +0000 (07:59 +1000)] 
remove an unused function

(This used to be ctdb commit 38a26d1f3709fbce551bc3a7af8bacd0ff465bca)

18 years agorun the test for 60 seconds if that is what we claim
Ronnie Sahlberg [Wed, 8 Aug 2007 07:49:08 +0000 (17:49 +1000)] 
run the test for 60 seconds if that is what we claim

(This used to be ctdb commit ff0c0526e21c35fe7a599e61cd0f84352c7f6ad6)

18 years agoadd more extensive test cases and verify that we are not losing any
Ronnie Sahlberg [Wed, 8 Aug 2007 07:26:40 +0000 (17:26 +1000)] 
add more extensive test cases  and verify that we are not losing any
memory inside the tree

(This used to be ctdb commit 838376b52d65af509532a141d83b51975c7cc881)

18 years agowhen we want to kill a tcp connection we stored the connection
Ronnie Sahlberg [Wed, 8 Aug 2007 05:09:19 +0000 (15:09 +1000)] 
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)

18 years agoadd helpers to traverse a tree where the key is an array of uint32
Ronnie Sahlberg [Wed, 8 Aug 2007 03:50:18 +0000 (13:50 +1000)] 
add helpers to traverse a tree where the key is an array of uint32

(This used to be ctdb commit d328c66827cafff6356e96df2a782930274fe139)

18 years agoadd helpers to add/lookup/delete nodes in a tree where the key is an
Ronnie Sahlberg [Wed, 8 Aug 2007 02:30:12 +0000 (12:30 +1000)] 
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)

18 years agoadd a tree insert function that takes a callback fucntion to populate
Ronnie Sahlberg [Wed, 8 Aug 2007 01:21:18 +0000 (11:21 +1000)] 
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)

18 years agochange fprintf(stderr to DEBUG(0, now that client DEBUGs are redirected
Ronnie Sahlberg [Wed, 8 Aug 2007 00:19:42 +0000 (10:19 +1000)] 
change fprintf(stderr to DEBUG(0, now that client DEBUGs are redirected
to stderr

(This used to be ctdb commit 14078130d295014a751f3e0039bc8eaf427440f9)

18 years agomerge from tridge
Ronnie Sahlberg [Wed, 8 Aug 2007 00:14:44 +0000 (10:14 +1000)] 
merge from tridge

(This used to be ctdb commit b6ffb429ab33a66e374e9481bbf4fe6b47a67dab)

18 years agocompile rb_tree.c by default.
Ronnie Sahlberg [Tue, 7 Aug 2007 22:25:20 +0000 (08:25 +1000)] 
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)

18 years agowhen inserting data in the tree, if there was already a node with the
Ronnie Sahlberg [Tue, 7 Aug 2007 22:20:46 +0000 (08:20 +1000)] 
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)

18 years ago/etc/sysconfig/nfs can now discover the public ipaddress automagically
Ronnie Sahlberg [Tue, 7 Aug 2007 21:58:13 +0000 (07:58 +1000)] 
/etc/sysconfig/nfs can now discover the public ipaddress automagically

(This used to be ctdb commit 75e6fe48e4085eedf99ca1223a0e92208e77f716)

18 years agodont wait indefinitely for the initial getvnn to complete
Ronnie Sahlberg [Tue, 7 Aug 2007 21:35:53 +0000 (07:35 +1000)] 
dont wait indefinitely for the initial getvnn to complete

(This used to be ctdb commit ef38725ad8c5f1792feacb14b8888f246187da15)

18 years agomerge from ronnie
Andrew Tridgell [Tue, 7 Aug 2007 03:40:13 +0000 (13:40 +1000)] 
merge from ronnie
(This used to be ctdb commit e06f70f064e39f1a4a394f00b81b6b1d215534d4)

18 years agochange error output in ctdb and in ctdb_cmdline_client to print to
Ronnie Sahlberg [Tue, 7 Aug 2007 02:51:25 +0000 (12:51 +1000)] 
change error output in ctdb   and in ctdb_cmdline_client to print to
stderr instead of stdout

(This used to be ctdb commit 6e6e165c2d8f0963ce37567c23aaa012fc3e89d9)

18 years agoadd a ctdb command to print the default public ip of a host.
Ronnie Sahlberg [Tue, 7 Aug 2007 02:10:05 +0000 (12:10 +1000)] 
add a ctdb command to print the default public ip of a host.

(This used to be ctdb commit 7de5489f6ebd0e5671e7afa5cb51471043ee46d1)

18 years agomerge from tridge
Ronnie Sahlberg [Tue, 7 Aug 2007 00:47:30 +0000 (10:47 +1000)] 
merge from tridge

(This used to be ctdb commit e81b5455af04a76ff53a0eceed9db7e4599c221e)

18 years agomove scsi/scsi_io.c to utils/scsi/scsi_io.c
Ronnie Sahlberg [Mon, 6 Aug 2007 23:03:51 +0000 (09:03 +1000)] 
move scsi/scsi_io.c to utils/scsi/scsi_io.c

(This used to be ctdb commit 157e5a0e96af133d28a36847c82efd23fb2354e3)

18 years agowe dont use sm-notify any more
Ronnie Sahlberg [Mon, 6 Aug 2007 21:40:33 +0000 (07:40 +1000)] 
we dont use sm-notify any more

remove it from the webpage

(This used to be ctdb commit d5447d4ce487f3575054beba07bf255a6a51d2e4)

18 years agodo not restart lockd/statd when we takeover an ip address this is
Ronnie Sahlberg [Sat, 4 Aug 2007 01:23:04 +0000 (11:23 +1000)] 
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)

18 years agoupdate the specfile to install smnotify
Ronnie Sahlberg [Sat, 4 Aug 2007 00:16:37 +0000 (10:16 +1000)] 
update the specfile to install smnotify

(This used to be ctdb commit a7ae82f62474711bfb3dc90e91c6e2b75bf3ee8e)

18 years agoinstall smnotify in $(bindir)
Ronnie Sahlberg [Sat, 4 Aug 2007 00:15:07 +0000 (10:15 +1000)] 
install smnotify in $(bindir)

(This used to be ctdb commit 61bc93b7b23b74c5b5c7a8e2d6bc5b75c8f73fe1)

18 years agomerge from ronnie
Andrew Tridgell [Fri, 3 Aug 2007 03:18:44 +0000 (13:18 +1000)] 
merge from ronnie
(This used to be ctdb commit e2f11745df88d22e98fc5d5e1ca69acac13f1423)

18 years agodont wait for the default rpc timeout when trying to bing to a client.
Ronnie Sahlberg [Fri, 3 Aug 2007 00:47:37 +0000 (10:47 +1000)] 
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)

18 years agoadd a small tool that can send smnotify packets
Ronnie Sahlberg [Fri, 3 Aug 2007 00:18:48 +0000 (10:18 +1000)] 
add a small tool that can send smnotify packets

(This used to be ctdb commit 2bf3e1311ed9c68eeae9e18344da9ca08f0d4297)

18 years agoupdate the manpage for the -n option to make it clear we are referring
Ronnie Sahlberg [Thu, 2 Aug 2007 21:53:52 +0000 (07:53 +1000)] 
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)

18 years agoafter we have checked dest address that it is a public address
Ronnie Sahlberg [Mon, 30 Jul 2007 06:10:14 +0000 (16:10 +1000)] 
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)

18 years agoadd a small tool to compare rb tree with a timeval_compare()+add an
Ronnie Sahlberg [Mon, 30 Jul 2007 00:50:35 +0000 (10:50 +1000)] 
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)

18 years agofix the remaining bugs with tree delete that testing found.
Ronnie Sahlberg [Sun, 29 Jul 2007 23:09:34 +0000 (09:09 +1000)] 
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)

18 years agoremove dead code
Ronnie Sahlberg [Wed, 25 Jul 2007 21:22:36 +0000 (07:22 +1000)] 
remove dead code

(This used to be ctdb commit 97ffcda5e56f04aed2f4f8b889b4eb6311f69c4d)

18 years agofix some remaining bugs with deleting nodes
Ronnie Sahlberg [Wed, 25 Jul 2007 21:21:32 +0000 (07:21 +1000)] 
fix some remaining bugs with deleting nodes

(This used to be ctdb commit 8aec0e0bef794afce1d2abf762bfadee4ab7e619)

18 years agothere were situations where we were not guaranteed that a sibling had 2
Ronnie Sahlberg [Wed, 25 Jul 2007 07:53:55 +0000 (17:53 +1000)] 
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)

18 years agoif sibling is NULL it is a leaf node and thus black.
Ronnie Sahlberg [Wed, 25 Jul 2007 07:22:04 +0000 (17:22 +1000)] 
if sibling is NULL it is a leaf node and thus black.

(This used to be ctdb commit 400488472ba64514fa6534d5de90edba6c5e27c6)

18 years agomake timed_event structure private to events_timed.c
Andrew Tridgell [Wed, 25 Jul 2007 01:43:27 +0000 (11:43 +1000)] 
make timed_event structure private to events_timed.c
(This used to be ctdb commit 4a61132e2a4f6beca8e9148307c7ec16cb74bb08)

18 years agono need to have a separate assignment of the tcparray pointer followed
Ronnie Sahlberg [Tue, 24 Jul 2007 22:03:58 +0000 (08:03 +1000)] 
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)

18 years agoup release number
Andrew Tridgell [Tue, 24 Jul 2007 12:14:12 +0000 (22:14 +1000)] 
up release number
(This used to be ctdb commit 2b9c196e66264c7a130c957b4d23fc61a62bb10a)

18 years agoinitial version of talloc based red-black trees
Ronnie Sahlberg [Tue, 24 Jul 2007 08:51:13 +0000 (18:51 +1000)] 
initial version of talloc based red-black trees
very initial version

(This used to be ctdb commit 121f5c9dfc8e441313e42d94bed9c9f13ec91398)

18 years agowhen we build the arp structure for sending gratious arp (and tcp
Ronnie Sahlberg [Mon, 23 Jul 2007 21:46:51 +0000 (07:46 +1000)] 
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)