summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * doc: document the --print-emptyrecords switch in the "ctdb" manpage.Michael Adam2011-11-291-0/+13
| | | | | | | | (This used to be ctdb commit 7b4663dd2454b798841815044f898dead9b734e2)
| * ctdb: add an option --print-emptyrecords to enable printing of empty records ↵Michael Adam2011-11-293-8/+34
| | | | | | | | | | | | | | | | in dumping databases this option is used with the commands catdb, cattdb and dumpdbbackup. (This used to be ctdb commit 6ec68a2e667f66d2b194fe48cb75229a2777842e)
| * client: add version ctdb_traverse_ext() of ctdb_traverse() that can list ↵Michael Adam2011-11-291-7/+28
| | | | | | | | | | | | empty records. (This used to be ctdb commit 4ada4bfc4510886c5c7fcf49e09711b9d2dcb75d)
| * traverse: add a flag to enable transferring empty records in cluster wide ↵Michael Adam2011-11-294-1/+14
| | | | | | | | | | | | | | | | | | traverse This will be useful for also printing information about empty/deleted records in "ctdb catdb", e.g. for debugging vacuuming issues. (This used to be ctdb commit ddc5da3a0df7701934404192a0a0aa659a806acb)
| * recoverd: try to become the recovery master if we have the capability, but ↵Stefan Metzmacher2011-11-291-1/+22
| | | | | | | | | | | | | | | | | | | | | | the current master doesn't metze (cherry picked from commit 6ba8af28f8a8f79db65120a97d7157dcc5c7e083) Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit ccd67cf7f26713e695000d89d9ce8cfa78bfe00f)
| * This breaks the build since the recovery loop is different in masterRonnie Sahlberg2011-11-291-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | compared to old 1.0 branches This must have been mistakenly applied to master when you intended to push for a different branch i guess. Revert "recoverd: try to become the recovery master if we have the capability, but the current master doesn't" This reverts commit a97d417aba85e901540147a4dff4794249442939. (This used to be ctdb commit c19cb751077b78cf4b6e28a1e3746d4ffedbfd68)
| * recoverd: try to become the recovery master if we have the capability, but ↵Stefan Metzmacher2011-11-261-1/+22
| | | | | | | | | | | | | | | | the current master doesn't metze (This used to be ctdb commit a97d417aba85e901540147a4dff4794249442939)
| * recoverd: let async_getcap_callback() also update ctdb->capabilitiesStefan Metzmacher2011-11-261-0/+4
| | | | | | | | | | | | metze (This used to be ctdb commit ef5b47d1183ee99c39ae63045a994d35255ac829)
| * vacuum: update (C) from vacuum rewriteMichael Adam2011-11-261-0/+2
| | | | | | | | (This used to be ctdb commit a95b524e57b861416f65baef7a0235bf7e394cef)
| * vacuum: write a big and up-to-date explaining comment for ctdb_vacuum_db()Michael Adam2011-11-261-5/+31
| | | | | | | | (This used to be ctdb commit 6b9d308985ef2363c62fde6340ad37d56f6d7702)
| * vacuum: fix a comment typo in vacuum_traverse()Michael Adam2011-11-261-1/+1
| | | | | | | | (This used to be ctdb commit 88ad1e75c686cd47aec18b0a8eb93c3b125f0e97)
| * vacuum: fix horrible indentation/whitespacing for ctdb_vacuum_event()Michael Adam2011-11-261-2/+2
| | | | | | | | (This used to be ctdb commit 0f070a65a322bd6d3240ca96a9e5c3633ef647bf)
| * vacuum: fix a comment typo in vacuum_traverse()Michael Adam2011-11-261-1/+1
| | | | | | | | (This used to be ctdb commit 39a5c0d8cca4ce5e8bc7055739a6377fb2dc36e0)
| * vacuum: fix an abundance of indentation white spaces in ctdb_vacuum_db()Michael Adam2011-11-261-2/+2
| | | | | | | | (This used to be ctdb commit 4ae564e415560cde7e4cd4c5a1d7699f3d49621b)
| * vacuum: rename "size" to "freelist_size" for clarityMichael Adam2011-11-261-8/+9
| | | | | | | | (This used to be ctdb commit 057023f5843c91d1cf8512f3675a01a119ea6157)
| * build: add target libctdb.so.0 and symlink libctdb.soMichael Adam2011-11-261-1/+15
| | | | | | | | (This used to be ctdb commit 66af6659eaffaeafbfa58779162aabe915d1c50f)
| * build: add socket_wrapper objects to test binariesMichael Adam2011-11-261-1/+1
| | | | | | | | (This used to be ctdb commit 7d4809ba343114e435830c7c1ab047dc4ce5ff0e)
| * build: add option --enable-socket-wrapper to build binaries with socket ↵Michael Adam2011-11-262-2/+5
| | | | | | | | | | | | wrapper support (This used to be ctdb commit 8d65d7f399ba2e6a4162eed5e84a58c7cb024187)
| * add socket_wrapper from sambaMichael Adam2011-11-266-0/+2981
| | | | | | | | (This used to be ctdb commit 99ce8a9de648babdfb1b1ea0219ee184c9718048)
| * libutil: Remove obsolete signal type cast.Andreas Schneider2011-11-261-5/+5
| | | | | | | | (This used to be ctdb commit 8dd377b6a4d188af086f9a5b41a1b48e44eda6f3)
| * build: add libreplace network checks to configureMichael Adam2011-11-261-0/+1
| | | | | | | | (This used to be ctdb commit 5e45a176031e973e97450296c28ddfb0a779e00b)
| * update lib/replace to current upstream version (samba master)Michael Adam2011-11-2656-540/+4301
| | | | | | | | (This used to be ctdb commit 17bcffab19fdbb435b4745ff90c327342bbbf0f8)
| * system_linux: correctly cast sockaddr_in6 to sockaddr for sendto() in ↵Michael Adam2011-11-261-1/+3
| | | | | | | | | | | | ctdb_sys_send_tcp() (This used to be ctdb commit 11bebd5367102fcd02b17c44ac87bf50d4c68785)
| * system_linux: correctly cast sockaddr_in to sockaddr in ctdb_sys_send_tcp()Michael Adam2011-11-261-1/+3
| | | | | | | | (This used to be ctdb commit cc60df5a3edebfdf50fcd22ebfaad35736f90379)
| * logging: properly cast sockaddr_in to sockaddr for sendto() in ctdb_syslog_log()Michael Adam2011-11-261-1/+3
| | | | | | | | (This used to be ctdb commit 7420d9991e30575219c919ce2a8edce20ad3eb63)
| * logging: some whitespace cleanup in ctdb_syslog_log()Michael Adam2011-11-261-2/+1
| | | | | | | | (This used to be ctdb commit b283be8658d6229314b9265ed8659d2cac573073)
| * logging: properly cast sockaddr_in to sockaddr for bind in start_syslog_daemon()Michael Adam2011-11-261-1/+3
| | | | | | | | (This used to be ctdb commit add2506caf3340118be05a21b05dd71b822b1516)
| * Merge remote branch 'martins/eventscripts'Ronnie Sahlberg2011-11-182-7/+36
| |\ | | | | | | | | | (This used to be ctdb commit 8959d15804bb5901356d7beec1ecddb1cabbca52)
| | * Eventscripts - add facility to 10.interface to delete unmanaged IPsMartin Schwenke2011-11-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a number of reasons (delip failure, admin stupidity, ...) an interface that hosts public addresses can also contain spurious, unmanaged addresses. Add functionality to 10.interfaces, controlled by new configuration variable CTDB_DELETE_UNEXPECTED_IPS, to delete these addresses when encountered as part of a monitor event. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 88f88d86b0d08240f749fb721b8c401c2eeb1099)
| | * Eventscripts - remove $0 from error messages in 40.fs_useMartin Schwenke2011-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The script name is now prepended to output by ctdbd. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bfa0fe70db195413a6d7a98f46f7a1270aba678c)
| | * Eventscripts: Make 40.fs_use use less processes and arguably clearer.Martin Schwenke2011-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * $fs can be parsed using shell prefix and suffix removal. * df output can be parsed with a single call to sed. Failure is indicated by empty output from sed, so we check for that as the error condition, changing the associated message appropriately. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c5ef0d1440f1d952784cc67946c414d149722d01)
| * | 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)