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

91 Commits

Author SHA1 Message Date
Andrew Tridgell
e6d5848a20 report number of clients in ping
(This used to be ctdb commit 9deaa1892faa8288cad9f6fde20d2aa8ba8af699)
2007-04-28 15:15:21 +02:00
Ronnie Sahlberg
acb4bc095b add a few more controls that are useful for debugging a cluster
(This used to be ctdb commit 751c1365ab55a217ff33d985d52bd26581578617)
2007-04-28 20:40:26 +10:00
Ronnie Sahlberg
643bfe83d3 add a control to pull the database list from a remote node
(This used to be ctdb commit d130e02936ea4bdcd3a6f02c53be4b7771993138)
2007-04-28 20:00:50 +10:00
Andrew Tridgell
353a82f87c factor out the packet allocation code
(This used to be ctdb commit 4cbaf22cc4bede8c95dd9b87e21bbe886307e23b)
2007-04-28 10:50:32 +02:00
Andrew Tridgell
a8de91b83f merge from ronnie
(This used to be ctdb commit 9253714401de1d7fea6ad44c35f324004683abd7)
2007-04-28 09:54:45 +02:00
Ronnie Sahlberg
916c55ec2f add a generation field to the pdu header.
this will allow a node to verify that a received pdu is sent from a node 
in the same generation instance of a cluster.

(This used to be ctdb commit e32d3ca9a622237c4e2622de98825c0962760d48)
2007-04-28 01:06:26 +10:00
Andrew Tridgell
e629252b2c merge from ronnie
(This used to be ctdb commit d21de127cceea7174b2e05701c8846c0b0c881c0)
2007-04-27 16:53:52 +02:00
Andrew Tridgell
eee3912c99 some debug code
(This used to be ctdb commit 957801ad6285c21fd11469a60dbdcc170e7009cb)
2007-04-27 16:42:43 +02:00
Ronnie Sahlberg
5b4ebe1345 make srvid 64 bits instead of 32 bits
(This used to be ctdb commit 723bcfbba1d5aa711496d37b9658190b78a2d66b)
2007-04-28 00:31:45 +10:00
Andrew Tridgell
3dc6331aee merged broadcast messages from ronnie
(This used to be ctdb commit bc20a7de280dbaa5e8ceb5493c51c059aa80d41c)
2007-04-27 15:26:13 +02:00
Ronnie Sahlberg
f616f2de10 add a special VNN that means "all" nodes so that a message can be
broadcasted to all daemons in the cluster

change the message dispatch routine for sending messages so that it 
allows several clients to use the same srvid
messages are then passed on to all clients that have that srvid

(This used to be ctdb commit 05d7ebb3556785f0f17a87d808f31ffe8dac288a)
2007-04-27 23:16:17 +10:00
Andrew Tridgell
22546add19 debug level controls
(This used to be ctdb commit 85f883c081dd1ab069420d2e7f4f2e9d708b3cde)
2007-04-27 15:14:36 +02:00
Ronnie Sahlberg
d4c54a93a0 add a new control : SETVNNMAP to set the generation id and also the vnn
map on a ctdbd daemon

(This used to be ctdb commit f55707885f7b233ad6ddfc952d08851577063200)
2007-04-27 22:08:12 +10:00
Ronnie Sahlberg
d9edf88ae5 add a control to read the vnnmap configuration from a node
add support in ctdb_control to fetch this information from a node

(This used to be ctdb commit 8d7f26c8d78d30c3ccb15a28ddea940d8666e052)
2007-04-27 20:56:10 +10:00
Ronnie Sahlberg
ec3856ead9 add a mapping table from a hash value to a lmaster vnn number
update ctdb_lmaster() return the lmaster based on this tables contents


initialize the vnn table based on number of nodes for now.
later when recovery is implemented the recovery process will populate 
this mapping table.

(This used to be ctdb commit 71e440f6c26ea074f9887237c962101c8cef8c80)
2007-04-27 18:43:52 +10:00
Andrew Tridgell
f0a582e454 got rid of the getdbpath call
(This used to be ctdb commit 736ce5c00a1d1b47abb44c4b262b14bfba5202b1)
2007-04-26 23:10:35 +02:00
Andrew Tridgell
afa0876335 added a ctdb_get_config call
added a ctdb ping control

(This used to be ctdb commit 7d17378b6e6076a922cffe98239e20dfbbae3bf7)
2007-04-26 19:27:07 +02:00
Andrew Tridgell
c23d1694db merge from peter
(This used to be ctdb commit ddf390da2bceb5b3f431433aec424d99d98c05f4)
2007-04-26 15:28:13 +02:00
Peter Somogyi
9d521cf16a merged tridge's branch
(This used to be ctdb commit 02ec7d6abb75a7c0a414efd4a50d44e6f1e5e407)
2007-04-26 15:00:24 +02:00
Andrew Tridgell
8ae14b4052 moved status to ctdb_control
(This used to be ctdb commit 9a543968ba0379fbf8e977e184f22f4349d6243f)
2007-04-26 14:51:41 +02:00
Andrew Tridgell
d955485e7b added a ctdb control message, and tool
(This used to be ctdb commit 0d7a71f35bb8ce95231f8ca1e8e3e4024fe657e5)
2007-04-26 14:27:49 +02:00
Andrew Tridgell
c1a4b3c687 merge from ronnie
(This used to be ctdb commit 37ef65737571a4290a150c28cf2b0a6b221253fd)
2007-04-26 11:13:49 +02:00
Ronnie Sahlberg
dabf61075f add pdu's that the client can use to query the ctdb daemon of the path
to the database it created (so the client can open and access the same 
file)

(This used to be ctdb commit c2eda19499b3263b2248c41bd531fb73c7b42212)
2007-04-24 00:06:48 +10:00
Ronnie Sahlberg
bd62c78154 split the 32bit idr field into two.
store the idr as the high 16 bits and use a rotating counter for the low 
16 bits.

(This used to be ctdb commit 7c763b7b5e6ca54a6df4586893ddaf1b508b4c22)
2007-04-23 18:19:50 +10:00
Andrew Tridgell
f651581460 added max_redirect_count status field
(This used to be ctdb commit ecea04741fe552aa409ab165d7c69ead9649986c)
2007-04-22 18:57:22 +02:00
Andrew Tridgell
107d91e391 - when handling a record migration in the lmaster, bypass the usual
dmaster request stage, and instead directly send a dmaster
  reply. This avoids a race condition where a new call comes in for
  the same record while processing the dmaster request

- don't keep any redirect records during a ctdb call.  This prevents a
  memory leak in case of a redirect storm

(This used to be ctdb commit 59889ca0fd606c7d2156839383a09dfc5a2e4853)
2007-04-22 14:26:45 +02:00
Peter Somogyi
981a5f9d30 removing my dirt from tridge's code
(this change wasn't necessary)

(This used to be ctdb commit 217d996abdafe91c2f51d9d486d95a6607b56285)
2007-04-20 16:22:57 +02:00
Peter Somogyi
e5f2e5e5eb - ctdb/ib minor bugfixes (error case)
- make ctdb capable of alternative connection (like ib) again, solved the fork problem
- do_debug memory overwrite bugfix (occured using ibwrapper_test with wrong address given)

(This used to be ctdb commit da0b84cda26d544f63841dfd770ed7ebad401944)
2007-04-20 14:26:19 +02:00
Andrew Tridgell
e9d43f5e43 - expanded status to include count of each call type
- added lockwait latency

(This used to be ctdb commit 0b5d196147e644cf8b172cb4b593fd46b1caa386)
2007-04-20 21:02:53 +10:00
Andrew Tridgell
2e5aae04de added ctdb_status tool
(This used to be ctdb commit 908d6c6a936e21f70f05827ce302e966cca0132a)
2007-04-20 20:07:47 +10:00
Andrew Tridgell
e5c5a91a7b - split out ctdb_ltdb_lock_fetch_requeue() into a simpler
ctdb_ltdb_lock_requeue() and a small wrapper

- use ctdb_ltdb_lock_requeue() to fix a possible hang in
  ctdb_reply_dmaster(), where the ctdb_ltdb_store() could hang waiting
  for a client. We now requeue the reply_dmaster packet until we have
  the lock

(This used to be ctdb commit 97cd7aa09ce3abbb5e3e965c5c81668e0c0133a5)
2007-04-19 17:43:27 +10:00
Andrew Tridgell
273a3944a8 - added a --torture option to all ctdb tools. This sets
CTDB_FLAG_TORTURE, which forces some race conditions to be much more
  likely. For example a 20% chance of not getting the lock on the
  first try in the daemon

- abstraced the ctdb_ltdb_lock_fetch_requeue() code to allow it to
  work with both inter-node packets and client->daemon packets

- fixed a bug left over in ctdb_call from when the client updated the
  header on a call reply

- removed CTDB_FLAG_CONNECT_WAIT flag (not needed any more)

(This used to be ctdb commit 7559dcd184666c3853127e3c8f5baef4fea327c4)
2007-04-19 16:27:56 +10:00
Andrew Tridgell
634aa50d90 don't need these structures any more
(This used to be ctdb commit 506117dc24ec647c629c92a3996455cd8d9c8ec6)
2007-04-19 12:34:24 +10:00
Andrew Tridgell
e830dfd18d much simpler fetch code!
fetch is now confined to the client code, no spcial code at
all in the daemon. 

(This used to be ctdb commit 3ec801c9717e250b902760862df188e03c9bdbf4)
2007-04-19 11:56:37 +10:00
Andrew Tridgell
d0af75d1fa - fully separate the client version of ctdb_call from the daemon
version. The client version is different enough that this is
  worthwhile

- enable local shortcut for client version of ctdb_call

- add idr_find_type(), with better error reporting in case of type
  mismatch

(This used to be ctdb commit 2388094c5f7b6ce003e86b05620c06217d63b49c)
2007-04-19 11:28:01 +10:00
Andrew Tridgell
b79e29c779 - make he packet allocation routines take a mem_ctx, which allows
us to put memory directly in the right context, avoiding quite a few
  talloc_steal calls, and simplifying the code

- make the fetch lock code in the daemon fully async

(This used to be ctdb commit d98b4b4fcadad614861c0d44a3854d97b01d0f74)
2007-04-19 10:37:44 +10:00
Andrew Tridgell
fde5a66531 avoid a deadlock the fetch_lock code. The deadlock could happen when
a client held the chainlock, and the daemon received a dmaster reply
at the same time. The daemon would not be able to process the dmaster
reply, due to the lock, but the fetch lock cannot make progres until
the dmaster reply is processed.

The solution is to not hold the lock in the client while talking to
the daemon. The client has to retry the lock after the record has
migrated. This means that forward progress is not guaranteed. We'll
have to see if that matters in practice.

(This used to be ctdb commit 737e5a1253cb048222c595a474aff71c99fc554f)
2007-04-19 10:03:20 +10:00
Andrew Tridgell
36816ee12a merged the db_dir changes from volker. Changed them slightly,
to make the --dbdir option available to all ctdb tools, not just
the daemon

(This used to be ctdb commit add63b0ae11d8727163bb6f0c94a617d9b88ef28)
2007-04-19 09:14:25 +10:00
Volker Lendecke
9135024fc7 Add --dbdir to ctdbd. Necessary for shared operation between ctdbd and smbd.
(This used to be ctdb commit bce40105e2ccbca5e364793bbf1a6357e6dd69b2)
2007-04-18 16:36:22 +02:00
Andrew Tridgell
ef505399e6 merged cleanup from ronnie
(This used to be ctdb commit 26037a7b3557faa1c10944f654b1465877c6b840)
2007-04-18 18:43:34 +10:00
Andrew Tridgell
908f5085b0 validate dmaster on a client fetch request
(This used to be ctdb commit b49069aac0c14e5a02be843247930c197d620a81)
2007-04-18 18:39:02 +10:00
Ronnie sahlberg
8dc428d63d we dont need the structure ctdb_reply_shutdown since we dont implement that pdu any more
(This used to be ctdb commit 5bac32b3daf3c61214269cd09cfc1b6c3f8c3d6e)
2007-04-18 17:04:26 +10:00
Andrew Tridgell
ddf430b2f2 simpler shutdown process. The reply is not actually needed, and
occasionally leads to problems if an immediate send on the socket
causes a context switch and the client exiting before the daemon. We
now exit the client when the daemon goes away.

(This used to be ctdb commit b7bed0088e700f25105ceea63640b38804f51e4d)
2007-04-18 15:35:41 +10:00
Ronnie sahlberg
e390c925c1 initial shutdown function where a client can request an orderly shutdown of a ctdb cluster
(This used to be ctdb commit 00d2748bd4e7209ff7e253f6652fdd9bf16cf147)
2007-04-18 12:39:03 +10:00
Andrew Tridgell
7a02b09b01 started adding a cleaner daemon finish method
(This used to be ctdb commit 5ef0cd83d7f24616dad85cece485b770376ecd45)
2007-04-18 11:55:54 +10:00
Andrew Tridgell
8f059f4d91 - merge volkers debug changes
- fixed memory leaks in the 3 packet receive routines. The problem was
  that the ctdb_call logic would occasionally complete and free a
  incoming packet, which would then be freed again in the packet
  receive routine. The solution is to make the packet a child of a
  temporary context in the receive routine then free that temporary
  context. That allows other routines to keep or free the packet if
  they want to, while allowing us to safely free it (via a free of the
  temporary context) in the receive function

(This used to be ctdb commit 304aaaa7235febbe97ff9ecb43875b7265ac48cd)
2007-04-18 11:20:24 +10:00
Andrew Tridgell
296b0c2a20 - send the record header from the client to the daemon when doing a
fetch, to avoid the daemon re-reading it

- suffix the database name with the node name so that testing on
  loopback doesn't result in a name collision in the database open

(This used to be ctdb commit ad30a4db75450643ff146c40faa306a021de3dd2)
2007-04-17 16:20:32 +10:00
Andrew Tridgell
6f9b29da22 - removed the non-daemon mode from ctdb, in order to simplify the
code. It may be added back later once everything is working nicely,
  or simulated using a in-process pipe instead of a unix domain socket

- rewrote the ctdb_fetch_lock() code to follow the new design

(This used to be ctdb commit 5024dd1f305fe1ecc262db2240c56f773b4f28f0)
2007-04-17 14:52:51 +10:00
Ronnie sahlberg
11b5345afc finalize fetch lock changes to get rid of the record handle
(This used to be ctdb commit 36c1e98a5533214d5507699dc5d8bdec35cb28c2)
2007-04-17 12:36:31 +10:00
Ronnie sahlberg
e5fff3d611 do not use a ctdb_record_handle for client fetch_lock/store_unlock any more
change ctdb_client_fetch_lock to return a status code instead of a record handle and make it unconditionally fill in data.

change ctdb_client_store_unlock to take ctdb_db and key as arguments instead of a record handle

update the ctdb_fetch.c test to use the clientside helpers for fetching and storing data

(This used to be ctdb commit 22d5d40375e0135916c97945646f94119612615d)
2007-04-17 12:22:17 +10:00