obnox/ctdb.git
12 years agoNew version 1.0.114.5. ctdb-1.0.114.5
Michael Adam [Mon, 7 May 2012 09:51:28 +0000 (11:51 +0200)]
New version 1.0.114.5.

12 years agorecover: finish pending trans3 commits when a recovery is finished.
Michael Adam [Wed, 23 Feb 2011 16:39:57 +0000 (17:39 +0100)]
recover: finish pending trans3 commits when a recovery is finished.

When the end_recovery control is received, pending trans3 commits are
finished. During the recovery, all the actions like persistent_callback
and persistent_store_timeout had been disabled to let the recovery do
its job. After the recover is completed, send the reply to the waiting
clients.
(cherry picked from commit f7dfeb7143f574c2434f7dd16917380dfd1f4f64)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent: add ctdb_persistent_finish_trans3_commits().
Michael Adam [Wed, 23 Feb 2011 16:38:40 +0000 (17:38 +0100)]
persistent: add ctdb_persistent_finish_trans3_commits().

This function walks all databases and checks for running trans3 commits.
It sends replies to all of them (with error code) and ends them.
To be called when a recovery finishes.
(cherry picked from commit 70ba153b532528bdccea70c5ea28972257f384c1)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agodaemon: correctly end a running trans3_commit if the client disconnects.
Michael Adam [Wed, 23 Feb 2011 16:37:42 +0000 (17:37 +0100)]
daemon: correctly end a running trans3_commit if the client disconnects.
(cherry picked from commit 9e0898db6df52d9bc799dd87bfea8c72d5f70ba0)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent: add a client context to the persistent_stat and track the db_id
Michael Adam [Wed, 23 Feb 2011 16:35:27 +0000 (17:35 +0100)]
persistent: add a client context to the persistent_stat and track the db_id

The db_id is tracked in the client context as an indication that a
transaction commit is in progress. This is cleared in the persistent_state
talloc destructor.

This is in order to properly treat running trans3_commits if the client
disconnects.
(cherry picked from commit e886ff24f4e3e250944289db95916b948893d26c)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent: reject trans3_control when a commit is already active.
Michael Adam [Tue, 22 Feb 2011 23:03:07 +0000 (00:03 +0100)]
persistent: reject trans3_control when a commit is already active.

This should actually never happen.
(cherry picked from commit f416e76838fe2adf629d4356d1cc87054b1af164)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent: allocate the persistent state in the ctdb_db struct in trans3_commit
Michael Adam [Tue, 22 Feb 2011 23:01:13 +0000 (00:01 +0100)]
persistent: allocate the persistent state in the ctdb_db struct in trans3_commit

Make sure that ctdb_db->persistent_state is correctly NULL-ed when
the state is freed. This way, we can use ctdb_db->persistent_state
as an indication for whether a transaction commit is currently
running.
(cherry picked from commit 761cb235193564a0f337d0308f0a9e6de0ef2710)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent: add a ctdb_db context to the ctdb_persistent_state struct.
Michael Adam [Tue, 22 Feb 2011 23:23:18 +0000 (00:23 +0100)]
persistent: add a ctdb_db context to the ctdb_persistent_state struct.
(cherry picked from commit a14917c983c3b9bbbf38f5ddeecdbbe5bde32364)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent: add a ctdb_persistent_state member to the ctdb_db context.
Michael Adam [Tue, 22 Feb 2011 23:00:04 +0000 (00:00 +0100)]
persistent: add a ctdb_persistent_state member to the ctdb_db context.

To be used for tracking running transaction commits through recoveries.

(Backported from commit 1237e15df4af58a3d220eea42a4b75e21e65029f)

12 years agopersistent_callback: print "no error message given" instead of "(null)"
Michael Adam [Tue, 22 Feb 2011 21:49:52 +0000 (22:49 +0100)]
persistent_callback: print "no error message given" instead of "(null)"
(cherry picked from commit d871a38978219e004833608c11aae98fe47614b9)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent: reduce indentation for the finishing moves in ctdb_persistent_callback
Michael Adam [Tue, 22 Feb 2011 21:47:30 +0000 (22:47 +0100)]
persistent: reduce indentation for the finishing moves in ctdb_persistent_callback
(cherry picked from commit 2c2d1646eb753ea9561f085bcb101153267b052b)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent: if a node failed to update_record, trigger a recovery
Michael Adam [Tue, 22 Feb 2011 21:44:16 +0000 (22:44 +0100)]
persistent: if a node failed to update_record, trigger a recovery

and stop processing of the update_record replies in order to let
the recovery finish the trans3_commit control.
(cherry picked from commit cab95570dc1eefb08abbac5ae411c29f699b51cc)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent_store_timout: do not really time out the trans3_commit control in recovery
Michael Adam [Tue, 22 Feb 2011 21:24:50 +0000 (22:24 +0100)]
persistent_store_timout: do not really time out the trans3_commit control in recovery

If a recovery was started, then all further processing of the update_record
controls sent by the trans3_commit control and timing them out is disabled.
The recovery should trigger sending the reply for the update record control
when finished.
(cherry picked from commit 983c1ca2e18ecd60fca69bfe9e116125cc695857)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopersistent_callback: ignore the update-recordreturn code of remote node in recovery
Michael Adam [Tue, 22 Feb 2011 21:24:50 +0000 (22:24 +0100)]
persistent_callback: ignore the update-recordreturn code of remote node in recovery

If a recovery was started, then all further processing of the update_record
controls sent by the trans3_commit control is disabled. The recovery should
trigger sending the reply for the update record control when finished.
(cherry picked from commit 12cf0619255b12230843cd8bb49cbfdea376ca2f)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agoconfig: wrap iptables in flock to avoid concurrancy.
Rusty Russell [Mon, 12 Jul 2010 05:41:42 +0000 (15:11 +0930)]
config: wrap iptables in flock to avoid concurrancy.

When doing a releaseip event, we do them in parallel for all the separate
IPs.  This creates a problem for iptables, which isn't reentrant, giving
the strange message:
iptables encountered unknown error "18446744073709551615" while initializing table "filter"

The worst possible symptom of this is that releaseip won't remove the rule
which prevents us listening to clients during releaseip, and the node will be
healthy but non-responsive.

The simple workaround is to flock-wrap iptables.  Better would be to rework
the code so we didn't need to use iptables in these paths.

CQ:S1018353
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 72d6914ee913272312d7b68f1be5ad05ad06587d)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agoNew version 1.0.114.4 ctdb-1.0.114.4
Michael Adam [Thu, 12 Jan 2012 13:47:50 +0000 (14:47 +0100)]
New version 1.0.114.4

Includes vacuuming fixes and cleanup.

12 years agoltdb_server: improve logging in ctdb_ltdb_store_server
Michael Adam [Thu, 12 Jan 2012 11:46:06 +0000 (12:46 +0100)]
ltdb_server: improve logging in ctdb_ltdb_store_server

When logging which key to store/delete, list the ctdb_hash
and the jenkins_hash. In this version, the databases still
use the the old hash (with lots of hash collisions) while
the internal lists (vacuuming, schedule_for_deletion, ...)
already use the jenkins hash.

12 years agodoc:ctdb.1: add generated files after update
Michael Adam [Tue, 13 Dec 2011 13:48:38 +0000 (14:48 +0100)]
doc:ctdb.1: add generated files after update

12 years agodoc:ctdb.1: explain that "ctdb listvars" does not list obsolete tunables any more
Michael Adam [Thu, 22 Dec 2011 12:05:26 +0000 (13:05 +0100)]
doc:ctdb.1: explain that "ctdb listvars" does not list obsolete tunables any more
(cherry picked from commit 4ed94279f243729d521d365a44607fd086ae7c41)

12 years agodoc:ctdb.1: adapt example output of "ctdb listvars" to current state
Michael Adam [Tue, 13 Dec 2011 13:47:42 +0000 (14:47 +0100)]
doc:ctdb.1: adapt example output of "ctdb listvars" to current state

12 years agoctdb-tool: adapt formatting of "listvars" output to lenght of longest name
Michael Adam [Thu, 22 Dec 2011 11:13:10 +0000 (12:13 +0100)]
ctdb-tool: adapt formatting of "listvars" output to lenght of longest name
(cherry picked from commit 295168d99183d2d21f27a8ac6825d421fa866b28)

12 years agotunables: don't list obsolete tunables in the list_tunables control
Michael Adam [Thu, 22 Dec 2011 11:52:55 +0000 (12:52 +0100)]
tunables: don't list obsolete tunables in the list_tunables control
(cherry picked from commit d8ab86f0eb11437e50d18183858dd3177a8f61e6)

12 years agotunables: add a bool obsolete flag to the tunable_map list
Michael Adam [Wed, 11 Jan 2012 23:08:03 +0000 (00:08 +0100)]
tunables: add a bool obsolete flag to the tunable_map list

(cherry picked from commit 1a7d9b25fdcf7b59598618d406c2a681c90d9163)

12 years agovacuum: improve logging in remove_record_from_delete_queue()
Michael Adam [Fri, 23 Dec 2011 16:23:07 +0000 (17:23 +0100)]
vacuum: improve logging in remove_record_from_delete_queue()
(cherry picked from commit 809d1f3b8a9232fce0376cb47e4f633b49237529)

12 years agovacuum: improve logging in delete_record_traverse()
Michael Adam [Fri, 23 Dec 2011 16:22:46 +0000 (17:22 +0100)]
vacuum: improve logging in delete_record_traverse()
(cherry picked from commit 40ca781b3305d9f0bfee5b109d4eefde461a3f13)

12 years agovacuum: improve logging in insert_record_into_delete_queue()
Michael Adam [Fri, 23 Dec 2011 16:10:20 +0000 (17:10 +0100)]
vacuum: improve logging in insert_record_into_delete_queue()
(cherry picked from commit db59ac2ee6a9f5f7f088ebbc5e2800d9e57aae17)

12 years agovacuum: improve debugging in delete_queue_traverse()
Michael Adam [Fri, 23 Dec 2011 16:08:28 +0000 (17:08 +0100)]
vacuum: improve debugging in delete_queue_traverse()
(cherry picked from commit 2c44c6dc583872c603a399afb01936abcbb05158)

12 years agovacuum: add debug message to insert_record_into_delete_queue() for failed insert
Michael Adam [Fri, 23 Dec 2011 14:14:06 +0000 (15:14 +0100)]
vacuum: add debug message to insert_record_into_delete_queue() for failed insert
(cherry picked from commit ae78e8d991636a3a79dd9fbcefc15032afb08f55)

12 years agovacuum: improve debugging in insert_record_into_delete_queue()
Michael Adam [Fri, 23 Dec 2011 09:37:25 +0000 (10:37 +0100)]
vacuum: improve debugging in insert_record_into_delete_queue()
(cherry picked from commit 6e6aaba28ac560d51d7450ebcf99babf868d0aea)

12 years agovacuum: initialize (to zero) the vacuum fetch list in ctdb_vacuum_init_vacuum_data()
Michael Adam [Thu, 22 Dec 2011 23:14:18 +0000 (00:14 +0100)]
vacuum: initialize (to zero) the vacuum fetch list in ctdb_vacuum_init_vacuum_data()
(cherry picked from commit 772e08c29ef70a4cc73f7887939e5071a90a98cb)

12 years agovacuum: add statistics output for processing of the delete list
Michael Adam [Thu, 22 Dec 2011 14:46:49 +0000 (15:46 +0100)]
vacuum: add statistics output for processing of the delete list
(cherry picked from commit bec2ff46402b6d90521c75e8d46b9f6f2f47239a)

12 years agovacuum: add a comment explaining a race in the vacuum code.
Michael Adam [Tue, 20 Dec 2011 14:58:34 +0000 (15:58 +0100)]
vacuum: add a comment explaining a race in the vacuum code.
(cherry picked from commit 07f1ba54b1617fadd6fe83826dd8e76f37cea071)

12 years agovacuum: factor out initialization of the vacuum data from ctdb_vacuum_db()
Michael Adam [Tue, 20 Dec 2011 14:50:51 +0000 (15:50 +0100)]
vacuum: factor out initialization of the vacuum data from ctdb_vacuum_db()

for readability
(cherry picked from commit 1963e33859e9dc51e9e88664c6d95e62c7c8b8be)

12 years agovacuum: streamline ctdb_process_delete_list()
Michael Adam [Fri, 16 Dec 2011 22:16:27 +0000 (23:16 +0100)]
vacuum: streamline ctdb_process_delete_list()

Reducing indentiation and improving use of talloc.
(cherry picked from commit 11f52ba18370f1dda983f2263f9af82045b4fdea)

12 years agovacuum: factor processing of the delete list out of ctdb_vacuum_db()
Michael Adam [Fri, 16 Dec 2011 22:15:51 +0000 (23:15 +0100)]
vacuum: factor processing of the delete list out of ctdb_vacuum_db()
(cherry picked from commit cf68b762432a18e4a3cda137591b3f005c196906)

12 years agovacuum: factor processing of vacuum fetch lists out of ctdb_vacuum_db()
Michael Adam [Fri, 16 Dec 2011 16:00:07 +0000 (17:00 +0100)]
vacuum: factor processing of vacuum fetch lists out of ctdb_vacuum_db()

(cherry picked from commit 905fc9cd7126ab84c23d4a803c59e32b9c54e6f0)

12 years agovacuum: factor out full vacuum run out of ctdb_vacuum_db() as ctdb_vacuum_db_full()
Michael Adam [Fri, 16 Dec 2011 10:04:13 +0000 (11:04 +0100)]
vacuum: factor out full vacuum run out of ctdb_vacuum_db() as ctdb_vacuum_db_full()
(cherry picked from commit e31594e0c13899e88013ce7eb7e3dc434c2f0723)

12 years agovacuum: factor out the fast vacuuming run into ctdb_vacuum_db_fast()
Michael Adam [Fri, 16 Dec 2011 09:59:26 +0000 (10:59 +0100)]
vacuum: factor out the fast vacuuming run into ctdb_vacuum_db_fast()

for readability
(cherry picked from commit 6596f2c4a6b4783b6498502fbbf50f87d4f59085)

12 years agovacuum: rename delete_tree to delete_list
Michael Adam [Fri, 16 Dec 2011 09:53:26 +0000 (10:53 +0100)]
vacuum: rename delete_tree to delete_list

It is not important for the user that this is implemented as a tree.
(cherry picked from commit f686bc440560074c1ce866f2037ae3671f182185)

12 years agovacuum: appropriately rename vdata.list to vdata.vacuum_fetch_list
Michael Adam [Fri, 16 Dec 2011 09:49:41 +0000 (10:49 +0100)]
vacuum: appropriately rename vdata.list to vdata.vacuum_fetch_list
(cherry picked from commit 09c55b76c96c4ab3fe812763007b81cf0a2ac86c)

12 years agovacuum: introduce a helper variable for the vacuum fetch list in ctdb_vacuum_db()
Michael Adam [Fri, 16 Dec 2011 09:46:54 +0000 (10:46 +0100)]
vacuum: introduce a helper variable for the vacuum fetch list in ctdb_vacuum_db()

12 years agovacuum: introduce a helper variable in add_record_to_vacuum_fetch_list() to reduce...
Michael Adam [Fri, 16 Dec 2011 09:43:06 +0000 (10:43 +0100)]
vacuum: introduce a helper variable in add_record_to_vacuum_fetch_list() to reduce verbosity
(cherry picked from commit 48fe56ea27e3649ae7a67257fdce54f973e7c3c5)

12 years agotools/ctdb: allow the "ctdb vacuum" stub to be run without the daemon running.
Michael Adam [Tue, 13 Dec 2011 16:43:58 +0000 (17:43 +0100)]
tools/ctdb: allow the "ctdb vacuum" stub to be run without the daemon running.

(cherry picked from commit e71afbf731f06a3b89b64220c7fd1b1ea5492d4a)

12 years agotools/ctdb: remove functionality of "ctdb vacuum", just keeping a stub.
Michael Adam [Tue, 13 Dec 2011 16:43:10 +0000 (17:43 +0100)]
tools/ctdb: remove functionality of "ctdb vacuum", just keeping a stub.

(cherry picked from commit 8fc4d5018ee6eee8856634095694d3ad0de5b4ae)

12 years agovacuum: locally delete the records in the delete_tree that have be deleted remotely
Michael Adam [Tue, 13 Dec 2011 16:32:45 +0000 (17:32 +0100)]
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.
(cherry picked from commit ea3e640a28178ddcb85285f4efec62ccba2483d9)

12 years agovacuum: improve vacuuming statistics for handling the delete_tree.
Michael Adam [Tue, 13 Dec 2011 16:30:39 +0000 (17:30 +0100)]
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.
(cherry picked from 536aad024d52f2c32dd397fc86294c963b91341b)

12 years agovacuum: fix and improve a comment
Michael Adam [Tue, 13 Dec 2011 15:05:05 +0000 (16:05 +0100)]
vacuum: fix and improve a comment
(cherry picked from commit 0ed349c24c7399b3b440c1f5d573db77ddb988b3)

12 years agovacuum: appropriately rename delete_traverse() to delete_marshall_traverse()
Michael Adam [Tue, 13 Dec 2011 14:59:38 +0000 (15:59 +0100)]
vacuum: appropriately rename delete_traverse()  to delete_marshall_traverse()
(cherry picked from commit 7c5b27bc8dce9e30f2aff05297113da981f7b9a3)

12 years agovacuum: initialize the delete_count in the vacuum data
Michael Adam [Tue, 13 Dec 2011 14:58:52 +0000 (15:58 +0100)]
vacuum: initialize the delete_count in the vacuum data
(cherry picked from commit 970b8fc60857ad2f18f45312d355c571fb2f0246)

12 years agovacuum: fix the VacuumInterval tunable's type to uint32_t in get_vacuum_interval()
Michael Adam [Tue, 13 Dec 2011 13:21:04 +0000 (14:21 +0100)]
vacuum: fix the VacuumInterval tunable's type to uint32_t in get_vacuum_interval()
(cherry picked from commit a5a29bf92b23e9b5a1523b06461eced422b22ffe)

12 years agovacuum: add new tunable VacuumInterval and mark Vacuum{Default,Min,Max}Interval obsolete
Michael Adam [Tue, 13 Dec 2011 13:33:08 +0000 (14:33 +0100)]
vacuum: add new tunable VacuumInterval and mark Vacuum{Default,Min,Max}Interval obsolete

And use VacuumInterval instead of VacuumDefaultInterval in the code.
(cherry picked from commit 78530f40338f511a7cd1d33ada450905742bfa8f)

12 years agovacuum: remove struct vacuum_tuning_data (unused)
Michael Adam [Tue, 13 Dec 2011 13:36:35 +0000 (14:36 +0100)]
vacuum: remove struct vacuum_tuning_data (unused)
(cherry picked from commit 1f62afbe1ae0b3e7dbad4081d1b51e3ab6ee5c39)

12 years agovacuum: use get_vacuum_interval() in ctdb_vacuum_event()
Michael Adam [Tue, 13 Dec 2011 13:32:12 +0000 (14:32 +0100)]
vacuum: use get_vacuum_interval() in ctdb_vacuum_event()

(instead of using the tunable directly)
(cherry picked from commit e40fa9efd1c77aa35c917aba6e6e4d21d9c5cdea)

12 years agovacuum: change get_vacuum_interval() to simply return the VacuumDefaultInterval tunable
Michael Adam [Tue, 13 Dec 2011 13:16:23 +0000 (14:16 +0100)]
vacuum: change get_vacuum_interval() to simply return the VacuumDefaultInterval tunable

(cherry picked from commit 621c3ce957cb946ca05a2d527c037746ae2f01d3)

12 years agovacuum: remove update_tuning_db()
Michael Adam [Tue, 13 Dec 2011 13:06:09 +0000 (14:06 +0100)]
vacuum: remove update_tuning_db()

(cherry picked from commit d93750ea3f5cb854e5893e53795fd08656e7c12c)

12 years agoctdb_ltdb_store_server: when storing a record that is not to be scheduled for deletio...
Michael Adam [Thu, 7 Apr 2011 10:17:42 +0000 (12:17 +0200)]
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>
(cherry picked from commit 489148e465e2b8aed87ea836e3518f43490671ca)

12 years agovacuum: add ctdb_local_remove_from_delete_queue()
Michael Adam [Thu, 7 Apr 2011 10:17:16 +0000 (12:17 +0200)]
vacuum: add ctdb_local_remove_from_delete_queue()

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit a5065b42a98c709173503e02d217f97792878625)

12 years agorb_tree: fix possible access-after-free-error in trbt_traversearray32_node
Michael Adam [Thu, 22 Dec 2011 17:09:36 +0000 (18:09 +0100)]
rb_tree: fix possible access-after-free-error in trbt_traversearray32_node

When the traverse callback frees the current node, the traverse of the
rbtree can fail (the next node->right fails since node is not there any more...).
This is fixed by introducing variables to store the right (and left)
pointers before the callback is called.
(cherry picked from commit 8b0caaeed154d26c67a73659d3bbbdd63b21be11)

12 years agofix zero-initialization of header in _ctdbd_allocate_pkt to the correct size
Michael Adam [Thu, 22 Dec 2011 16:18:38 +0000 (17:18 +0100)]
fix zero-initialization of header in _ctdbd_allocate_pkt to the correct size
(cherry picked from commit 6c4d1b768ccade344a7462ecad7cf5cbbf3873d4)

12 years agotypo
Ronnie Sahlberg [Wed, 14 Dec 2011 01:52:35 +0000 (12:52 +1100)]
typo
(cherry picked from commit 8fc71ad4da746e28406c06a95928052b29803062)

12 years agotraverse: fix traversing with empty records by adding a new (internal) control CTDB_C...
Michael Adam [Sat, 3 Dec 2011 01:15:30 +0000 (02:15 +0100)]
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.
(cherry picked from 8281bb210858ed04992eacea7f6d02261e0fc1b1)

12 years agodoc: commit generated ctdb.1 manpages after xml change
Michael Adam [Tue, 10 Jan 2012 13:15:26 +0000 (14:15 +0100)]
doc: commit generated ctdb.1 manpages after xml change

12 years agodoc: document the "--print-recordflags" parameter to "ctdb"
Michael Adam [Tue, 29 Nov 2011 12:41:16 +0000 (13:41 +0100)]
doc: document the "--print-recordflags" parameter to "ctdb"
(cherry picked from commit 5b527e6127a649fa80dcf9a7599b22bcb7cd3640)

12 years agoctdb: add an option --print-recordflags to trigger printing record flags in catdb...
Michael Adam [Tue, 29 Nov 2011 09:24:52 +0000 (10:24 +0100)]
ctdb: add an option --print-recordflags to trigger printing record flags in catdb and dumpdbbackup

This changes the default behaviour to not print record flags.
(cherry picked from commit 2d2ce07c51055d9400b22cd3c1fd682597cb921c)

12 years agodoc: document the "--print-hash" parameter to "ctdb".
Michael Adam [Tue, 29 Nov 2011 12:39:08 +0000 (13:39 +0100)]
doc: document the "--print-hash" parameter to "ctdb".
(cherry picked from commit 998b7f4450026051867525d91c6d8dcbd2326ab5)

12 years agoctdb: add output of jenkins hash to ctdb catdb (with --print-hash)
Michael Adam [Mon, 3 Jan 2011 12:15:34 +0000 (13:15 +0100)]
ctdb: add output of jenkins hash to ctdb catdb (with --print-hash)

12 years agoctdb: add an option --print-hash to enable printing of record hashes when dumping dbs
Michael Adam [Mon, 28 Nov 2011 23:56:23 +0000 (00:56 +0100)]
ctdb: add an option --print-hash to enable printing of record hashes when dumping dbs

(cherry picked from commit efc033c28ade97f9884794256d59a4553e052d5f)

12 years agodoc: document the "--print-lmaster" parameter to "ctdb"
Michael Adam [Tue, 29 Nov 2011 12:36:38 +0000 (13:36 +0100)]
doc: document the "--print-lmaster" parameter to "ctdb"
(cherry picked from commit 7e7d86ac9b05f8b67414200adc8ac87cfccf26cf)

12 years agoctdb: add an option --print-lmaster to enable printing of lmaster in "ctdb catdb"
Michael Adam [Mon, 28 Nov 2011 16:36:03 +0000 (17:36 +0100)]
ctdb: add an option --print-lmaster to enable printing of lmaster in "ctdb catdb"

(cherry picked from commit 326f88ef622620cb9e0569c4497bc0e86124beaa)

12 years agodoc: document the "--print-datasize" parameter to "ctdb"
Michael Adam [Tue, 29 Nov 2011 12:31:11 +0000 (13:31 +0100)]
doc: document the "--print-datasize" parameter to "ctdb"
(cherry picked from commit 9e8045a5b0d8bd9ab2e0343b329de9f45b883531)

12 years agoctdb: add an option --print-datasize to only print datasize instead of dumping data...
Michael Adam [Mon, 28 Nov 2011 16:19:03 +0000 (17:19 +0100)]
ctdb: add an option --print-datasize to only print datasize instead of dumping data in db dumps

Used in catdb and dumpdbbackup.
(cherry picked from commit dd866116041e71cbf91e7fd91edcc9501634051d)

12 years agodoc: document the --print-emptyrecords switch in the "ctdb" manpage.
Michael Adam [Tue, 29 Nov 2011 12:28:35 +0000 (13:28 +0100)]
doc: document the --print-emptyrecords switch in the "ctdb" manpage.
(cherry picked from commit 7b4663dd2454b798841815044f898dead9b734e2)

12 years agoctdb: add an option --print-emptyrecords to enable printing of empty records in dumpi...
Michael Adam [Mon, 28 Nov 2011 16:11:16 +0000 (17:11 +0100)]
ctdb: add an option --print-emptyrecords to enable printing of empty records in dumping databases

this option is used with the commands catdb and dumpdbbackup.
(cherry picked from commit 6ec68a2e667f66d2b194fe48cb75229a2777842e)

12 years agoclient: add version ctdb_traverse_ext() of ctdb_traverse() that can list empty records.
Michael Adam [Wed, 22 Dec 2010 11:45:06 +0000 (12:45 +0100)]
client: add version ctdb_traverse_ext() of ctdb_traverse() that can list empty records.
(cherry picked from commit 4ada4bfc4510886c5c7fcf49e09711b9d2dcb75d)

12 years agotraverse: add a flag to enable transferring empty records in cluster wide traverse
Michael Adam [Sun, 27 Nov 2011 22:16:33 +0000 (23:16 +0100)]
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.
(cherry-picked from commit ddc5da3a0df7701934404192a0a0aa659a806acb)

12 years agovacuum: update (C) from vacuum rewrite
Michael Adam [Sat, 26 Nov 2011 00:06:13 +0000 (01:06 +0100)]
vacuum: update (C) from vacuum rewrite
(cherry picked from commit a95b524e57b861416f65baef7a0235bf7e394cef)

12 years agovacuum: write a big and up-to-date explaining comment for ctdb_vacuum_db()
Michael Adam [Fri, 25 Nov 2011 12:55:20 +0000 (13:55 +0100)]
vacuum: write a big and up-to-date explaining comment for ctdb_vacuum_db()
(cherry picked from commit 6b9d308985ef2363c62fde6340ad37d56f6d7702)

12 years agovacuum: fix a comment typo in vacuum_traverse()
Michael Adam [Fri, 25 Nov 2011 12:54:48 +0000 (13:54 +0100)]
vacuum: fix a comment typo in vacuum_traverse()
(cherry picked from commit 88ad1e75c686cd47aec18b0a8eb93c3b125f0e97)

12 years agovacuum: fix horrible indentation/whitespacing for ctdb_vacuum_event()
Michael Adam [Fri, 25 Nov 2011 12:35:05 +0000 (13:35 +0100)]
vacuum: fix horrible indentation/whitespacing for ctdb_vacuum_event()
(cherry picked from commit 0f070a65a322bd6d3240ca96a9e5c3633ef647bf)

12 years agovacuum: fix a comment typo in vacuum_traverse()
Michael Adam [Fri, 25 Nov 2011 12:34:15 +0000 (13:34 +0100)]
vacuum: fix a comment typo in vacuum_traverse()
(cherry picked from commit 39a5c0d8cca4ce5e8bc7055739a6377fb2dc36e0)

12 years agovacuum: fix an abundance of indentation white spaces in ctdb_vacuum_db()
Michael Adam [Fri, 25 Nov 2011 12:25:27 +0000 (13:25 +0100)]
vacuum: fix an abundance of indentation white spaces in ctdb_vacuum_db()
(cherry picked from commit 4ae564e415560cde7e4cd4c5a1d7699f3d49621b)

12 years agovacuum: rename "size" to "freelist_size" for clarity
Michael Adam [Fri, 25 Nov 2011 12:23:23 +0000 (13:23 +0100)]
vacuum: rename "size" to "freelist_size" for clarity
(cherry picked from commit 057023f5843c91d1cf8512f3675a01a119ea6157)

12 years agoRB_TREE: Add mechanism to abort a traverse
Ronnie Sahlberg [Wed, 2 Nov 2011 02:33:28 +0000 (13:33 +1100)]
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.
(cherry picked from commit 8ab0c63ad36cfbbb1e5fed46a1f4c47b1fdb581f)

12 years agoCorrection of spelling errors
Mathieu Parent [Tue, 22 Mar 2011 23:16:27 +0000 (00:16 +0100)]
Correction of spelling errors

* continous -> continuous
* activete  -> activate

(thanks to lintian)

See https://bugzilla.samba.org/show_bug.cgi?id=6935

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit fb6987c2f747d6dbf9bb3899a480124d1c242a90)

12 years agovacuum: disabling vacuuming during a freeze
Rusty Russell [Wed, 21 Jul 2010 02:58:04 +0000 (12:28 +0930)]
vacuum: disabling vacuuming during a freeze

We shouldn't even think about vacuuming when we've frozen the database
(which is earlier than when we set CTDB_RECOVERY_ACTIVE)

CQ:S1018154 & S1018349
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit d8df6835a931082af232c4b94f1dede6f16169f9)

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agovacuum: fix crash on vacuum abort
Rusty Russell [Mon, 26 Jul 2010 06:38:07 +0000 (16:08 +0930)]
vacuum: fix crash on vacuum abort

Martin Schwenke discovered that 517f05e42f17766b1e8db8f1f4789cbad968e304
("freeze: abort vacuuming when we're going to freeze.") used ctdb_db for
a logging message which is in fact uninitialized, causing a crash (even
if it wasn't actually logged).

Initialize it properly.  Also fix incorrect format in another logging
message introduced in that same change.

CQ:S1019093
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 8e518950ba281502318d6300f7a5ec6cdf6b5674)

12 years agofreeze: abort vacuuming when we're going to freeze.
Rusty Russell [Wed, 21 Jul 2010 02:59:55 +0000 (12:29 +0930)]
freeze: abort vacuuming when we're going to freeze.

There are some reports of freeze timeouts, and it looks like vacuuming might
be the culprit.  So we add code to tell them to abort when a freeze is
going on.

(This is based on the 1.0.112 branch version 517f05e42f, but far
 simpler since tdb is now robust against processes being killed during
 transaction commit)

CQ:S1018154 & S1018349
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit f5d7dc679501e607c2c83a248a89d3cada9df146)

12 years agotakeover: prevent crash by avoiding free in traverse on RST timeout
Rusty Russell [Mon, 26 Jul 2010 04:28:48 +0000 (13:58 +0930)]
takeover: prevent crash by avoiding free in traverse on RST timeout

After 5 attempts to send a RST to a client without any response, we free
"con"; this is done during a traverse.  This frees the node we are walking
through (the node is made a child of "con" down in rb_tree.c's
trbt_create_node() (Valgrind would catch this, as Martin confirmed).

So, we create a temporary parent and reparent onto that; then we free
that parent after the traverse, thus deleting the unwanted nodes.

CQ:S1019041
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 08f7f85477610a4916c1ec866aa467b28f1bbec3)

12 years agoctdb: Add printing of the record flags when we are traversing a database to print...
Ronnie Sahlberg [Wed, 20 Jul 2011 02:21:33 +0000 (12:21 +1000)]
ctdb: Add printing of the record flags when we are traversing a database to print its content.
(based on commit 5eaa9a8683babac27f9f0144ff4cb5364fcd54f6)

12 years agoFix a compiler warning
Ronnie Sahlberg [Thu, 8 Apr 2010 04:28:52 +0000 (14:28 +1000)]
Fix a compiler warning
(cherry picked from commit 8825a8e3936e4ddfc1482d07a63a620249f01fe7)

12 years agoIn ctdb catdb, print the payload data length without the ctdb header length
Volker Lendecke [Wed, 24 Mar 2010 09:35:10 +0000 (10:35 +0100)]
In ctdb catdb, print the payload data length without the ctdb header length
(cherry picked from commit 45b3fe253c1d00c571b351fc73415bc799df3083)

12 years agotools/ctdb: add 'persistent' flag to "ctdb attach"
Stefan Metzmacher [Tue, 14 Sep 2010 12:49:42 +0000 (14:49 +0200)]
tools/ctdb: add 'persistent' flag to "ctdb attach"

metze
(cherry picked from commit 7a5790de22e8370b2812414aa1adef8201e8b269)

12 years agotools/ctdb: let "ctdb catdb" pass the persistent flag to ctdb_attach()
Stefan Metzmacher [Tue, 14 Sep 2010 12:45:16 +0000 (14:45 +0200)]
tools/ctdb: let "ctdb catdb" pass the persistent flag to ctdb_attach()

metze
(cherry picked from commit 4ec99c1eeab529865ac790ef554f3b099a14faf1)

12 years agoadd a new commandline flag -v to enable verbose output
Ronnie Sahlberg [Fri, 20 Aug 2010 01:28:24 +0000 (11:28 +1000)]
add a new commandline flag -v to enable verbose output
(cherry picked from commit 96dd9f40f9464c3d9de98f1323568724a1e31dc9)

12 years agoltdbtool: ignore empty (deleted) records per default.
Gregor Beck [Tue, 27 Sep 2011 09:41:29 +0000 (11:41 +0200)]
ltdbtool: ignore empty (deleted) records per default.

Add option -e to get the old behaviour and process empty records too.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit d9859540c2000864bc6c58be5afe19aa3b1064b2)

12 years agoio: Make queue_io_read() safe for reentry
David Disseldorp [Sun, 31 Jul 2011 01:14:54 +0000 (03:14 +0200)]
io: Make queue_io_read() safe for reentry

queue_io_read() may be reentered via the queue callback, recoverd is
particularly guilty of this.

queue_io_read() is not safe for reentry if more than one packet is
received and partial chunks follow - data read off the pipe on re-entry
is assumed to be the start-of-packet four byte length. This leads to a
wrongly aligned stream and the notorious "Invalid packet of length 0"
errors.

This change fixes queue_io_read() to be safe under reentry, only a
single packet is processed per call.

https://bugzilla.samba.org/show_bug.cgi?id=8319

12 years agopackaging: honour rpm build target options handed in to makerpms.sh
Michael Adam [Fri, 22 Jul 2011 08:27:40 +0000 (10:27 +0200)]
packaging: honour rpm build target options handed in to makerpms.sh

This allows to call e.g. "makerpms.sh -bs" to build only the source RPM.
(cherry picked from commit c6bfba2bb66962b7b05d708f0747002700991472)

12 years agoVersion 1.0.114.3
Stefan Metzmacher [Wed, 13 Jul 2011 13:17:24 +0000 (15:17 +0200)]
Version 1.0.114.3

metze

12 years agorecoverd: try to become the recovery master if we have the capability, but the curren...
Stefan Metzmacher [Tue, 21 Jun 2011 13:49:30 +0000 (15:49 +0200)]
recoverd: try to become the recovery master if we have the capability, but the current master doesn't

metze

12 years agorecoverd: let async_getcap_callback() also update ctdb->capabilities
Stefan Metzmacher [Tue, 21 Jun 2011 13:46:34 +0000 (15:46 +0200)]
recoverd: let async_getcap_callback() also update ctdb->capabilities

metze