summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Merge remote branch 'martins/scriptstatus'Ronnie Sahlberg2011-11-181-1/+1
| |\ \ | | | | | | | | | | | | (This used to be ctdb commit c4ff223096e7dae2e67692825a78c520d30211e0)
| | * | Fix ctdb scriptstatus -n allMartin Schwenke2011-11-101-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | This didn't have auto_all set as true. However, there's no special code to handle "-n all" and it just fails. If auto_all works for status then it might as well work for scriptstatus. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3084220e2aac3664511969f10cad206e505150a0)
| * | Merge remote branch 'martins/ctdb_control_oom'Ronnie Sahlberg2011-11-181-1/+4
| |\ \ | | | | | | | | | | | | (This used to be ctdb commit 6a57c64c58c77fd9dc7c7a1583d402c3ce0313b1)
| | * | Relax an out of memory message.Martin Schwenke2011-11-161-1/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Merge remote branch 'martins/hashinclude'Ronnie Sahlberg2011-11-1813-178/+214
| |\ \ | | | | | | | | | | | | (This used to be ctdb commit 0f6991010cf4e1f0dd9f39243bcc8fff5dcc0524)
| | * | Make some ctdb_takeover.c functions staticMartin Schwenke2011-11-112-74/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * | Tests: change ctdb_takeover_tests.c to include ctdbd codeMartin Schwenke2011-11-113-13/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do this instead of linking to it. This means that, after previous cleanups, we can fix ctdb_takeover.c to use static functions when appropriate and simply include all the code we need to run tests. To make this reusable in other tests, new file ctdbd_tests.c does all of the relevant including. ctdb_takeover_tests.c just includes that file. Test objects built in this way can depend on new Makefile macro $(CTDB_TEST_C), which contains ctdbd_tests.c and everything it includes. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 41869d42194b74db43a176a068e96e411007e5f2)
| | * | Rename ctdb_control_get_stat_history() local variable to avoid shadowing.Martin Schwenke2011-11-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * | Rename ctdb_ctrl_getscriptstatus() parameter to avoid shadowing a globalMartin Schwenke2011-11-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename parameter script_status to scripts to avoid shadowing a global function with the same name in eventscript.c. 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 668358057c1e6b9bbad7209212f9135c5e6241a0)
| | * | Rename ctdb_control_destructor() to ctdb_client_control_destructor()Martin Schwenke2011-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids a name clash with a slightly different function in ctdb_control.c. 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 82f6108bfbc7e48ca88650297c6a1c6ede0e1c9c)
| | * | Move some common functions to common/ctdb_ltdb.cMartin Schwenke2011-11-114-77/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * | Added some #ifndefs to stop files being included multiple times.Martin Schwenke2011-11-114-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fdca12c25e6fce6206135b994dedf44265e4eb09)
| * | | Merge remote branch 'martins/warnings'Ronnie Sahlberg2011-11-1819-39/+210
| |\| | | | | | | | | | | | | | (This used to be ctdb commit 58a1e25e1c563ebede57eea2e8f4e2c5785d01bf)
| | * | Clean up warnings: rpcgen output contains unused variable.Martin Schwenke2011-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grep it out in the Makefile. This should be very obvious if the output changes and the grep breaks something. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79638bdd884caaf899c1b41984a5f0cf638207b5)
| | * | Fix lib/replaceMartin Schwenke2011-11-115-3/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warnings are generated when compiling strptime.c. Why is it being compiled on Linux? strptime(3) has been in glibc for 15 years! It turns out that some of the test fragments were being looked for in lib/replace/test/ and some in lib/replace/tests/. In addition, test*/strptime.c was missing. Move the tests to lib/replace/test/ for consistency with upstream (Samba) and copy in test/strptime.c from Samba. Tweak repdir.m4 to handle the directory rename. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit aaf1ddfc83cf2ede29288baf04a1aa1c69a5cab5)
| | * | Clean up warnings: popt sure does some strange thingsMartin Schwenke2011-11-113-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | popt generates 4 compiler warnings with GCC 4.6. There are 2 different types: * 3 instances of: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] One occurs in the _free() hack that is used to try and avoid a compiler warning. I guess GCC got smarter? ;-) The other is where an array of constant strings is passed to execvp(2), which arguably has the wrong type, since it has no need to modify the strings. Both of these can be worked around by casting to intptr_t before casting to the desired argument type. In poptReadConfigFile() the variable file is declared to be a constant string. However, it is then passed to read(2) straight away and an attempt is made to cast away the "const". However, to protect the value the of file is assigned to (const char *) chptr before it is passed to any other functions, so this protects the value anyway. I'm not sure exactly what the thinking was here... but there seems to be no use having file be constant. * 1 instance of: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] for the result of an execvp(2) call. Recast the return type to void. However, due to some #if-fu in the function, that can make rc unused in this function. So we also need to wrap the declaration of rc in some corresponding #if-fu to make it disappear if not used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ac9236e64bd0b61740cc787819a1222bc6a67d4a)
| | * | Clean up warnings: add -Wno-format-zero-length to CFLAGSMartin Schwenke2011-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's an empty string passed to ctdb_event_script_callback() for eventscript option arguments in ctdb_start_daemon() and this generates a warning. This type of warning seems pointless so let's switch it off. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 23c164926c5ec4da6d90a5bdcbf2d0100729b451)
| | * | Clean up warnings: -Wunused-but-set-variable in tevent_signal.cMartin Schwenke2011-11-101-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have sent this upstream to Samba. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 080edee3d053d770466ebcc976eb1135c80feef8)
| | * | Clean up warnings: remove unused function dump_packet()Martin Schwenke2011-11-091-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c22e201be15e7d5b788c2f5f7916b553e0faaa2a)
| | * | Clean up warnings: remove unused variable alen from scsi_ioMartin Schwenke2011-11-091-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79d31660c7e612f0290fd085203856ad9e70b26f)
| | * | Clean up warnings: remove set but unused variable from rb_testMartin Schwenke2011-11-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d0244fec8d0dd2abd31a8677e2c2b254b030c47b)
| | * | Clean up warnings: log some unchecked return codes from function callsMartin Schwenke2011-11-093-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * | Fix typo in ctdb_ltdb_store_server()Martin Schwenke2011-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * | Clean up warnings: remove changed_flags in monitor_helperMartin Schwenke2011-11-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3e4fa518f02db75e4e4a7f326a71df226913f8a8)
| | * | Clean up warnings: ‘tevent_loop_allow_nesting’ is deprecatedMartin Schwenke2011-11-092-1/+8
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | CTDB wants to use these functions but Samba's tevent wants to mark them deprecated. This adds a #define to shut up the warnings and sets it in CFLAGS. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 788cdbddbc902a5b076d23473450065b551d274d)
| * / Eventscripts: Add special -ECANCELED status for monitor events that are ↵Ronnie Sahlberg2011-11-182-1/+14
| |/ | | | | | | | | | | | | | | | | | | 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)
| * SRVID ranges: Change the ranges for SRVIDs to allow 8 bit prefixesRonnie Sahlberg2011-11-091-12/+18
| | | | | | | | | | | | | | | | | | | | Update the ranges used for SRVID allocation to allow 8 bit prefixes and thus 56 user-defined bits. Define the defacto-use of the 0x00 prefix as a SRVID used to register a process id Upgrade SAMBA/iSCSI/NFS/TEST from a 32 bit prefix each ot a 8 bit prefix each for private use. (This used to be ctdb commit 5de9ec2bdf8067406165bc470becdca87f458ae9)
| * Nagios plugin for CTDBMathieu Parent2011-11-082-0/+315
| | | | | | | | | | | | | | This plugin is GPL2 or greater as generally found in Nagios. (this is obviously compatible with GPL3 or greater). (This used to be ctdb commit df1ac1cfd65f32743ca2588edfdad46ce5a4f03f)
| * config can be in /etc/default/ instead of /etc/sysconfig/ (ctdb_gnostics part)Mathieu Parent2011-11-081-2/+5
| | | | | | | | (This used to be ctdb commit b6a9dacefd8f031677702f0fbf6b321beb4c4d54)
| * config can be in /etc/default/ instead of /etc/sysconfig/Mathieu Parent2011-11-083-3/+15
| | | | | | | | | | | | | | | | ... on Debian system and derivated. (ctdb_diagnostics still hardcodes /etc/sysconfig/) (This used to be ctdb commit 1341329f6125d491b82c873f793af819e677f714)
| * config/functions: CTDB_VARDIR is /var/lib/ctdb on Debian-like systemsMathieu Parent2011-11-081-1/+5
| | | | | | | | (This used to be ctdb commit 56160eccb62178f645b017b1257677a1e854b2bc)
| * New version 1.12Ronnie Sahlberg2011-11-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Tue Nov 8 2011 : Version 1.12 - Add new tunable : AllowClientDBAttach that can be used to stop client db access during maintenance operations - Updated logging for interfaces that are missing or dont exist but are configured to be used. - Add timeout argument to ctdb_cmdline_client - PDMA support - Initial support for 'readonly' delegations for ctdb databases This will when finished greatly improve performance for contended hot records that are used for just read-access. - New 'ctdb cattdb' command - Massive updates to tests and eventscripts - LCP2 ip allocation algorithm - Record Fetch collapse. Collapse multiple fetch-lock requests from cients to a single network fetch and defer other concurrent requests until the initial fetch completes, and then service the deferred calls locally. This will greatly improve performance for contended hot records where clients request write-locks. (This used to be ctdb commit bda24b7f313289404b68ce8b9177fbd6b6a05dd7)
| * Record Fetch Collapse: Collapse multiple fetch request into one single request.Ronnie Sahlberg2011-11-083-0/+222
| | | | | | | | | | | | | | | | 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)
| * Merge remote branch 'martins/lcp2fix'Ronnie Sahlberg2011-11-085-70/+318
| |\ | | | | | | | | | (This used to be ctdb commit 7c02d242af552aa732f5c70ea4eeefbc8a8542e2)
| | * Tests - IP allocation - add some extra output due to recent fixMartin Schwenke2011-11-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent fix made the LCP2 algorithm try harder find a candidate source node. The debug output shows extra output because it is trying harder so we accommodate that. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9a6f918bf6db79c1f8c53c0df23d47b73c117ea2)
| | * LCP IP allocation algorithm - try harder to find a candidate source nodeMartin Schwenke2011-11-021-23/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * Tests - IP allocation - new test that shows current LCP2 failureMartin Schwenke2011-11-011-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 4 IPs across 2 nodes and 2 addresses across 2 other nodes. If one of the latter nodes is unhealthy and then becomes healthy again, an IP isn't failed back. This is because the nodes in the 1st group are >= unbalanced then the nodes in the 2nd group. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1d26e7cff6292fcbf63efc4628ffbb63b6f1f73c)
| | * Tests - Allow some tests in ctdb_takover_tests to specify allowed nodesMartin Schwenke2011-11-011-21/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mainly applies to ctdb_takeover_run_core when you might want to specify that some IPs can only be hosted by some nodes. Syntax on each line is now: IP current_pnn allowed_pnns where allowed_pnns is a comma-separated list. allowed_pnns is optional. If not specified then address can be assigned to all nodes that aren't included in an allowed_pnns list. Just think of it as all PNNs and that the behaviour is undefined when you only specify allowed_pnns for some IPs. ;-) current_pnn is optional and defaults to -1. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ed83604da82ebe566d6eb330ab7119e861e853c8)
| | * Tests - IP allocation tests - must export CTDB_LCP2.Martin Schwenke2011-11-011-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a97f19d1281eaf9874e64995a43524aeed315515)
| | * LCP IP allocation algorithm - new function lcp2_failback_candidate()Martin Schwenke2011-11-011-48/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-masterRonnie Sahlberg2011-11-088-48/+110
| |\ \ | | | | | | | | | | | | (This used to be ctdb commit d772743e9a4d4d40eb95cd8d5178708e77057b79)
| | * | RB_TREE: Add mechanism to abort a traverseRonnie Sahlberg2011-11-088-48/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | Fix some typosVolker Lendecke2011-11-022-3/+3
| | |/ | |/| | | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit f24e943eb7d8b86ce6b32ae37e3884ec4af0f7df)
| * | Merge remote branch 'ddiss/master_pmda_namespace'Ronnie Sahlberg2011-10-312-37/+37
| |\ \ | | | | | | | | | | | | (This used to be ctdb commit 6dbbc86f36a1fd07d90ca947a35ad7b1f8554636)
| | * | pmda: Use upstream assigned PCP domain idDavid Disseldorp2011-09-142-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | Also use saner PMIDs in the pmns file. (This used to be ctdb commit dcf150f8165316fefd53f9eecb1437195e631da6)
| * | | Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-masterRonnie Sahlberg2011-10-282-43/+51
| |\ \ \ | | | |/ | | |/| | | | | (This used to be ctdb commit bdcaf531e07ad5a08841aab2f396849c554a0fa6)
| | * | Tests: convert test tool for fetching a readonly lock to libctdbRonnie Sahlberg2011-10-282-43/+51
| | | | | | | | | | | | | | | | (This used to be ctdb commit 18b6969dd1760521f839e5a928f1c7e9b3c34d4e)
| * | | Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-masterRonnie Sahlberg2011-10-281-0/+7
| |\| | | | | | | | | | | | | | (This used to be ctdb commit 996aa01af9b402d2cd07c6942fdcc5ffc111ca85)
| | * | libctdb: dont allow ctdb_writerecord() for readonly recordsRonnie Sahlberg2011-10-281-0/+7
| | | | | | | | | | | | | | | | (This used to be ctdb commit c930a44731d24b3bb51851864c7cdd0061483c0b)
| * | | Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-masterRonnie Sahlberg2011-10-281-0/+7
| |\| | | | | | | | | | | | | | (This used to be ctdb commit 0474a9244c6721f85955efcbdd630c0e5990e76c)