summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * ctdbd: unimplement the unused SET_DMASTER controlMichael Adam2013-04-174-56/+4
| | | | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 2e92deef5221ee651028ef87138b3113f1fece91)
| * recoverd: remove bogus comment "qqq" from "add prototype new banning code"Michael Adam2013-04-171-1/+0
| | | | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 9f01b8db72780acf2f88f1392bc0a796dd4c6176)
| * build: silence building of porting_testMichael Adam2013-04-171-1/+1
| | | | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit e96acf19b4d1e0f951ab92b88869a01ff06398be)
| * traverse: Ensure backward compatibility for CTDB_CONTROL_TRAVERSE_ALLAmitay Isaacs2013-04-171-12/+31
| | | | | | | | | | | | | | | | | | | | This makes sure that CTDB_CONTROL TRAVERSE_ALL is compatible with older versions of CTDB (i.e. 1.2.39 and 1.2.40 branches). Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 5808f0778b39b79ab7a5c7f53ad27947131386ec)
| * traverse: Add CTDB_CONTROL_TRAVERSE_ALL_EXT to support withemptyrecordsAmitay Isaacs2013-04-174-0/+63
| | | | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit e691df43d20871468142c8fb83f7c7303c4ec307)
| * tests: Fix typo in variable nameAmitay Isaacs2013-04-151-1/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 043e18a8324ccb2c8ddd7b323ebedb5b0de1298d)
| * tools/ltdbtool: Fix handling of -e optionAmitay Isaacs2013-04-081-3/+6
| | | | | | | | | | | | | | | | Also, include description of -e option in usage. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 35264e42ade4676468cf7713fa339c784e932953)
| * recoverd/takeover: Use IP->node mapping info from nodes hosting that IPAmitay Isaacs2013-04-081-1/+7
| | | | | | | | | | | | | | | | | | | | When collating IP information for IP layout, only trust the nodes that are hosting an IP, to have correct information about that IP. Ignore what all the other nodes think. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1c7adbccc69ac276d2b957ad16c3802fdb8868ca)
| * statd-callout: Make sure statd callout script always runs as rootAmitay Isaacs2013-04-084-1/+10
| | | | | | | | | | | | | | | | | | | | | | In RHEL 6+, rpc.statd runs as "rpcuser" instead of root as on RHEL 5. This prevents CTDB tool commands talking to daemon since "rpcuser" cannot access CTDB socket. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fe8c4880b371492a38554868d4ca10918c54e412)
| * client: Set the socket non-blocking only after connect succeedsAmitay Isaacs2013-04-052-6/+6
| | | | | | | | | | | | | | | | | | | | | | If the socket is set non-blocking before connect, then we should catch EAGAIN errors and retry. Instead of adding a random number of retries, better to wait for connect to succeed and then set the socket to non-blocking. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 524ec206e6a5e8b11723f4d8d1251ed5d84063b0)
| * Revert "client: handle transient connection errors"Amitay Isaacs2013-04-051-30/+5
| | | | | | | | | | | | | | | | | | This reverts commit dc0c58547cd4b20a8e2cd21f3c8363f34fd03e75. There is a simpler solution that retrying random number of times. Do not set socket non-blocking till connect succeeds. (This used to be ctdb commit 74acc2c568300ef42740cf11299a1b2507047f60)
| * common/messaging: Use the jenkins hash in ctdb_messageVolker Lendecke2013-04-051-1/+3
| | | | | | | | | | | | This give a better hash distribution (This used to be ctdb commit f7f8bde2376f8180a0dca6d7b8d7d2a4a12f4bd8)
| * common/messaging: use tdb_parse_record in message_list_db_fetchVolker Lendecke2013-04-051-11/+17
| | | | | | | | | | | | This avoids malloc/free in a hot code path. (This used to be ctdb commit c137531fae8f7f6392746ce1b9ac6f219775fc29)
| * common/messaging: Abstract db related operations inside db functionsAmitay Isaacs2013-04-051-57/+39
| | | | | | | | | | | | | | | | | | This simplifies the use of message indexdb API and abstracts tdb related code inside the API. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit bf7296ce9b98563bcb8426cd035dbeab6d884f59)
| * common/messaging: Don't forget to free the result returned by tdb_fetch()Amitay Isaacs2013-04-051-0/+6
| | | | | | | | | | | | | | | | This fixes a memory leak in the messaging code. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 20be1f991dd75c2333c9ec9db226432a819f57ba)
| * common/messaging: Free message list header if all message handlers are freedAmitay Isaacs2013-04-051-3/+3
| | | | | | | | | | | | | | | | | | | | This makes sure that even if the srvids are not deregistered, the header structure is freed when the last message handler has been freed as a result of client going away. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 4e1ec7412866f2d31c41de1bec0fbf788c03051b)
| * build: Fix for tevent autoconf checkSumit Bose2013-03-271-1/+1
| | | | | | | | | | | | The list of include files is the 4th argument of AC_CHECK_DECLS. (This used to be ctdb commit 85b777196289646ca37e06ebbf1f7a684d0aabc5)
| * util: Add hex_decode_talloc() to decode hex string into a binary blobAmitay Isaacs2013-03-252-0/+17
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 307416afda707b687f5e89e8438e45c154a4c806)
| * logging: Do not ignore stdout/stderr from the exec'd childrenAmitay Isaacs2013-03-251-5/+0
| | | | | | | | | | | | | | | | | | | | To log debugging information from child processes that are started with vfork and exec, do not set close_on_exec on STDOUT and STDERR for that process. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 08c53ee609b80f87450a7a1d7dd24fbcdf5ab7bc)
| * server:persistent: fix a debug message (copy'n'paste error)Michael Adam2013-03-121-2/+3
| | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 87c89b7c2a14e2ee79a3efc7e8125842bc04bf23)
| * fix a typoVolker Lendecke2013-03-121-1/+1
| | | | | | | | | | | | Reviewed-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 98abd344342a011a8599411deae79f94abc09541)
| * common/io: For scheduling immediate events use tevent_schedule_immediateAmitay Isaacs2013-03-061-11/+15
| | | | | | | | | | | | | | | | | | | | tevent_schedule_immediate() is much more efficient at handling events that need to be processed immediately rather than creating timed events with timeval_zero(). Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 11734be353a1e246163eda631d35dfe55d1d6fb1)
| * ctdbd: Add an index db for message list for faster searchesAmitay Isaacs2013-03-063-23/+203
| | | | | | | | | | | | | | | | | | | | | | When CTDB is busy with lots of smbd, CTDB was spending too much time in daemon_check_srvids() which searches a list of srvids in the registered message handlers. Using a hash based index significantly improves the performance of search in a linked list. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 3e09f25d419635f6dd679b48fa65370f7860be7d)
| * tools/ctdb: delip no longer fails if IP can not be movedMartin Schwenke2013-02-271-76/+83
| | | | | | | | | | | | | | | | | | | | | | | | Moving the IP is an optimisation so should not cause failure. Refactor and simplify the retry-move-IP into new function try_moveip(). Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 5402f85dde045576cbaf64e01c68e28ed52204e8)
| * server:persistent: fix a comment typo.Michael Adam2013-02-221-1/+1
| | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 6455ce5e4980a63d56ed30f7059869c8356c12ea)
| * recoverd: update_capabilities() should use connected nodesMartin Schwenke2013-02-201-1/+1
| | | | | | | | | | | | | | | | | | ... as the comment says... not just active nodes. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 4f71dca8df19a63f198e2d6d59e605b49ec5e803)
| * client: Refactor node listing functions to use list_of_nodes()Martin Schwenke2013-02-201-81/+5
| | | | | | | | | | | | | | | | | | This reduces repetition. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit f505020a5720faa4ecc6414e0bfaa6b3c0e47291)
| * client: New generic node listing function list_of_nodes()Martin Schwenke2013-02-202-0/+43
| | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a73bb56991b8c07ed0e9517ffcf0dc264be30487)
| * common/io: Rewrite socket handling code to read all available dataAmitay Isaacs2013-02-191-68/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | This improves the processing of packets considerably. It has been observed that there can be as many as 10 packets in the socket buffer and the current code of reading a single packet from a socket at a time is not very optimal. This change reads all the bytes from socket buffer and then parses to extract multiple packets. If there are multiple packets, set up a timed event to process next packet. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit d788bc8f7212b7dc1587ae592242dc8c876f4053)
| * doc: Fix typo in ctdbd manpageMartin Schwenke2013-02-151-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 855ab348901edb3ec1327499a43f509d279b8182)
| * ctdbd: Fix the PullDBPreallocation size to 10MB as intendedAmitay Isaacs2013-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | In 1f262deaad0818f159f9c68330f7fec121679023, Ronnie changed recovery code to allocate chunks of 10MB in traverse_pulldb() and traverse_recdb(). The tunable PullDBPreallocation size was set to 100MB. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit e204fac03412520e877ab04363b3ece02667c55b)
| * eventscripts: Remove calls to "smbstatus -np" for samba cleanupAmitay Isaacs2013-02-111-29/+3
| | | | | | | | | | | | | | | | | | | | This is an artifact from older versions of Samba. In the newer versions of Samba, "smbstatus -np" command does not do anything useful, but causes a traverse in CTDB which is expensive and causes CPU utilization to shoot up. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 053b89c6dbce47001505524606889334559d2ec4)
| * Logging: Fix breakage when freeing the log ringbufferMartin Schwenke2013-02-074-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a82d3ec12f0fda16d6bfa8442a07595de897c10e broke fetching from the log ringbuffer. The solution there is still generally good: there is no need to keep the ringbuffer in children created by ctdb_fork()... except for those special children that are created to fetch data from the ringbuffer! Introduce a new function ctdb_fork_no_free_ringbuffer() that does everything ctdb_fork() needs to do except free the ringbuffer (i.e. it is the old ctdb_fork() function). The new ctdb_fork() function just calls that function and then frees the ringbuffer in the child. This means all callers of ctdb_fork() have the convenience of having the ringbuffer freed. There are 3 special cases: * Forking the recovery daemon. We want to be able to fetch from the ringbuffer there. * The ringbuffer fetching code. Change the 2 calls in this code (main daemon, recovery daemon) to call ctdb_fork_no_free_ringbuffer() instead. While we're here, clear the log ringbuffer when the recovery deamon is forked, since it will contain a copy of the messages from the main daemon. Note to self: always test... even the most obvious patches... ;-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 00db5fa00474f8a83f1aa3b603fd756cc9b49ff4)
| * Fix a comment typoVolker Lendecke2013-02-061-1/+1
| | | | | | | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit b940e3a24daa73ca9b2896b7a449240136442b53)
| * initscript: export CTDB_EXTERNAL_TRACEMartin Schwenke2013-02-051-1/+1
| | | | | | | | | | | | | | | | | | This means it can be set like any other configuration option in the configuration file, without needing to export it there. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a0ef73e197dc9147f7718e0813fe803ff0b3d54d)
| * ctdbd: Don't use a fixed length buffer for the hung script commandMartin Schwenke2013-02-051-2/+4
| | | | | | | | | | | | | | | | | | The amount of data to write into the buffer wasn't constrained anywhere... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9b0d56b16775aa16f33bdfdf831256e085fa3339)
| * ctdbd: Complain loudly if CTDB_DEBUG_HUNG_SCRIPT script isn't executableMartin Schwenke2013-02-051-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is quite easy to misconfigure by failing to set the execute bit on the script. Better to complain loudly. This is a debugging facilty rather than core CTDB functionality, so it doesn't need a subtle mechanism to disable it at run-time. To disable the designated script at run-time either edit it to put an "exit 0" at the top or move it aside and symlink to /bin/true. This is implemented by actually removing the code that checks that the file exists and is executable. The output from the shell when the system() function fails is just as useful. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3400b2ed34b6eb9496eb55f1aab6f89d2952060d)
| * ctdbd: Remove command-line option --debug-hung-scriptMartin Schwenke2013-02-054-28/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an environment variable instead. This just means that the initscript exports CTDB_DEBUG_HUNG_SCRIPT and the code checks for the environment variable. The justification for this simplification is that more debug options will be arriving soon and we want to handle them consistently without needing to add a command-line option for each. So, the convention will be to use an environment variable for each debug option. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0581f9a84e58764d194f4e04064c2c5b393c348b)
| * ctdbd: Remove debug_hung_script_ctxMartin Schwenke2013-02-052-4/+1
| | | | | | | | | | | | | | | | | | | | The only allocation against this context is by ctdb_fork_with_logging(). This memory is freed by ctdb_log_handler() anyway. There should be no memory leak. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 501461cc3e132d4adee9e91b5d4513a26bae2846)
| * ctdbd: Message logged at exit should be different for different processesMartin Schwenke2013-02-051-1/+5
| | | | | | | | | | | | | | | | | | | | Some subprocesses print "CTDB daemon shutting down" when they exit and this can be confusing. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit f1ffe1112b7e342d7f1228ca816a8e5918f893cf)
| * daemon: Make sure all the traverse children are terminated if traverse times outAmitay Isaacs2013-02-051-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When traverse times out, callback function is called with key and data set to tdb_null. This is also the way to signal end of traverse. So if the traverse times out, callback function treats it as traverse ended and frees state without calling the destructor. Keep track if the traverse timed out, so callback function can take appropriate action for traverse timeout and traverse end. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 35da9a7c2a0f5e54e61588c3c3455f06ebc66822)
| * Logging: Free the ringbuffer in child processes created with ctdb_fork()Martin Schwenke2013-02-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | At the moment the log ringbuffer is duplicated in every child process. Althought it is copy-on-write we want to see if it is contributing to out-of-memory situations when there are a lot of children. The ringbuffer isn't accessible from any of the children anyway... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a82d3ec12f0fda16d6bfa8442a07595de897c10e)
| * Logging: New function ctdb_log_ringbuffer_free()Martin Schwenke2013-02-052-2/+9
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a4f622e85168f59417c11705f1734e0352e1d44a)
| * build: Fix a Makefile.in typoMartin Schwenke2013-02-051-1/+1
| | | | | | | | | | | | | | | | Objects are named *.o ;-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 25a20409fb39a94b64c13990c0eba4f75d482ecd)
| * tools/ctdb: Fix a compiler warningMartin Schwenke2013-02-041-1/+1
| | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit d1ec06d30148e6fd344625a2fbf1c22391bd908a)
| * recoverd: Fix printing of node flags from local informationAmitay Isaacs2013-01-231-1/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 124e2a471aeda9c900fd898178a30522d7d74221)
| * common: Don't lie on unimplemented gratuitous arpMathieu Parent2013-01-224-5/+5
| | | | | | | | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> (This used to be ctdb commit b054193d1d19a8eef998fa690899501f79badb8a)
| * tests: Test portabilityMathieu Parent2013-01-222-0/+310
| | | | | | | | | | | | | | | | Curiously test_ctdb_sys_check_iface_exists fails on Linux Signed-off-by: Mathieu Parent <math.parent@gmail.com> (This used to be ctdb commit 109f428aa34f8f4cc0329880d2f4a5593a6cc6f3)
| * common: FreeBSD+kFreeBSD: Implement get_process_name (same as in Linux)Mathieu Parent2013-01-222-3/+30
| | | | | | | | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> (This used to be ctdb commit 258092aaf6b7a9bdc14f0fb35e8bd7f7dc742b3f)
| * common: Detailed platform-specific FIXMEMathieu Parent2013-01-224-18/+22
| | | | | | | | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> (This used to be ctdb commit d202b2fdd4fd70172e5e44583627b57a1b7ad2ed)