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

1172 Commits

Author SHA1 Message Date
Martin Schwenke
d038b9e8ba recoverd: Fix bogus info in message about changed flags
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9119a568c2b4601318f7751f537dca2f92a7230b)
2012-08-08 16:11:11 +10:00
Martin Schwenke
65725d30d4 ctdbd: Remove the worked "Forced" from message about running eventscripts
The eventscripts are run after a takeover run and in this case they're
not forced.  The messages seems to imply that somone has run "ctdb
eventscript" when that is not necessarily the case.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3880589db4d563e438126cf5080261fa06b9e242)
2012-07-26 22:10:54 +10:00
Martin Schwenke
75a0041567 ctdbd: Fix ctdb_control_release_ip() on local daemons
When running on local daemons no IPs are actually assigned to
interfaces.  Commit 9a806dec8687e2ec08a308853b61af6aed5e5d1e broke
ctdb_control_release_ip() for local daemons because it asks the system
which interface the given IP is on, instead of the old behaviour of
trusting CTDB's internal records.

For local deamons (i.e. !ctdb->do_checkpublicip) revert to the old
behaviour of looking up the interface internally.  This is good
enough, given that the tests don't tend to misconfigure the addresses.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 38e8651b955afdbaf0ae87c24c55c052f8209290)
2012-07-26 22:10:54 +10:00
Amitay Isaacs
23a460602f Remove tevent_loop_allow_nesting()
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 538c68d0e83e14f0000981ee06408b8f0035be37)
2012-07-16 12:12:05 +10:00
Amitay Isaacs
c4236ec8fb ctdbd: Return explicit boolean values for function returning bool
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 3de2830ae68241ee95bcc14dc1bb896ff18d86ce)
2012-07-16 12:12:05 +10:00
Amitay Isaacs
e379fc3ea5 Fix compiler warnings.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit d29e1880c8ce7219e065d31b47b0e8ad9e83146d)
2012-07-13 14:50:56 +10:00
Gregor Beck
3fd0b8a5a5 ctdbd: refuse attaching with "persistent" to a non-persistent db and v.v.
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 1ebbaa620b3cfb9ff373828e4aaa84246cf3ec25)
2012-07-03 11:30:04 +02:00
Ronnie Sahlberg
694c1b269e When we find an ip we shouldnt host, just release it
Dont call a full blown clusterwide ipreallocation,  just release it locally

(This used to be ctdb commit 9a806dec8687e2ec08a308853b61af6aed5e5d1e)
2012-06-20 15:12:05 +10:00
Ronnie Sahlberg
c7e648c2d1 When we release an ip, get the interface name from the kernel
instead of using the interface where ctdb thinks the ip is hosted at.
The difference is that this now allows us to handle cases where we want to release an ip   but ctdbd does not know which interface the ip is assigned on.
(user has used 'ip addr add...'  and manually assigned an ip to the wrong interface)

(This used to be ctdb commit c6bf22ba5c01001b7febed73dd16a03bd3fd2bed)
2012-06-20 15:11:56 +10:00
Ronnie Sahlberg
59565c05cf STATISTICS: Add tracking of the 10 hottest keys per database measured in hopcount
and add mechanisms to dump it using the ctdb dbstatistics command

(This used to be ctdb commit 8307c70ed98996b430c470e9641a09fdeeb81bd8)
2012-06-13 16:19:18 +10:00
Martin Schwenke
55be3c1239 Reimplement logging of long running events
Reimplement 5aba53e6adcfcd7edbdac9e30aa5fcba176aca00 using tevent
trace points.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 98e1b46adba11b9549b5c5976e1f561fe732fa6e)
2012-06-12 16:10:01 +10:00
Ronnie Sahlberg
2ca402062c Run the shutdown eventscript before we tear down the transport
This allows eventscripts to still be able to call and use ctdb during the shutdown phase.

(This used to be ctdb commit 1a6a011c772f7d302d114d7c8a151fa7820ec85f)
2012-05-30 11:51:38 +10:00
Amitay Isaacs
7631830152 server: Replace BOOL datatype with bool, True/False with true/false
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 6e5cbe8fff71985e5a2fc16b7e9f2b868011ff5d)
2012-05-28 11:22:25 +10:00
Ronnie Sahlberg
bbd33d6394 RECOVERY: Increase the time we allow before timing out recovery related tasks.
If the system is temporarily taking unusually long to perform these tasks it is better to wait a lot longer and allow the tasks to complete than timing out repeatedly and then becomming banned.

(This used to be ctdb commit 03fa2a517247eb2adfba67248e2466f17ea14418)
2012-05-25 12:34:14 +10:00
Ronnie Sahlberg
e7d21834ae RECOVER: When we pull databases during recovery, we used to reallocate the databuffer for each entry added. This would normally not be an issue, but for cases where memory is fragmented, this could start to cost significant cpu if we need to reallocate and move to a different region.
Change this to instead preallocate , by default, 10MByte chunks to the data buffer.
This significantly reduces the number of potential reallocate and move  operations that may be required.

Create a tunable to override/change how much preallocation should be used.

(This used to be ctdb commit 1f262deaad0818f159f9c68330f7fec121679023)
2012-05-25 12:34:06 +10:00
Ronnie Sahlberg
26322d257d DEBUG: Add checks for and print debug messages when 1) a database contains very many records, 2) when a database is very big, 3) when a single record is very big.
Add tunables to control when to log these instances and allow it to be completely turned off by setting the threshold to 0

(This used to be ctdb commit 9ed58fef4991725f75509433496f4d5ffae0ae87)
2012-05-21 13:26:13 +10:00
Ronnie Sahlberg
dce5969d12 Debug: When scripts hang, we may need to collect additional data in order to debug why the script hung.
Break this debug and datacollection out into an external script to make it easier to modify what data we need to collect.
For now we only collect a pstree so we can see what part of the script we hung in.

S1037271

(This used to be ctdb commit 6e68797af67bee36f2bad045f94806e7e98f27e9)
2012-05-17 10:29:03 +10:00
Ronnie Sahlberg
a57eba2bb4 Track all child process so we never send a signal to an unrelated process (our child died and kernel wrapped the pid-space and reused the pid for a different process
Wrap all creation of child processes inside ctdb_fork() which is used to track all processes we have spawned.
Capture SIGCHLD to track also which child processes have terminated.

Wrap kill() inside ctdb_kill() and make sure that we never send a !0 signal to a child process pid that has already terminated (and might have been replaced with a

(This used to be ctdb commit f73a4b1495830bcdd094a93732a89dd53b3c2f78)
2012-05-03 14:03:26 +10:00
Ronnie Sahlberg
a367fa6138 RELOADIPS: simplify the reloadips code a bit
and also update the "read public address file" to not check if the address exists already locally when we read if from the child process, to stop it
from spamming the logs with "We already host ..."
messages

(This used to be ctdb commit 334ea830f1bf33419f4a1e78f23afd41a852d0f4)
2012-05-01 15:34:26 +10:00
Amitay Isaacs
733bc2c03c Revert "server: locking: Provide a common API for non-blocking locking of TDBs"
This reverts commit 6a92fc2b8da2bba98dca29b781ab459ba4e879a5.

Reverting incomplete changes to ctdb_lock.c

(This used to be ctdb commit 2a3d22431948f849c93762a6ab49344acb687feb)
2012-05-01 12:09:48 +10:00
Amitay Isaacs
c3c5dec52c server: locking: Provide a common API for non-blocking locking of TDBs
(This used to be ctdb commit 6a92fc2b8da2bba98dca29b781ab459ba4e879a5)
2012-05-01 12:09:38 +10:00
Ronnie Sahlberg
7a1aa560e7 Add new control to reload the public ip address file on a node
Also add a method to use the recovery master/daemon to reload the public ips on all nodes in the cluster.
Reloading the public ips on all node sin the cluster is only suported if all nodes in the cluster are available and healthy.

(This used to be ctdb commit 05603e914f8c12618d7e06943c0f7df207f645b0)
2012-05-01 10:48:08 +10:00
Ronnie Sahlberg
db411aaada Merge remote branch 'amitay/tevent-sync'
(This used to be ctdb commit 17ff3f240b0d72c72ed28d70fb9aeb3b20c80670)
2012-04-26 08:09:23 +10:00
Amitay Isaacs
4392591555 Remove explicit include of lib/tevent/tevent.h.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)
2012-04-13 17:28:14 +10:00
Amitay Isaacs
b3d098ced7 ctdbd: Fix spurious warnings when running with --nopublicipcheck
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 67b909a0718d6cfce82ffce0830da3a6ff1f6c4b)
2012-04-13 15:38:11 +10:00
Amitay Isaacs
202791cf72 recoverd: Fix spurious warnings when running with --nopublicipcheck
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 7f8096f56d8274151705ac822b582d972078f8fe)
2012-04-13 15:38:11 +10:00
Amitay Isaacs
425b8768ee ctdbd: Fix the error message string
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 15f63ebab9686734f41a6adf38d4a7faa919ac66)
2012-04-13 14:51:13 +10:00
Amitay Isaacs
e2d83970e9 recovery: Add prototypes for tdb internal functions
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 98ac99c4a79fe2ee024890bb27c3ca68dc02d434)
2012-03-30 12:33:28 +11:00
Amitay Isaacs
858d8dc571 build: Remove re-definition of same variable
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 36e690faab3d76919780c8550fe6d49fb6bbfba5)
2012-03-30 12:33:27 +11:00
Martin Schwenke
fbe64dec01 Undo damage done by d8d37493478a26c5f1809a5f3df89ffd6e149281
The implementation of DisableIPFailover got intermingled with
--nopublicipcheck.  This just looks wrong - Ronnie must have been
having a bad day.  :-)

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5083b266dd68b292c4275505f3d1b878dbf12f11)
2012-03-22 15:34:52 +11:00
Ronnie Sahlberg
2456f77ca6 NoIPTakeover: change the tunable name for the "dont allow failing addresses over onto the node" to NoIPTakeover
(This used to be ctdb commit 35592e618cfd827b6978af6332f80504f232c46a)
2012-03-22 11:05:15 +11:00
Ronnie Sahlberg
9f31f76805 NoIPFailback: Exclude nodes which have NoIPFailback as failback targets during reallocation
(This used to be ctdb commit c262c29773d1608e7ce04bdfb7f4469df0a9637b)
2012-03-22 09:24:32 +11:00
Ronnie Sahlberg
befa9df152 Make NoIPFailback a node local setting. Nodes that have NoIPFailback set to !0 can not takeover new ip addresses during failover.
Remove the old global setting for this unused tunable and add it as a new node flag. This node flag is only valid/defined within the takeover subsystem in the recovery daemon. Add async functions to collec the NoIPFailback settings for each node.

This will later e used to disqualify certain nodes from being takeover targets when we perform reallocation.

(This used to be ctdb commit 668f3e88a9e5f598706952b7140547640c85a5ed)
2012-03-22 09:09:57 +11:00
Ronnie Sahlberg
fa3a06246a STICKY: add prototype code to make records stick to a node to "calm" down if they are found to be very hot and accessed by a lot of clients.
This can improve performance and stop clients from having to chase a rapidly migrating/bouncing record

(This used to be ctdb commit d0d98f7e45e5084b81335b004d50bddc80cdc219)
2012-03-20 17:12:19 +11:00
Ronnie Sahlberg
e7e51ddb64 LACOUNT: Add back lacount mechanism to defer migrating a fetched/read copy until after default of 20 consecutive requests from the same node
This can improve performance slightly on certain workloads where smbds frequently read from the same record

(This used to be ctdb commit 035c0d981bde8c0eee8b3f24ba8e2dc817e5b504)
2012-03-20 12:26:22 +11:00
Ronnie Sahlberg
6a493a0b08 STATISTICS: add per-db hop count statistics
(This used to be ctdb commit 1c976d83b1d7dac6f0ef81306774998e4c8b56a1)
2012-03-20 12:11:55 +11:00
Ronnie Sahlberg
c051f67d67 FETCH COLLAPSE : Change the fetch-lock collapse to collapse ALL fetches, including fetch-locks into a single command in flight per record. Also add a tunable to enable/disable this optimization for hot records
(This used to be ctdb commit eafd7bbaaa5931546a96c8beae3cf9a39a49c925)
2012-03-20 11:39:00 +11:00
Ronnie Sahlberg
038c946e80 add max hop count buckets to see how bad hopcounts are
(This used to be ctdb commit 7d3931298e6477d92f43652c3006b0c426cb1307)
2012-03-20 11:20:53 +11:00
Ronnie Sahlberg
b9e581e720 ReadOnly: Only restrict the readonly sanity/paranoia check that only allows
UPDATE_RECORD to create a record to only apply to normal databases, not
persistent databases or else the net registry command breaks
and other persistent database creation/updates .

(This used to be ctdb commit 68390cb1e8c7f30be034b8ca6c9215b40147305b)
2012-03-12 13:13:51 +11:00
Ronnie Sahlberg
62daab3688 READONLY: when updating a remote node to revoke a delegation, make sure we dont create the record if it doesnt already exist
(This used to be ctdb commit fb00e1290fcea3386132a46c883994019a43799a)
2012-03-02 12:57:23 +11:00
Ronnie Sahlberg
6f83805183 READONLY: skip vacuuming or deleting records with readonly delegations.
they are hot. wait until they have been revoked before we recall them.

(This used to be ctdb commit 7417d994c2a159f71d27d4bcd2f53684862eece3)
2012-02-29 16:09:24 +11:00
Ronnie Sahlberg
e086333743 Vacuuming: change default timeout to 120 seconds
(This used to be ctdb commit 5ae94c6b9b3000a6c79fccaaea1e007ebd5be1a9)
2012-02-29 12:29:22 +11:00
Ronnie Sahlberg
f3600276fc Add a tunable variable to control how long we defer after a ctdb addip until we force a rebalance and try to failback addresses onto this node
Have it default to 300 seconds.

(This used to be ctdb commit 49791db7dc74cffd7e88bd73091590cdc1909328)
2012-02-28 06:58:59 +11:00
Ronnie Sahlberg
ef2bd0b016 When adding ips to nodes, set up a deferred rebalance for the whole node to trigger after 60 seconds in case the normal ipreallocated is not sufficient to trigger rebalance.
(This used to be ctdb commit 4340263b219d75c39f8de22abe3f6f1c1ee63ea2)
2012-02-28 06:56:04 +11:00
Ronnie Sahlberg
91c9371f2d Make KILLTCP structure a child of VNN so that it is freed at the same time
the referenced VNN structure is.

Also, remove the circular reference between the two objects KIPPCTP and VNN

(This used to be ctdb commit 02b62482164a3c69715949074feb7f191a29d534)
2012-02-27 07:21:26 +11:00
Ronnie Sahlberg
93ec9c589c Eventscripts: remove the horrible horrible circular reference between state and callback since these two structures do not even share the same parent talloc context.
Instead, tie them together via referencing a permanent linked list hung off the ctdb structure.

(This used to be ctdb commit a95c02da6c67dc4bd8716b75318a4188301df6f9)
2012-02-23 06:49:47 +11:00
Michael Adam
e62384b1e9 server:update_record: remove some blood stains (trailing spaces...)
(This used to be ctdb commit 0df433496f9c53a2c3759a62ebe355c35caff920)
2012-02-21 17:56:45 +01:00
Michael Adam
28554afc67 server:update_record: make ctdb_childwrite static
(This used to be ctdb commit 400364a1d54404787cff48fb2c30c1b172a8b204)
2012-02-21 17:55:07 +01:00
Michael Adam
55abb07f51 server: move the code for the update_record control to its own file
It is very misleading in ctdb_persistent.c, since it is used for non-persistent
dbs...

(This used to be ctdb commit a956fa3a27106d0154a3fb46987d61c0a6b7c768)
2012-02-21 17:54:17 +01:00
Ronnie Sahlberg
c47da8b028 Log the "Received SHUTDOWN ..." first in the shutown process instead of last.
Sometimes ctdb is termnated ifrom the initscript if the shutdown takes too long an no message is logged.

(This used to be ctdb commit d3542d43141c1548bab356fbdef34dfedb4f167f)
2012-02-21 19:00:33 +11:00
Ronnie Sahlberg
574b47e23f Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 9b85aa1aa14091dc1de470a587f7c054b9e40078)
2012-02-21 07:12:50 +11:00
Ronnie Sahlberg
42e477b14e READONLY: only send a control to schedule fast-vacuuming from child context iff we have a connection open to the main daemon
there are some child processes where we do not create a connection to the main daemon (switch_from_server_to_client()) because it is expensive to set up and we normally might not need to talk to the daemon at all via a domainsocket.
but we might want to still call to ctdb_ltdb_store() from such chil processes.

(This used to be ctdb commit 9e372a08c40087e6b5335aa298e94d88273566a5)
2012-02-21 07:03:44 +11:00
Ronnie Sahlberg
cdc232f2dd READONLY: dont schedule for fast vacuum deletion if any of the readonly record flags are set
(This used to be ctdb commit b3307d78fd15f446b423f8cdd1e403f89fbe8ac8)
2012-02-21 06:54:09 +11:00
Ronnie Sahlberg
af424b151c Revert "ReadOnly: We can not use ctdb_ltdb_store from a client/child context since"
This reverts commit 11dee7f3f881494cf5089d6c69fd40e74f07e670.

Try to solve this a different way so that ctdb_ltb_store() becomes safe to use also from child context

(This used to be ctdb commit 5990fe65a9cc37933ceff15d4cb2ab3b3a0addb6)
2012-02-21 06:49:18 +11:00
Ronnie Sahlberg
baa3d7ea39 Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 0fd3bf919b1b8e5aaa98444c306c6770a6a3209f)
2012-02-20 21:30:13 +11:00
Ronnie Sahlberg
9323afa386 ReadOnly: We can not use ctdb_ltdb_store from a client/child context since
it sometimes (for empty records) needs to be able to initiate traffic unde rhte daemon context.

This should furhter updated later to allow the use also from non-daemon context.

(This used to be ctdb commit 11dee7f3f881494cf5089d6c69fd40e74f07e670)
2012-02-20 21:22:56 +11:00
Ronnie Sahlberg
61762a96e3 ReadOnly: Make sure we dont try to fast-vacuum records that are set for readonly delegation
(This used to be ctdb commit 303134cf10a08ce61954d5de9025d9bbcb5f75ef)
2012-02-20 21:13:46 +11:00
Volker Lendecke
5e3b13a32a FreeBSD does not define s6_addr32, only s6_addr
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit d657af4fb68ce3f7c462856f2934f6bf169e120b)
2012-02-13 16:20:12 +01:00
Volker Lendecke
cb44ebbc95 Make CTDB_CURRENT_NODE work with CTDB_REQ_MESSAGE
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit be8a153346ca7d40f09a6d03aad655aaa5c4a903)
2012-02-13 15:50:56 +01:00
Ronnie Sahlberg
73f8be16c6 ReadOnly: add per-database statistics to view how much delegations/revokes we have
(This used to be ctdb commit 751ed46197661eb841042ab6a02855a51dd0b17c)
2012-02-08 15:29:27 +11:00
Ronnie Sahlberg
1eafa68f0f STATISTICS: add total counts for number of delegations and number of revokes
Everytime we give a delegation to another node we count this as one delegation.
If the same record is delegated to several nodes we count one for each node.

Everytime a record has all its delegations revoked we count this as one revoke.

(This used to be ctdb commit b098bcf8007be63889aaed640a951b0eeaa9d191)
2012-02-08 13:42:30 +11:00
Ronnie Sahlberg
65e1e1d3ef Niceify the readonlyrecord API. Dont force clients to be exposed to the featch_with_header function
We dont strictly need to force clients to use CTDB_FETCH_WITH_HEADER instead of CTDB_FETCH when they ask for readonly records.
Have ctdbd internally remap this internally to FETCH_WITH_HEADER and map the reply back to CTDB_FETCH_FUNC or CTDB_FETCH_WITH_HEADER_FUNC based on what the client initially asked for.

This removes the need for the client to know about the CTDB_FETCH_WITH_HEADER_FUNC function and simplifies the client code.
Clients that do not care what the header after the request is can just continue using the old CTDB_FETCH_FUNC call and ctdbd will do all the difficult stuff.

(This used to be ctdb commit 444a7bac4e9a854b06c1ad4cb36c2b58a72001fa)
2012-01-31 17:20:35 +11:00
Michael Adam
0832daf1e9 server: fix a comment typo
(This used to be ctdb commit 85879edd09ffa26f87c566954cbd2c14f1e331ed)
2012-01-10 10:33:28 +01:00
Michael Adam
bf99bb65e0 vacuum: improve logging in remove_record_from_delete_queue()
(This used to be ctdb commit 809d1f3b8a9232fce0376cb47e4f633b49237529)
2011-12-23 17:39:13 +01:00
Michael Adam
ca7d2bf63a vacuum: improve logging in delete_record_traverse()
(This used to be ctdb commit 40ca781b3305d9f0bfee5b109d4eefde461a3f13)
2011-12-23 17:39:13 +01:00
Michael Adam
8348c431f2 vacuum: improve logging in insert_record_into_delete_queue()
(This used to be ctdb commit db59ac2ee6a9f5f7f088ebbc5e2800d9e57aae17)
2011-12-23 17:39:13 +01:00
Michael Adam
0a6805eed0 vacuum: improve debugging in delete_queue_traverse()
(This used to be ctdb commit 2c44c6dc583872c603a399afb01936abcbb05158)
2011-12-23 17:39:13 +01:00
Michael Adam
26cac0627e vacuum: add debug message to insert_record_into_delete_queue() for failed insert
(This used to be ctdb commit ae78e8d991636a3a79dd9fbcefc15032afb08f55)
2011-12-23 17:39:12 +01:00
Michael Adam
190b1b240c vacuum: improve debugging in insert_record_into_delete_queue()
(This used to be ctdb commit 6e6aaba28ac560d51d7450ebcf99babf868d0aea)
2011-12-23 17:39:12 +01:00
Michael Adam
cb259e6bd1 vacuum: initialize (to zero) the vacuum fetch list in ctdb_vacuum_init_vacuum_data()
(This used to be ctdb commit 772e08c29ef70a4cc73f7887939e5071a90a98cb)
2011-12-23 17:39:12 +01:00
Michael Adam
d29b2bd8bd vacuum: add statistics output for processing of the delete list
(This used to be ctdb commit bec2ff46402b6d90521c75e8d46b9f6f2f47239a)
2011-12-23 17:39:11 +01:00
Michael Adam
8b89e542e1 tunables: don't list obsolete tunables in the list_tunables control
(This used to be ctdb commit d8ab86f0eb11437e50d18183858dd3177a8f61e6)
2011-12-23 17:39:10 +01:00
Michael Adam
25ac808b07 tunables: add a bool obsolete flag to the tunable_map list
(This used to be ctdb commit 1a7d9b25fdcf7b59598618d406c2a681c90d9163)
2011-12-23 17:39:09 +01:00
Michael Adam
bdf395c2e2 vacuum: add a comment explaining a race in the vacuum code.
(This used to be ctdb commit 07f1ba54b1617fadd6fe83826dd8e76f37cea071)
2011-12-23 17:39:09 +01:00
Michael Adam
c10fc30a38 vacuum: factor out initialization of the vacuum data from ctdb_vacuum_db()
for readability

(This used to be ctdb commit 1963e33859e9dc51e9e88664c6d95e62c7c8b8be)
2011-12-23 17:39:09 +01:00
Michael Adam
4b565b1577 vacuum: streamline ctdb_process_delete_list()
Reducing indentiation and improving use of talloc.

(This used to be ctdb commit 11f52ba18370f1dda983f2263f9af82045b4fdea)
2011-12-23 17:39:08 +01:00
Michael Adam
50a9444626 vacuum: factor processing of the delete list out of ctdb_vacuum_db()
(This used to be ctdb commit cf68b762432a18e4a3cda137591b3f005c196906)
2011-12-23 17:39:08 +01:00
Michael Adam
4e5bdd45a0 vacuum: factor processing of vacuum fetch lists out of ctdb_vacuum_db()
(This used to be ctdb commit 905fc9cd7126ab84c23d4a803c59e32b9c54e6f0)
2011-12-23 17:39:08 +01:00
Michael Adam
1a462df86c vacuum: factor out full vacuum run out of ctdb_vacuum_db() as ctdb_vacuum_db_full()
(This used to be ctdb commit e31594e0c13899e88013ce7eb7e3dc434c2f0723)
2011-12-23 17:39:07 +01:00
Michael Adam
dbede3de7e vacuum: factor out the fast vacuuming run into ctdb_vacuum_db_fast()
for readability

(This used to be ctdb commit 6596f2c4a6b4783b6498502fbbf50f87d4f59085)
2011-12-23 17:39:07 +01:00
Michael Adam
61b336f230 vacuum: rename delete_tree to delete_list
It is not important for the user that this is implemented as a tree.

(This used to be ctdb commit f686bc440560074c1ce866f2037ae3671f182185)
2011-12-23 17:39:07 +01:00
Michael Adam
f96f183ad1 vacuum: appropriately rename vdata.list to vdata.vacuum_fetch_list
(This used to be ctdb commit 09c55b76c96c4ab3fe812763007b81cf0a2ac86c)
2011-12-23 17:39:06 +01:00
Michael Adam
d96df1c374 vacuum: introduce a helper variable for the vacuum fetch list in ctdb_vacuum_db()
(This used to be ctdb commit 019106e035520e6b3e5702b6e76d910626c3df13)
2011-12-23 17:39:06 +01:00
Michael Adam
c9b5396783 vacuum: introduce a helper variable in add_record_to_vacuum_fetch_list() to reduce verbosity
(This used to be ctdb commit 48fe56ea27e3649ae7a67257fdce54f973e7c3c5)
2011-12-23 17:39:06 +01:00
Michael Adam
c7b885c1c9 vacuum: locally delete the records in the delete_tree that have be deleted remotely
This way, especially records added in the fast vacuuming runs
are deleted direclty instead of being handed back to the
repack run which will probably not hit because of the vacuum limit.

(This used to be ctdb commit ea3e640a28178ddcb85285f4efec62ccba2483d9)
2011-12-23 17:39:05 +01:00
Michael Adam
aa04a64679 vacuum: improve vacuuming statistics for handling the delete_tree.
Track the number of records failed to delete remotely with the
TRY_DELETE_RECORDS control.
And add a number of records left to delete locally.

(This used to be ctdb commit 536aad024d52f2c32dd397fc86294c963b91341b)
2011-12-23 17:39:04 +01:00
Michael Adam
1c0bc40961 vacuum: fix and improve a comment
(This used to be ctdb commit 0ed349c24c7399b3b440c1f5d573db77ddb988b3)
2011-12-23 17:39:04 +01:00
Michael Adam
b09bd3e841 vacuum: appropriately rename delete_traverse() to delete_marshall_traverse()
(This used to be ctdb commit 7c5b27bc8dce9e30f2aff05297113da981f7b9a3)
2011-12-23 17:39:04 +01:00
Michael Adam
745eb05e02 vacuum: initialize the delete_count in the vacuum data
(This used to be ctdb commit 970b8fc60857ad2f18f45312d355c571fb2f0246)
2011-12-23 17:39:03 +01:00
Michael Adam
e30d1828f1 vacuum: fix the VacuumInterval tunable's type to uint32_t in get_vacuum_interval()
(This used to be ctdb commit a5a29bf92b23e9b5a1523b06461eced422b22ffe)
2011-12-23 17:39:03 +01:00
Michael Adam
e04fad0ee4 vacuum: add new tunable VacuumInterval and mark Vacuum{Default,Min,Max}Interval obsolete
And use VacuumInterval instead of VacuumDefaultInterval in the code.

(This used to be ctdb commit 78530f40338f511a7cd1d33ada450905742bfa8f)
2011-12-23 17:39:02 +01:00
Michael Adam
1ca3abc5ba vacuum: remove struct vacuum_tuning_data (unused)
(This used to be ctdb commit 1f62afbe1ae0b3e7dbad4081d1b51e3ab6ee5c39)
2011-12-23 17:39:02 +01:00
Michael Adam
9cae401943 vacuum: use get_vacuum_interval() in ctdb_vacuum_event()
(instead of using the tunable directly)

(This used to be ctdb commit e40fa9efd1c77aa35c917aba6e6e4d21d9c5cdea)
2011-12-23 17:39:02 +01:00
Michael Adam
19bbee2acd vacuum: change get_vacuum_interval() to simply return the VacuumDefaultInterval tunable
(This used to be ctdb commit 621c3ce957cb946ca05a2d527c037746ae2f01d3)
2011-12-23 17:39:01 +01:00
Michael Adam
87351d8801 vacuum: remove update_tuning_db()
(This used to be ctdb commit d93750ea3f5cb854e5893e53795fd08656e7c12c)
2011-12-23 17:39:01 +01:00
Michael Adam
6f0b22234f ctdb_ltdb_store_server: when storing a record that is not to be scheduled for deletion, remove it from the delete queue
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

(This used to be ctdb commit 489148e465e2b8aed87ea836e3518f43490671ca)
2011-12-23 17:39:01 +01:00
Michael Adam
a481ca711f vacuum: add ctdb_local_remove_from_delete_queue()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

(This used to be ctdb commit a5065b42a98c709173503e02d217f97792878625)
2011-12-23 17:39:00 +01:00
Ronnie Sahlberg
f253f69063 typo
(This used to be ctdb commit 8fc71ad4da746e28406c06a95928052b29803062)
2011-12-14 12:52:35 +11:00
Mathieu Parent
bb3d6698e9 Move platform-specific code to common/system_*
This removes #ifdef AIX and ease the addition of new platforms.

(This used to be ctdb commit 2fd1067a075fe0e4b2a36d4ea18af139d03f17bf)
2011-12-06 11:57:11 +11:00
Mathieu Parent
4ce585cd0e Remove zero-length gnu_printf format string in ctdb_daemon.c (gcc warning)
server/ctdbd.c: In function ‘main’:
server/ctdb_daemon.c:943:7: warning: zero-length gnu_printf format string [-Wformat-zero-length]

(This used to be ctdb commit e6d1dd3ec4a078e5f32bc52a4a9e4b7d9a2e2d16)
2011-12-06 11:56:18 +11:00
Michael Adam
ad0de5494e traverse: fix traversing with empty records by adding a new (internal) control CTDB_CONTROL_TRAVERSE_START_EXT
By this, the original CTDB_CONTROL_TRAVERSE_START control that is
used by e.g. samba's smbstatus, is not changed, so that samba
continues working without code change.

The  CTDB_CONTROL_TRAVERSE_START currently just adds the "withemptyrecords"
flag to the state and processon on as CTDB_CONTROL_TRAVERSE_START_EXT.

(This used to be ctdb commit 8281bb210858ed04992eacea7f6d02261e0fc1b1)
2011-12-03 02:15:30 +01:00
Volker Lendecke
5a1da0ac55 Add CTDB_CONTROL_CHECK_SRVID
(This used to be ctdb commit ad64ef2c40a2a12b37dbf39142e95c6781c2fc3b)
2011-11-30 09:02:26 +11:00
Ronnie Sahlberg
0420449a6c Recover Persistent database DB by DB and not record by record
Add a new tunable that changes the mode how persistent databases are recovered.
RecoveryPDBBySeqNum

When set to 1, persistent databases will be recovered in whole from the node which
has the highest "__db_sequence_number__" record.
This record is managed by samba for those databases where we do persistent writes and have
inter-record relations.
For these databases we do not want the usual "blend records from all nodes based
on individual record RSN" but instead a mode where we pick one instance of the persistent database.

If no node was found with a "__db_sequence_number__" record at all, we fail back to the original "recover records independently based on record RSN".
Some persistent databases do not contain record interrelations and as such does not
contain this special record at all.

(This used to be ctdb commit 502150c764298a9fa8c4d8aa445bf7d85d4ee9dc)
2011-11-30 08:48:23 +11:00
Ronnie Sahlberg
3e2c40c590 DB Seqnum: must provide a ctdb_ltdb_header when calling ctdb_ltdb_fetch()
(This used to be ctdb commit 1fea9ef55a6a9d201ad1b49583451ac3e6b1c66d)
2011-11-30 08:48:04 +11:00
Michael Adam
1a31c84348 traverse: add a flag to enable transferring empty records in cluster wide traverse
This will be useful for also printing information about empty/deleted
records in "ctdb catdb", e.g. for debugging vacuuming issues.

(This used to be ctdb commit ddc5da3a0df7701934404192a0a0aa659a806acb)
2011-11-29 10:30:24 +01:00
Stefan Metzmacher
3aa5c979f3 recoverd: try to become the recovery master if we have the capability, but the current master doesn't
metze
(cherry picked from commit 6ba8af28f8a8f79db65120a97d7157dcc5c7e083)

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit ccd67cf7f26713e695000d89d9ce8cfa78bfe00f)
2011-11-29 10:28:52 +01:00
Ronnie Sahlberg
b18a22b820 This breaks the build since the recovery loop is different in master
compared to old 1.0 branches
This must have been mistakenly applied to master when you intended to push
for a different branch i guess.

Revert "recoverd: try to become the recovery master if we have the capability, but the current master doesn't"

This reverts commit a97d417aba85e901540147a4dff4794249442939.

(This used to be ctdb commit c19cb751077b78cf4b6e28a1e3746d4ffedbfd68)
2011-11-29 14:38:02 +11:00
Stefan Metzmacher
b02b55bd12 recoverd: try to become the recovery master if we have the capability, but the current master doesn't
metze

(This used to be ctdb commit a97d417aba85e901540147a4dff4794249442939)
2011-11-26 23:47:00 +01:00
Stefan Metzmacher
7a962685d3 recoverd: let async_getcap_callback() also update ctdb->capabilities
metze

(This used to be ctdb commit ef5b47d1183ee99c39ae63045a994d35255ac829)
2011-11-26 23:30:33 +01:00
Michael Adam
edc6067339 vacuum: update (C) from vacuum rewrite
(This used to be ctdb commit a95b524e57b861416f65baef7a0235bf7e394cef)
2011-11-26 01:10:09 +01:00
Michael Adam
0c1e98c9b0 vacuum: write a big and up-to-date explaining comment for ctdb_vacuum_db()
(This used to be ctdb commit 6b9d308985ef2363c62fde6340ad37d56f6d7702)
2011-11-26 00:34:57 +01:00
Michael Adam
a4988be457 vacuum: fix a comment typo in vacuum_traverse()
(This used to be ctdb commit 88ad1e75c686cd47aec18b0a8eb93c3b125f0e97)
2011-11-26 00:34:57 +01:00
Michael Adam
f14b730adb vacuum: fix horrible indentation/whitespacing for ctdb_vacuum_event()
(This used to be ctdb commit 0f070a65a322bd6d3240ca96a9e5c3633ef647bf)
2011-11-26 00:34:57 +01:00
Michael Adam
ac2bf0ebf4 vacuum: fix a comment typo in vacuum_traverse()
(This used to be ctdb commit 39a5c0d8cca4ce5e8bc7055739a6377fb2dc36e0)
2011-11-26 00:34:56 +01:00
Michael Adam
586d8f6883 vacuum: fix an abundance of indentation white spaces in ctdb_vacuum_db()
(This used to be ctdb commit 4ae564e415560cde7e4cd4c5a1d7699f3d49621b)
2011-11-26 00:34:56 +01:00
Michael Adam
018095b64d vacuum: rename "size" to "freelist_size" for clarity
(This used to be ctdb commit 057023f5843c91d1cf8512f3675a01a119ea6157)
2011-11-26 00:34:56 +01:00
Michael Adam
e931453a22 logging: properly cast sockaddr_in to sockaddr for sendto() in ctdb_syslog_log()
(This used to be ctdb commit 7420d9991e30575219c919ce2a8edce20ad3eb63)
2011-11-26 00:34:53 +01:00
Michael Adam
93016108bd logging: some whitespace cleanup in ctdb_syslog_log()
(This used to be ctdb commit b283be8658d6229314b9265ed8659d2cac573073)
2011-11-26 00:34:53 +01:00
Michael Adam
1bb58697fd logging: properly cast sockaddr_in to sockaddr for bind in start_syslog_daemon()
(This used to be ctdb commit add2506caf3340118be05a21b05dd71b822b1516)
2011-11-26 00:34:53 +01:00
Ronnie Sahlberg
446b40ba2c Merge remote branch 'martins/ctdb_control_oom'
(This used to be ctdb commit 6a57c64c58c77fd9dc7c7a1583d402c3ce0313b1)
2011-11-18 14:45:56 +11:00
Ronnie Sahlberg
8017393444 Merge remote branch 'martins/hashinclude'
(This used to be ctdb commit 0f6991010cf4e1f0dd9f39243bcc8fff5dcc0524)
2011-11-18 14:42:10 +11:00
Ronnie Sahlberg
1f9b9bc614 Merge remote branch 'martins/warnings'
(This used to be ctdb commit 58a1e25e1c563ebede57eea2e8f4e2c5785d01bf)
2011-11-18 14:36:45 +11:00
Ronnie Sahlberg
0581fd85e6 Eventscripts: Add special -ECANCELED status for monitor events that are cancelled
When a monitor event is canceled by a higher priority script, make sure we return
status -ECANCELED to the callback in ctdB_monitor.c
Also treat -ECANCELED as a simple "try monitor event again" and skip modifying any HEALTHY/UNHEALTHY flags when this happens

(This used to be ctdb commit a15ec57c26d1bc82af85f74eebae0bd8abde3233)
2011-11-18 12:22:22 +11:00
Martin Schwenke
ef20fead95 Relax an out of memory message.
The call to ctdb_transport_allocate() can fail for 2 reasons:

* Unable to allocate memory.

* The transport is down, perhaps because CTDB is shutting down.

Either cause will be appropriately logged.

The current use of CTDB_NO_MEMORY_VOID() prints an "out of memory"
message regardless of what happened in ctdb_transport_allocate() and
this could be misleading.

Change this to print a more relaxed message.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8c4a93e77c7d7d0cec6b2afd42c22475f1b5ccdc)
2011-11-16 15:46:44 +11:00
Martin Schwenke
3ae8273d86 Make some ctdb_takeover.c functions static
These were intentionally not static so they could be linked to in unit
test programs.  However, using the CCAN-style unit tests where
relevant code is just included, this is no longer necessary.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d0e9e8554614bd49ffb9ec3509feaa0e80d0f65d)
2011-11-11 14:41:47 +11:00
Martin Schwenke
a2ba5342f5 Rename ctdb_control_get_stat_history() local variable to avoid shadowing.
Local variable stat generates a warning because it shadows a global
declatation, presumably stat(2).  Rename it to s.

This is in the context of wanting to run CCAN-style tests where most
of the ctdbd code is just included in the test program.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d17efacb3aa6fac61d89f4c88ca17579341c335f)
2011-11-11 14:31:50 +11:00
Martin Schwenke
f186dd90b6 Move some common functions to common/ctdb_ltdb.c
Move identical copies of ctdb_null_func(), ctdb_fetch_func(),
ctdb_fetch_with_header_func() from ctdb_client.c and
ctdb_ltdb_server.c to somewhere common.

This is in the context of wanting to run CCAN-style tests where most
of the ctdbd code is just included in the test program.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 126cb0d369b2b1aed63801dc4ba0554399e8b7e4)
2011-11-11 14:31:50 +11:00
Martin Schwenke
c1e8ea08e3 Clean up warnings: log some unchecked return codes from function calls
In a few places functions are called, the return code is assigned into
a variable but it is not checked.  This generates a compiler warning
like this:

  warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Instead we remove the warning by checking the return code variable and
log a warning at DEBUG level if the return code indicates an error.
The justification is that there may have been a future intent to check
the return code but it hasn't been important enough to follow-up.  If
it matters, it will be logged for easy debugging.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 1932466c76de2b184c2a257120768ab8c9d6c12a)
2011-11-09 15:20:07 +11:00
Martin Schwenke
3b47e5fa49 Fix typo in ctdb_ltdb_store_server()
The if statement uses ret but means to use ret2.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f40101a615f8b9826a484e4697bfea6ee2b9ba88)
2011-11-09 14:55:07 +11:00
Martin Schwenke
02612ea2bc Clean up warnings: remove changed_flags in monitor_helper
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3e4fa518f02db75e4e4a7f326a71df226913f8a8)
2011-11-09 14:45:01 +11:00
Ronnie Sahlberg
0e79b2d1e8 Record Fetch Collapse: Collapse multiple fetch request into one single request.
When multiple clients fetch the same record concurrently, send only one single
fetch across the network and deferr all other fetches locally.
This improves performance for hot records and reduces cpu load on ctdb.

(This used to be ctdb commit 82d6946ad8b3348e8b9d3d971f24925ade02d1be)
2011-11-08 16:08:28 +11:00
Ronnie Sahlberg
8db9b73920 Merge remote branch 'martins/lcp2fix'
(This used to be ctdb commit 7c02d242af552aa732f5c70ea4eeefbc8a8542e2)
2011-11-08 14:06:30 +11:00
Ronnie Sahlberg
afd0b63273 Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit d772743e9a4d4d40eb95cd8d5178708e77057b79)
2011-11-08 14:01:22 +11:00
Ronnie Sahlberg
0f92fa224c RB_TREE: Add mechanism to abort a traverse
This patch changes the callback signature for traversal
functions to allow a client to abort a traverse before it finishes.
Updates to all callers and examples as well as rb-test tool.

(This used to be ctdb commit 8ab0c63ad36cfbbb1e5fed46a1f4c47b1fdb581f)
2011-11-08 13:40:28 +11:00
Volker Lendecke
47f20e8ae5 Fix some typos
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit f24e943eb7d8b86ce6b32ae37e3884ec4af0f7df)
2011-11-02 17:05:47 +01:00
Martin Schwenke
c0939af571 LCP IP allocation algorithm - try harder to find a candidate source node
There's a bug in LCP2.  Selecting the node with the highest imbalance
doesn't always work.  Some nodes can have a high imbalance metric
because they have a lot of IPs.  However, these nodes can be part of a
group that is perfectly balanced.  Nodes in another group with less
IPs might actually be imbalanced.

Instead of just trying the source node with the highest imbalance this
tries them in descending order of imbalance until it finds one where
an IP can be moved to another node.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 574091d5aced5e87aefad52f8bc47aa75c25fbf6)
2011-11-02 10:17:00 +11:00
Martin Schwenke
98c27f973d LCP IP allocation algorithm - new function lcp2_failback_candidate()
There's a bug in LCP2.  Selecting the node with the highest imbalance
doesn't always work.  Some nodes can have a high imbalance metric
because they have a lot of IPs.  However, these nodes can be part of a
group that is perfectly balanced.  Nodes in another group with less
IPs might actually be imbalanced.

Factor out the code from lcp2_failback() that actually takes a node
and decides which address should be moved to which node.

This is the first step in fixing the above bug.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 75718c5768b5bb5c0bcd7dd90e0327c6ed22a63d)
2011-11-01 21:01:25 +11:00
Ronnie Sahlberg
19bd9149c3 ReadOnly: fix bug writing incorrect amount of data in delegated record
Fix bug when ctdbd updates the local copy of a delegated record to write the correct
amount of data to the record.

(This used to be ctdb commit 8814d8bc159a5e368afaa236ac7d865165db04b2)
2011-10-28 11:44:19 +11:00
Ronnie Sahlberg
a9e77de9e4 ReadOnly: Dont update the record header from the calling client. While it is convenient since it avoids having to create a child process from the main dameon for writing the updated record it makes the cleitn more complex.
Remove the code in the example client code that writes the record to the local tdb.
Add code to the local ctdbd processing of replies to check if this reply contain a ro delegation and if so, spawn a child process to lock the tdb and then write the data.

(This used to be ctdb commit bf1d429227dc4f5818263cc39401d0a22663cdba)
2011-10-24 13:14:26 +11:00
Ronnie Sahlberg
90c0c235fa Remove debug message
(This used to be ctdb commit db0fdc2281c4742113c92d697371c37815db35a0)
2011-10-24 12:21:55 +11:00
Ronnie Sahlberg
d79596ba1a One of the entry points to release an ip reset the pnn field before invoking the eventscript.
this triggered a check for "only run the eventscript if we host the address" to trigger and shortcir=cuit calling the eventscript.

An effect of this would be that 'ctdb delip' would remove the ip from ctdb, but fail to delete it from the interface.

S1028798

(This used to be ctdb commit b82524f240bf21769dd7624ca6026763d38b9396)
2011-09-22 15:17:23 +10:00
Ronnie Sahlberg
4587bdb052 when checking that the interfaces exist in ctdb_add_public_address()
cant talloc off vnn since it is not yet initialized and might not always be NULL

(This used to be ctdb commit 3d37be3e2bfb61ede824028aeebaa18ba304faae)
2011-09-21 11:42:19 +10:00
Ronnie Sahlberg
e3cdf429b6 ReadOnly: revokechild_active is a list, not a context.
Dont reset the pointer to NULL after deleting the first entry, loop deleting one entry
at a time until they are all gone or we will leak some memory and possibly a process.

(This used to be ctdb commit 8a86ac72088ad9f64ca83218c704f84c9abe00b6)
2011-09-13 18:47:18 +10:00
Ronnie Sahlberg
0dc5584101 Merge branch 'master-readonly-records' into foo
Conflicts:

	Makefile.in
	tools/ctdb.c

(This used to be ctdb commit 0fedef0ffba4178126eee9544c5e2db52f5db893)
2011-09-12 09:34:34 +10:00
Ronnie Sahlberg
1c05db2c9c Merge remote branch 'ddiss/master_pmda_and_client_timeouts'
(This used to be ctdb commit 7bebfc7bad8f36e54003b8e25372fdaf54836e21)
2011-09-08 11:22:53 +10:00
David Disseldorp
5296da5609 client: add timeout argument to ctdb_attach
Rather than using a fixed 2 second CTDB_CONTROL_GETDBPATH timeout.

(This used to be ctdb commit 9e178671560cb95121e11d718a76b05380ecd6c5)
2011-09-06 13:57:04 +02:00
Ronnie Sahlberg
783ceca07b Interface monitoring: add a event to trigger every 30 seconds to check that all interfaces referenced by the public address list actually exists.
This will make it much easier to root-cause problems such as
S1029023
when an external application deleted the interface while it is still is in use by ctdbd.

(This used to be ctdb commit 9abf9c919a7e6789695490e2c3de56c21b63fa57)
2011-09-06 17:02:19 +10:00
Ronnie Sahlberg
64378fea58 Check interfaces: when reading the public addresses file to create the vnn list
check that the actual interface exist, print error and fail startup if the interface does not exist.

(This used to be ctdb commit cd33bbe6454b7b0316bdfffbd06c67b29779e873)
2011-09-06 16:11:00 +10:00
Michael Adam
a3e0079568 Add a tunable "AllowClientDBAttach" with default value 1.
When set to 0, clients will not be able to attach to databases
via the db_attach control. This might can be useful for maintenance
where ctdb should be kept running but clients should not be able
to modify databases.

(This used to be ctdb commit ddfeecda87955b4e46777599f678e6926d37f4c4)
2011-09-05 16:17:39 +10:00
Ronnie Sahlberg
206a3c0c66 ReadOnly: add a new control to activate readonly lock capability for a database.
let all databases default to not support this  until enabled through this control

(This used to be ctdb commit 908a07c42e5135a3ba30a625fc4f4e4916de197a)
2011-09-01 11:08:18 +10:00