vlendec/samba-autobuild/.git
12 years agotests: Fix the error messages in test event script
Amitay Isaacs [Tue, 27 Mar 2012 06:07:52 +0000 (17:07 +1100)]
tests: Fix the error messages in test event script

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 706e6e3ef6765fbba29e531e590c48fe742b9914)

12 years agotests: Add regular expression parsing for hop_count_buckets
Amitay Isaacs [Tue, 27 Mar 2012 00:37:42 +0000 (11:37 +1100)]
tests: Add regular expression parsing for hop_count_buckets

This fixes the test to check ctdb statistics output.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 98c633ab4824e0e4d28ab2eb2532e16eb859bd94)

12 years agotests: Add a script to run cluster tests and make target "test_cluster"
Amitay Isaacs [Wed, 21 Mar 2012 00:51:56 +0000 (11:51 +1100)]
tests: Add a script to run cluster tests and make target "test_cluster"

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 420a10be89c62b4d605f3b972d78fd69dd9f5bb1)

12 years agotests: exportfs always outputs with options in brackets
Amitay Isaacs [Mon, 13 Feb 2012 03:03:12 +0000 (14:03 +1100)]
tests: exportfs always outputs with options in brackets

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit bdd8b8ab20169936fa723fa77cead1b76b6cd0b5)

12 years agotests/tool: New nodestatus test
Amitay Isaacs [Fri, 13 Apr 2012 02:06:53 +0000 (12:06 +1000)]
tests/tool: New nodestatus test

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 902d8a4709e7a269d2a75522a998f9a60ae13d78)

12 years agotests/tool: Fix the nodestatus test
Amitay Isaacs [Fri, 13 Apr 2012 02:05:59 +0000 (12:05 +1000)]
tests/tool: Fix the nodestatus test

Although not obvious, when asking each node for nodestatus, it will report
each node is the current node.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 261258c1a4268230b2559bc5d8664b1197b22450)

12 years agoAdd test for NoIPTakeover
Ronnie Sahlberg [Thu, 12 Apr 2012 00:31:17 +0000 (10:31 +1000)]
Add test for NoIPTakeover

(This used to be ctdb commit 79172330d10ae0d5a7e5bf724959c9e5784716b4)

12 years agoCTDB: add back the "rebalanceip" command
Ronnie Sahlberg [Tue, 3 Apr 2012 03:43:21 +0000 (13:43 +1000)]
CTDB: add back the "rebalanceip" command

(This used to be ctdb commit 83aea6488002aa75dd25752fa0d164afb8b4f300)

12 years agobuild: Substitute POPT macros once and reuse variables
Amitay Isaacs [Fri, 30 Mar 2012 01:06:05 +0000 (12:06 +1100)]
build: Substitute POPT macros once and reuse variables

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a2ba2c4ec153c8844cf7f5b0de03b2269ec892f3)

12 years agorecovery: Add prototypes for tdb internal functions
Amitay Isaacs [Mon, 26 Mar 2012 23:53:25 +0000 (10:53 +1100)]
recovery: Add prototypes for tdb internal functions

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 98ac99c4a79fe2ee024890bb27c3ca68dc02d434)

12 years agobuild: Use system tdb library if available
Amitay Isaacs [Wed, 21 Mar 2012 03:45:56 +0000 (14:45 +1100)]
build: Use system tdb library if available

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 10ab88a5c822ac403a70a9cd1a6c81020eb91d08)

12 years agobuild: Use system tevent library if available
Amitay Isaacs [Wed, 21 Mar 2012 04:56:45 +0000 (15:56 +1100)]
build: Use system tevent library if available

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 2ade83de4e1f318c91489ec9a7f90d1b26f77e1b)

12 years agobuild: Use system talloc library if available
Amitay Isaacs [Wed, 21 Mar 2012 02:18:10 +0000 (13:18 +1100)]
build: Use system talloc library if available

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 94f1e02406c353c3a0235685acdd107ee5a7f285)

12 years agobuild: Display correct LIB_FLAGS while building
Amitay Isaacs [Wed, 21 Mar 2012 05:08:57 +0000 (16:08 +1100)]
build: Display correct LIB_FLAGS while building

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 0cbe7a4f92795203f022252a50a240b8bd4238c3)

12 years agobuild: Remove re-definition of same variable
Amitay Isaacs [Mon, 19 Mar 2012 22:22:54 +0000 (09:22 +1100)]
build: Remove re-definition of same variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 36e690faab3d76919780c8550fe6d49fb6bbfba5)

12 years agopackaging: Setup directories for rpmbuild
Amitay Isaacs [Mon, 6 Feb 2012 05:45:50 +0000 (16:45 +1100)]
packaging: Setup directories for rpmbuild

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 45773dab630ee44b39df0dd4b50f43fb1e7bb0ba)

12 years agobuild: Add rules to create ctags/etags
Amitay Isaacs [Wed, 11 Jan 2012 08:04:39 +0000 (19:04 +1100)]
build: Add rules to create ctags/etags

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a9e9444a7a78f5ef0e929a8dbd8ca0c68b40acd4)

12 years agoInitscript - add backup of corrupt non-persistent databases
Martin Schwenke [Wed, 28 Mar 2012 03:50:36 +0000 (14:50 +1100)]
Initscript - add backup of corrupt non-persistent databases

Corrupt non-persistent databases never get analysed because ctdbd
zeroes them at startup.

Modify the initscript so that corrupt non-persistent databases are
moved aside to a backup.  If the number of backups for a particular
database exceeds $CTDB_MAX_CORRUPT_DB_BACKUPS (default 10) then the
oldest excess backups are garbage collected.

Abstracts from and cleans up the code for checking persistent
databases.

Logging of related messages is done to syslog or a log file as
specified.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 00cd75595685dae829758abf1a4cb644af7ed50e)

12 years agoAdd policy routing documentation to ctdbd(1).
Martin Schwenke [Fri, 23 Mar 2012 03:31:31 +0000 (14:31 +1100)]
Add policy routing documentation to ctdbd(1).

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5cdeb0dd8827b13b06265c75dfac359bcd6ad10c)

12 years agoMerge remote branch 'martins/policy_routing'
Ronnie Sahlberg [Thu, 22 Mar 2012 04:39:59 +0000 (15:39 +1100)]
Merge remote branch 'martins/policy_routing'

(This used to be ctdb commit 7293762046e25a9c96e6417e34e18c214ebc6e55)

12 years agoUndo damage done by d8d37493478a26c5f1809a5f3df89ffd6e149281
Martin Schwenke [Thu, 22 Mar 2012 04:27:25 +0000 (15:27 +1100)]
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)

12 years agoTests - eventscripts - initial policy routing tests
Martin Schwenke [Tue, 20 Mar 2012 06:22:02 +0000 (17:22 +1100)]
Tests - eventscripts - initial policy routing tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7d7488a49bc7e799f39f3da3fa81be7a2e14480a)

12 years agoTests - eventscripts - new function simple_test_command()
Martin Schwenke [Tue, 20 Mar 2012 06:19:01 +0000 (17:19 +1100)]
Tests - eventscripts - new function simple_test_command()

Allows running arbitrary command and comparing output against
expected.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit da2e9650a97f99e7d694659926d9958927edd8ad)

12 years agoTests - eventscripts - change summary columns
Martin Schwenke [Tue, 20 Mar 2012 06:17:47 +0000 (17:17 +1100)]
Tests - eventscripts - change summary columns

To accommodate 13.per_ip-routing in output.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0142729c96b8bfecfabe35439071557bcc6ed4da)

12 years agoTests - eventscripts - rationalise CTDB fakery support
Martin Schwenke [Tue, 20 Mar 2012 06:15:33 +0000 (17:15 +1100)]
Tests - eventscripts - rationalise CTDB fakery support

Remove functions for marking nodes as down/up.  This is now done via
ctdb disable/enable in the stub.

Also more consistent temporary directory use.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 1db9a533aacc6e02ddbadf76241429144a949e1c)

12 years agoTests - eventscripts - improved support functions for handling public IPs
Martin Schwenke [Tue, 20 Mar 2012 06:14:22 +0000 (17:14 +1100)]
Tests - eventscripts - improved support functions for handling public IPs

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 299ce89fb3deeefcc7c01b20197dc6adee1e8194)

12 years agoTests - eventscripts - add support functions for policy routing testing
Martin Schwenke [Tue, 20 Mar 2012 06:13:21 +0000 (17:13 +1100)]
Tests - eventscripts - add support functions for policy routing testing

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 79eec235ac9b051333751186c32924d92e6ebeff)

12 years agoUpdate .gitignore for eventscript testing fu.
Martin Schwenke [Tue, 20 Mar 2012 06:10:05 +0000 (17:10 +1100)]
Update .gitignore for eventscript testing fu.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0fc20ab5207d4f812bf62b90a66c707f76742f84)

12 years agoTests - eventscripts - fix hardcoding error
Martin Schwenke [Tue, 20 Mar 2012 06:06:51 +0000 (17:06 +1100)]
Tests - eventscripts - fix hardcoding error

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 9c30bf7fd3d94884e27a258571a28dca5e460177)

12 years agoTests - eventscripts - stub ctdb command updates
Martin Schwenke [Tue, 20 Mar 2012 06:00:50 +0000 (17:00 +1100)]
Tests - eventscripts - stub ctdb command updates

* Proper IP (re)allocation using ctdbd's IP allocation algorithm.
* Therefore, "ctdb ip" works sensibly.
* Add enable, disable, moveip.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6d4b4b1293ba960d8fdf81958d6e8dd23c9d771a)

12 years agoTests - eventscripts - more public IPs in default setup
Martin Schwenke [Tue, 20 Mar 2012 05:26:41 +0000 (16:26 +1100)]
Tests - eventscripts - more public IPs in default setup

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 38396185effbcf313678c2e94d4bd20f534c4f03)

12 years agoTests - eventscripts - add -A/-D options
Martin Schwenke [Tue, 20 Mar 2012 05:25:34 +0000 (16:25 +1100)]
Tests - eventscripts - add -A/-D options

Make it easier to spot differences between desired output and actual
output.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d132a8f4a8c0573ac447713a71911f02b6f0d73c)

12 years agoTests - eventscripts - ip stub command should print errors to stderr
Martin Schwenke [Tue, 20 Mar 2012 05:24:41 +0000 (16:24 +1100)]
Tests - eventscripts - ip stub command should print errors to stderr

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 236d572556e447e2d82d14d2c8a40ed8cb98944d)

12 years agoEventscripts - make 13.per_ip_routing fail gracefully if config is missing
Martin Schwenke [Tue, 20 Mar 2012 05:23:24 +0000 (16:23 +1100)]
Eventscripts - make 13.per_ip_routing fail gracefully if config is missing

Currently it spews out random messages about the file being missing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 351ca413eec460330571ca8b01ad269728fe15df)

12 years agoEventscripts - make 13.per_ip_routing try harder to find public_addresses
Martin Schwenke [Tue, 20 Mar 2012 05:21:09 +0000 (16:21 +1100)]
Eventscripts - make 13.per_ip_routing try harder to find public_addresses

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d4621277240721e6d130a930b0100506b64467ea)

12 years agoEventscripts - use set_proc() rather than accessing /proc directly
Martin Schwenke [Tue, 20 Mar 2012 05:20:10 +0000 (16:20 +1100)]
Eventscripts - use set_proc() rather than accessing /proc directly

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bdb4cdaf2aed79c8de6a8db8c01685b242808310)

12 years agoEventscripts - 13.per_ip_routing should use dirname not basename for mkdir
Martin Schwenke [Tue, 20 Mar 2012 05:18:49 +0000 (16:18 +1100)]
Eventscripts - 13.per_ip_routing should use dirname not basename for mkdir

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d034845ecea66b47004bc73f2554914a397b1c9d)

12 years agoEventscript tests - implement ip route in stub
Martin Schwenke [Thu, 15 Mar 2012 04:48:25 +0000 (15:48 +1100)]
Eventscript tests - implement ip route in stub

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ac2cd2a8cbed97348ceae54167ad83cb074ff6b3)

12 years agoEventscript tests - implement ip rule in stub
Martin Schwenke [Thu, 15 Mar 2012 02:22:51 +0000 (13:22 +1100)]
Eventscript tests - implement ip rule in stub

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 26292f362890ca6cb65d0028d50fa97458e0449f)

12 years agoEventscript tests - make ip command stub vaguely maintainable
Martin Schwenke [Wed, 14 Mar 2012 04:15:18 +0000 (15:15 +1100)]
Eventscript tests - make ip command stub vaguely maintainable

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8b8e17bea87a8c16f7c0f54fcfe29190f203f673)

12 years agoEventscript tests - make error message consistent with recent change
Martin Schwenke [Wed, 14 Mar 2012 04:14:04 +0000 (15:14 +1100)]
Eventscript tests - make error message consistent with recent change

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f4949b3c1b36949544e98c9fbb64447f94f9e432)

12 years agoEventscript support - Remove unused interface_modify.sh
Martin Schwenke [Wed, 7 Mar 2012 05:20:24 +0000 (16:20 +1100)]
Eventscript support - Remove unused interface_modify.sh

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 994492f79275fe84155d842f6bc288c1858217dd)

12 years agoEventscript functions - no longer require interface_modify.sh
Martin Schwenke [Wed, 7 Mar 2012 05:18:12 +0000 (16:18 +1100)]
Eventscript functions - no longer require interface_modify.sh

Make add_ip_to_iface() and delete_ip_from_iface() do their own locking
so the external script is no longer required.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 93f90caf91246074d9359bf31a39b26212cccc42)

12 years agoEventscript functions - remove now-unused route/IP re-add script logic
Martin Schwenke [Wed, 7 Mar 2012 02:51:03 +0000 (13:51 +1100)]
Eventscript functions - remove now-unused route/IP re-add script logic

This is no longer used by 13.per_ip_routing or anything else.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 2a2ea6c61a05af2d0765e964abcc7ef04047431e)

12 years agoEventscript functions - remove functions only used by 13.per_ip_routing
Martin Schwenke [Tue, 6 Mar 2012 00:21:41 +0000 (11:21 +1100)]
Eventscript functions - remove functions only used by 13.per_ip_routing

The relevant functions are now in that script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 45c3476d12bf0f52966b72d286f101fce1382cd2)

12 years agoEventscripts - redesign and rewrite 13.per_ip_routing
Martin Schwenke [Thu, 1 Mar 2012 04:23:53 +0000 (15:23 +1100)]
Eventscripts - redesign and rewrite 13.per_ip_routing

The current version is quite difficult to read.  This one is hopefully
clearer.

Major changes:

* The configuration file has a more forgiving syntax.  Items can be
  separated by arbitrary whitespace.

* Mappings between IP addresses and table IDs are no longer stored in
  files in a state directory.  Instead they are stored in
  /etc/iproute2/rt_tables as mappings between table IDs and labels, as
  allowed by the ip command.  The current structure of the labels is
  ctdb.<source-ip>.  This means that once the labels are setup the
  routing tables can be referenced by just knowing the source IP.  As
  with the old state directory, mappings in this file owned by CTDB
  are deleted when CTDB shuts down.

* There are no release or re-add scripts.

  - Release scripts are not necessary as an optimisation because of
    the previous improvement (i.e. use of rt_tables).  No lookup is
    necessary to delete rules or flush tables.

  - Re-add scripts are no longer used.  Routes can still go missing
    when removal of a primary IP from an interfaces (or similar)
    causes removal of all other addresses (i.e. secondaries) and also
    all associated routes.  However, any missing routes are now
    re-added in the "ipreallocated" event.  This happens shortly after
    takeip/releaseip/updateip and means that the routes will only be
    re-added once.  The window for missing routes is slightly bigger
    but is not expected to be significant.

* The magic "__auto_link_local__" configuration value no longer causes
  a dynamic configuration file to be maintained in a state directory.
  The link local configuration is now generated when needed from the
  public_addresses file.  This greatly simplifies the code.  This
  approach is slightly less efficient but should not be significant.

The above changes mean that, apart from maintaining mappings in the
rt_tables file, there are no state files kept anymore.

Some utility functions only used by this script have been rewritten
and moved into this script.  They will be removed from the functions
file by a future commit.

The route re-add code will also be removed from interface_modify.sh by
a future commit.  It is currently harmless.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0f7cbbb55f26cf3c953e98fe5e7eaa12f59fbf78)

12 years agoEventscript functions - add new function die()
Martin Schwenke [Wed, 7 Mar 2012 05:09:56 +0000 (16:09 +1100)]
Eventscript functions - add new function die()

Args:

1. Error message to be printed.

2. Option exit code (default 1)

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 97b0c138cb97e30db27c40b4ee1481109ae90c78)

12 years agoDOC: regenerate manpages
Ronnie Sahlberg [Thu, 22 Mar 2012 00:12:37 +0000 (11:12 +1100)]
DOC: regenerate manpages

(This used to be ctdb commit 270edc87e6bcfd6e76c526bf86df865e4d47d11c)

12 years agoNoIPTakeover: change the tunable name for the "dont allow failing addresses over...
Ronnie Sahlberg [Thu, 22 Mar 2012 00:00:27 +0000 (11:00 +1100)]
NoIPTakeover: change the tunable name for the "dont allow failing addresses over onto the node" to NoIPTakeover

(This used to be ctdb commit 35592e618cfd827b6978af6332f80504f232c46a)

12 years agoNoIPFailback: Exclude nodes which have NoIPFailback as failback targets during reallo...
Ronnie Sahlberg [Wed, 21 Mar 2012 22:22:35 +0000 (09:22 +1100)]
NoIPFailback: Exclude nodes which have NoIPFailback as failback targets during reallocation

(This used to be ctdb commit c262c29773d1608e7ce04bdfb7f4469df0a9637b)

12 years agoMake NoIPFailback a node local setting. Nodes that have NoIPFailback set to !0 can...
Ronnie Sahlberg [Wed, 21 Mar 2012 22:05:49 +0000 (09:05 +1100)]
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)

12 years agoDOC regenerate the manpage
Ronnie Sahlberg [Tue, 20 Mar 2012 06:43:26 +0000 (17:43 +1100)]
DOC  regenerate the manpage

(This used to be ctdb commit 0ae2a46e37df8d84ce0c76b7a5d32d6e93af709b)

12 years agoSTICKY document the sticky record parameters
Ronnie Sahlberg [Tue, 20 Mar 2012 06:07:13 +0000 (17:07 +1100)]
STICKY   document the sticky record parameters

(This used to be ctdb commit e6a8306257dece02313043274789b52cef1a5647)

12 years agoSTICKY: add prototype code to make records stick to a node to "calm" down if they...
Ronnie Sahlberg [Tue, 20 Mar 2012 05:58:35 +0000 (16:58 +1100)]
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)

12 years agoDOC: Document the MaxLACount tunable variable
Ronnie Sahlberg [Tue, 20 Mar 2012 01:25:47 +0000 (12:25 +1100)]
DOC: Document the MaxLACount tunable variable

(This used to be ctdb commit cf96d6380de974c1abff7a33c62a7e31ac980551)

12 years agoLACOUNT: Add back lacount mechanism to defer migrating a fetched/read copy until...
Ronnie Sahlberg [Tue, 20 Mar 2012 01:20:55 +0000 (12:20 +1100)]
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)

12 years agoSTATISTICS: add per-db hop count statistics
Ronnie Sahlberg [Tue, 20 Mar 2012 01:08:12 +0000 (12:08 +1100)]
STATISTICS: add per-db hop count statistics

(This used to be ctdb commit 1c976d83b1d7dac6f0ef81306774998e4c8b56a1)

12 years agoCTDB: change how the hop count buckets are displayed in ctdb statistics
Ronnie Sahlberg [Tue, 20 Mar 2012 00:43:09 +0000 (11:43 +1100)]
CTDB: change how the hop count buckets are displayed in ctdb statistics

(This used to be ctdb commit 05923a14bc8ae8e3c5cda28ff4e0fb0d473d5f7d)

12 years agoDOC document the FetchCollapse tunable
Ronnie Sahlberg [Tue, 20 Mar 2012 00:38:20 +0000 (11:38 +1100)]
DOC document the FetchCollapse tunable

(This used to be ctdb commit c37aa6f3738693653f64c2fa015ace061da38b5a)

12 years agoFETCH COLLAPSE : Change the fetch-lock collapse to collapse ALL fetches, including...
Ronnie Sahlberg [Tue, 20 Mar 2012 00:31:59 +0000 (11:31 +1100)]
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)

12 years agoadd max hop count buckets to see how bad hopcounts are
Ronnie Sahlberg [Wed, 7 Mar 2012 06:02:41 +0000 (17:02 +1100)]
add max hop count buckets to see how bad hopcounts are

(This used to be ctdb commit 7d3931298e6477d92f43652c3006b0c426cb1307)

12 years agoMerge remote branch 'martins/master'
Ronnie Sahlberg [Thu, 15 Mar 2012 05:09:41 +0000 (16:09 +1100)]
Merge remote branch 'martins/master'

(This used to be ctdb commit af72f8bc05f78983f9624d81788f9d89af474b11)

12 years agoTest: add test tool and test that UPDATE_RECORD works on persistent databases
Ronnie Sahlberg [Mon, 12 Mar 2012 05:09:32 +0000 (16:09 +1100)]
Test: add test tool and test that UPDATE_RECORD works on persistent databases

(This used to be ctdb commit f06634951331232cddf0b48eac3552b92aca5b93)

12 years agoReadOnly: Only restrict the readonly sanity/paranoia check that only allows
Ronnie Sahlberg [Mon, 12 Mar 2012 02:13:51 +0000 (13:13 +1100)]
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)

12 years agoREADONLY: when updating a remote node to revoke a delegation, make sure we dont creat...
Ronnie Sahlberg [Fri, 2 Mar 2012 01:57:23 +0000 (12:57 +1100)]
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)

12 years agoNew version 1.13
Ronnie Sahlberg [Thu, 1 Mar 2012 01:36:03 +0000 (12:36 +1100)]
New version 1.13

This will be the new long term stable branch for ctdb

Main new features are

read-only records: performance/scaling improvement for concurrent access to the same record from multiple nodes.

fetch-lock-collapse: performance/scaling improvement for concurrent write access to the same record from multiple nodes.

(This used to be ctdb commit 05e75dea9eaa0decc2909e0c2cf1715c81374200)

12 years agoREADONLY: skip vacuuming or deleting records with readonly delegations.
Ronnie Sahlberg [Wed, 29 Feb 2012 05:09:24 +0000 (16:09 +1100)]
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)

12 years agoVacuuming: change default timeout to 120 seconds
Ronnie Sahlberg [Wed, 29 Feb 2012 01:29:22 +0000 (12:29 +1100)]
Vacuuming: change default timeout to 120 seconds

(This used to be ctdb commit 5ae94c6b9b3000a6c79fccaaea1e007ebd5be1a9)

12 years agoAdd a tunable variable to control how long we defer after a ctdb addip until we force...
Ronnie Sahlberg [Mon, 27 Feb 2012 19:58:59 +0000 (06:58 +1100)]
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)

12 years agoWhen adding ips to nodes, set up a deferred rebalance for the whole node to trigger...
Ronnie Sahlberg [Mon, 27 Feb 2012 19:56:04 +0000 (06:56 +1100)]
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)

12 years agoMake KILLTCP structure a child of VNN so that it is freed at the same time
Ronnie Sahlberg [Sun, 26 Feb 2012 20:18:19 +0000 (07:18 +1100)]
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)

12 years agoEventscripts: remove the horrible horrible circular reference between state and callb...
Ronnie Sahlberg [Wed, 22 Feb 2012 06:38:12 +0000 (17:38 +1100)]
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)

12 years agochange TDB to be valgrind nice
Ronnie Sahlberg [Wed, 22 Feb 2012 05:07:17 +0000 (16:07 +1100)]
change TDB to be valgrind nice

(This used to be ctdb commit d306c3c9a53e012c412c96ab9743de6cd96826e0)

12 years agoserver:update_record: remove some blood stains (trailing spaces...)
Michael Adam [Tue, 21 Feb 2012 16:56:45 +0000 (17:56 +0100)]
server:update_record: remove some blood stains (trailing spaces...)

(This used to be ctdb commit 0df433496f9c53a2c3759a62ebe355c35caff920)

12 years agoserver:update_record: make ctdb_childwrite static
Michael Adam [Tue, 21 Feb 2012 16:55:07 +0000 (17:55 +0100)]
server:update_record: make ctdb_childwrite static

(This used to be ctdb commit 400364a1d54404787cff48fb2c30c1b172a8b204)

12 years agoserver: move the code for the update_record control to its own file
Michael Adam [Tue, 21 Feb 2012 16:53:26 +0000 (17:53 +0100)]
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)

12 years agoFix some documentation typos
Volker Lendecke [Mon, 20 Feb 2012 11:21:48 +0000 (12:21 +0100)]
Fix some documentation typos

Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 67516f2eaf0b8b0f6aa4ecb0f1c44af53b992fbb)

12 years agowhen shutting down ctdb, allow it 30 seconds instead of 10 before will -9 the daemon
Ronnie Sahlberg [Tue, 21 Feb 2012 08:02:36 +0000 (19:02 +1100)]
when shutting down ctdb, allow it 30 seconds instead of 10 before will -9 the daemon

(This used to be ctdb commit d8b400d76665f37ffd9de302eedcff9f23807225)

12 years agoLog the "Received SHUTDOWN ..." first in the shutown process instead of last.
Ronnie Sahlberg [Tue, 21 Feb 2012 08:00:33 +0000 (19:00 +1100)]
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)

12 years agoMerge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
Ronnie Sahlberg [Mon, 20 Feb 2012 20:12:50 +0000 (07:12 +1100)]
Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master

(This used to be ctdb commit 9b85aa1aa14091dc1de470a587f7c054b9e40078)

12 years agoREADONLY: only send a control to schedule fast-vacuuming from child context iff we...
Ronnie Sahlberg [Mon, 20 Feb 2012 20:03:44 +0000 (07:03 +1100)]
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)

12 years agoREADONLY: dont schedule for fast vacuum deletion if any of the readonly record flags...
Ronnie Sahlberg [Mon, 20 Feb 2012 19:54:09 +0000 (06:54 +1100)]
READONLY: dont schedule for fast vacuum deletion if any of the readonly record flags are set

(This used to be ctdb commit b3307d78fd15f446b423f8cdd1e403f89fbe8ac8)

12 years agoRevert "ReadOnly: We can not use ctdb_ltdb_store from a client/child context since"
Ronnie Sahlberg [Mon, 20 Feb 2012 19:49:18 +0000 (06:49 +1100)]
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)

12 years agoMerge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
Ronnie Sahlberg [Mon, 20 Feb 2012 10:30:13 +0000 (21:30 +1100)]
Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master

(This used to be ctdb commit 0fd3bf919b1b8e5aaa98444c306c6770a6a3209f)

12 years agoReadOnly: We can not use ctdb_ltdb_store from a client/child context since
Ronnie Sahlberg [Mon, 20 Feb 2012 10:22:56 +0000 (21:22 +1100)]
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)

12 years agoReadOnly: Make sure we dont try to fast-vacuum records that are set for readonly...
Ronnie Sahlberg [Mon, 20 Feb 2012 10:13:46 +0000 (21:13 +1100)]
ReadOnly: Make sure we dont try to fast-vacuum records that are set for readonly delegation

(This used to be ctdb commit 303134cf10a08ce61954d5de9025d9bbcb5f75ef)

12 years agoMerge branch 'master' of ssh://git.samba.org/data/git/ctdb
Ronnie Sahlberg [Sun, 19 Feb 2012 22:54:52 +0000 (09:54 +1100)]
Merge branch 'master' of ssh://git.samba.org/data/git/ctdb

(This used to be ctdb commit d3c54ae9cc83f74d15f40bbfff95404b270d2f80)

12 years agoFix the build on freebsd9. (typo in flags?)
Michael Adam [Sat, 18 Feb 2012 11:29:49 +0000 (12:29 +0100)]
Fix the build on freebsd9. (typo in flags?)

(This used to be ctdb commit 650bb17335876f3e91e76a47b748c9236d0f3045)

12 years agoTESTS: Add test for wipedb command
Ronnie Sahlberg [Wed, 15 Feb 2012 23:19:15 +0000 (10:19 +1100)]
TESTS: Add test for wipedb command

(This used to be ctdb commit 4ea05fef886b0680d0ad0936c239a51fd75bf000)

12 years agoAdd common/system_freebsd.c
Volker Lendecke [Mon, 6 Feb 2012 11:50:05 +0000 (12:50 +0100)]
Add common/system_freebsd.c

Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit 89067e12b868974f9909b447ab5e202d612ac44f)

12 years agoAdd includes required on FreeBSD
Volker Lendecke [Mon, 6 Feb 2012 10:33:17 +0000 (11:33 +0100)]
Add includes required on FreeBSD

Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit be5c3a57df39d85fbb7ee922924787340e2b0595)

12 years agoFreeBSD does not define s6_addr32, only s6_addr
Volker Lendecke [Mon, 6 Feb 2012 10:01:47 +0000 (11:01 +0100)]
FreeBSD does not define s6_addr32, only s6_addr

Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit d657af4fb68ce3f7c462856f2934f6bf169e120b)

12 years agoMake CTDB_CURRENT_NODE work with CTDB_REQ_MESSAGE
Volker Lendecke [Mon, 13 Feb 2012 12:24:37 +0000 (13:24 +0100)]
Make CTDB_CURRENT_NODE work with CTDB_REQ_MESSAGE

Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit be8a153346ca7d40f09a6d03aad655aaa5c4a903)

12 years agoTests - functions/environment - set and use $CTDB_NODES
Martin Schwenke [Mon, 13 Feb 2012 02:34:57 +0000 (13:34 +1100)]
Tests - functions/environment - set and use $CTDB_NODES

"ctdb listnodes" changed so that it never tries to contact the daemon
but reads the local nodes file instead.  This fails if the nodes file
is in a non-default place but $CTDB_NODES isn't set.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a7ad2fb75f06791508dd928d2a0c305fc7f7b814)

12 years agoTests - simple - make disconnected node tests handle changed error message
Martin Schwenke [Mon, 13 Feb 2012 02:32:25 +0000 (13:32 +1100)]
Tests - simple - make disconnected node tests handle changed error message

Recent changes to nodestring parsing generalised the error message
logged when trying to talk to a disconnected node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit db69a39ca010b2c8853b13466e30792dda350cdb)

12 years agoctdb tool: fix thinko in nodestatus command output
Martin Schwenke [Mon, 13 Feb 2012 02:31:18 +0000 (13:31 +1100)]
ctdb tool: fix thinko in nodestatus command output

If used with -n <nodes> the "current" node needs to change.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a0340a50c2acd9ccc281faef032a364254f7f95a)

12 years agoREADONLY: add test for creating and revoking delegations
Ronnie Sahlberg [Mon, 13 Feb 2012 00:16:24 +0000 (11:16 +1100)]
READONLY: add test for creating and revoking delegations

(This used to be ctdb commit a7e7fa2169ee12f817336f6d03d5bb72df7ec020)

12 years agoREADONLY: Update the fetch-readonly-once test tool to use CTDB_SOCKET if set
Ronnie Sahlberg [Mon, 13 Feb 2012 00:06:45 +0000 (11:06 +1100)]
READONLY: Update the fetch-readonly-once test tool to use CTDB_SOCKET if set

(This used to be ctdb commit f4d395165816f74839ed48860e3210e05bc16d3d)

12 years agoREADONLY: document the command to activate readonly record support
Ronnie Sahlberg [Sun, 12 Feb 2012 23:34:41 +0000 (10:34 +1100)]
READONLY: document the command to activate readonly record support

(This used to be ctdb commit f0bc1760c36c8589f58354c50b23880946cb57c6)

12 years agoREADONLY: allow specifying the db name for setdbreadonly instead of just the hash
Ronnie Sahlberg [Sun, 12 Feb 2012 23:27:59 +0000 (10:27 +1100)]
READONLY:  allow specifying the db name for setdbreadonly instead of just the hash

(This used to be ctdb commit 3c2117e8e4156e0048fbd2c94546112f0c588522)