summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * scripts: Simplify script_log() to just look at CTDB_SYSLOG variableMartin Schwenke2013-10-221-6/+1
| | | | | | | | | | | | | | | | | | The old logic was actually wrong. If CTDB_LOGFILE is unset then a default is used, not syslog. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79e2029f9bc078126e865aa715100a3870c7604b)
| * scripts: Remove support for CTDB_OPTIONS configuration variableMartin Schwenke2013-10-224-24/+8
| | | | | | | | | | | | | | | | | | | | | | Allowing people to put random options in CTDB_OPTIONS complicates some logic (particularly around use of syslog). If we're going to have variables for options then let's make sure we have a variable for each option and make people use them. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e55f3a1577eff0182802b0341d865d961aeae1c7)
| * scripts: Remove unused configuration variable CTDB_MANAGES_SCPMartin Schwenke2013-10-221-1/+0
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bda0da41aaf629a252cc361b73ebc5328f26ed04)
| * eventscripts: Deprecate NFS_SERVER_MODE, use CTDB_NFS_SERVER_MODE insteadMartin Schwenke2013-10-224-4/+4
| | | | | | | | | | | | | | | | All CTDB configuration variables should start with CTDB_. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f12658aff125996ae45eea23241d8c3d0567b893)
| * recoverd: Remove function reload_nodes_file()Martin Schwenke2013-10-221-11/+2
| | | | | | | | | | | | | | | | | | It is a 1 line wrapper around ctdb_load_nodes_file(), so use that instead. We need less code... :-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4a5d5935f4410a93a3343d85a24dbcddae2c4c20)
| * Revert "null out the pointer before we reload the nodes file"Martin Schwenke2013-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 4b0f32047e8bece0a052bdbe2209afe91b7e8ce3. This is not necessary. It just causes a memory leak. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 25fd05505f61dc595c0ef25bb6e332274d5530e8)
| * client: Fix a format string argument compiler warningMartin Schwenke2013-10-221-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f3413fb8b90c4d9f0c2c2a69825c66d080117193)
| * recoverd: Ignore failed flag updates on inactive nodesAmitay Isaacs2013-10-221-2/+6
| | | | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-programmed-with: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 484c46eaae056480baf050fd91868f2fd0537985)
| * common/util: Use AIX specific code for setting high priority for CTDB daemonAmitay Isaacs2013-10-222-3/+54
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 7764cf67a61bbf1caad5aa8e2d75a262b9da654c)
| * git: Ignore generated documentation filesMartin Schwenke2013-10-221-0/+2
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b9af66032f3d96f2fe12b7a4fcc5e71d4a282365)
| * tests: When running local tests with run_tests.sh, use fixed TEST_VAR_DIRMartin Schwenke2013-10-221-0/+6
| | | | | | | | | | | | | | | | Otherwise we end up with lots of useless temporary directories. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 63924ff372b066cd878b79e71f06de4c24c814a2)
| * eventscripts: Fix comment - CTDB_TCP_PORT_CHECKS -> CTDB_TCP_PORT_CHECKERSMartin Schwenke2013-10-221-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0a79ba2f1277a776347e2c3f04ce8419e0be62de)
| * tests/integration: Tweak ctdbd startup optionsMartin Schwenke2013-10-221-5/+1
| | | | | | | | | | | | | | | | | | | | * --public-interface is not needed * Add --sloppy-start to speed up restarts Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d0dec5b8e60316701fdd02150c4dd8f01aacbfda)
| * recoverd: Fix the VNN lmaster consistency checkMartin Schwenke2013-10-221-5/+11
| | | | | | | | | | | | | | | | | | It does cope with node that don't have the lmaster capability. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 588172bcb6bf267339e2bd09e23d2c4904a27a41)
| * tests: If transaction_start fails, try againAmitay Isaacs2013-10-081-1/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ed7d999214ee009e480c26410a04fa105028cb8e)
| * tests: Make sure test exits with zero status on successful completionAmitay Isaacs2013-10-081-2/+5
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit af4b6b8b3222d2a3c425fcc6833db579d0cd7ffa)
| * tests: Re-enable transaction test codeAmitay Isaacs2013-10-041-3/+0
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 929045335212e825deb645cc6c7f97b8a40fdbb3)
| * tools/ctdb: Remove setdbseqnum commandAmitay Isaacs2013-10-041-86/+0
| | | | | | | | | | | | | | | | | | | | This command was added to test persistent database recovery with sequence numbers. With the new persistent transaction code, sequence numbers get updated automatically, so there is no need for this command. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 14bfd22fad1a5fd27eede1be7fccbaed9466e13e)
| * tests: No need to set sequence number when modifying persistent databaseAmitay Isaacs2013-10-041-10/+2
| | | | | | | | | | | | | | | | | | With the new persistent transaction code, sequence numbers will be automatically updated whenever a record is updated. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 961dd5d0acbb971756944ea9f69992020ea7d9fc)
| * client: Remove old persistent transaction codeAmitay Isaacs2013-10-041-445/+0
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 41bdbcfd72092cdd25da87e60689c087bca97933)
| * client: Reimplement persistent transaction code using TRANS3_COMMITAmitay Isaacs2013-10-042-5/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementing persistent trasnaction code from Samba. Persistent transaction code was reimplemented in Samba using g_lock.tdb to hold transaction locks and using TRANS3_COMMIT control. Implementation details: 1. When starting a transaction, create a record with "transaction-<dbid>" as key and store current server_id in the structure. 2. If a record already exists, some other client has already started a transaction. Verify that the process corresponding to server_id stored in the record really exists or it's a stale record and overwrite it. 3. All modifications to the actual persistent database are stored in a marshal buffer. 4. When transaction is committed, read the sequence number of the persistent database and increment it. Sequence number record is also stored in the marshal buffer. 5. Send the changed records (marshal buffer) in TRANS3_COMMIT control to all the active nodes. 6. If all controls succeed, verify that the sequence number has been incremented. Commit is successful. If any of the controls fail, abort the transaction. 7. In case sequence number has not yet been incremented, then database recovery has been triggered. So repeat from step 5. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 4e0f1971792c9431d8d51dc57d54ecc9e4576dd5)
| * client: Add functions to parse g_lock.tdb recordsAmitay Isaacs2013-10-041-0/+198
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 40589ae5259880431f358250c1f0d07bcaa21d1f)
| * client: Add functions to handle server_id structureAmitay Isaacs2013-10-041-0/+66
| | | | | | | | | | | | | | | | server_id records are stored in g_lock.tdb for persistent transactions. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 55f91ea4373c54ddb5faad87fa2826d86a4b6172)
| * ctdbd: Remove transaction code related to TRANS2 commitsAmitay Isaacs2013-10-045-323/+4
| | | | | | | | | | | | | | | | | | This removes data types and structure elements related to TRANS2 persistent transaction code. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 22a253b7ccf1ff854cddf0b67969dc84d7d6a654)
| * ctdbd: Deprecate TRANS2 commit controlsAmitay Isaacs2013-10-042-12/+11
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 7d176352986317e63696d74252ff5d8eccb2fee5)
| * ctdbd: Create a utility function to log error for "not implemented" controlsAmitay Isaacs2013-10-041-4/+15
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 3c892ea1b5aa42686adb82ce29b9fcfdf9d204a1)
| * include: Remove unused set_dmaster structureAmitay Isaacs2013-10-041-6/+0
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 2ce3a48cc969d563c26dd295723416c0d7b077a2)
| * tests/tool: Remove references in libctdb in file and function namesMartin Schwenke2013-10-047-62/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main changes are: libctdb_test.c -> ctdb_test_stubs.c ctdb_tool_libctdb.c -> ctdb_functest.c ctdb_tool_stubby.c is gone, replaced with existing ctdb_test.c. Functions starting with "libctdb_test_" now start with "ctdb_test_stubs_". Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 6182bd0c19f215a997efe5272e633b1b1bd0c882)
| * tests/tool: Rework test programs so they no longer expect libctdbMartin Schwenke2013-10-044-285/+291
| | | | | | | | | | | | | | | | Instead, override controls using preprocessor magic. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 10aac42f30cc0d56dca42ece17d04ccbc321056d)
| * tests/tool: Fix some comment typosMartin Schwenke2013-10-042-2/+2
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 59bd4ede15a5958b87e0d253461eb9111885bd2f)
| * tools/ctdb: Stop return value from being clobbered in control_lvsmaster()Martin Schwenke2013-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | ret is initialised too early and is clobbered by the call to ctdb_ctrl_getcapabilities(). Initialising it later means that the function returns -1 when no LVS master is found. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3296559c43e70f755fcf2c06677891e0319c8142)
| * client: Fix some format string compiler warningsMartin Schwenke2013-10-041-2/+4
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5619754343003016ede27014567dbb4701f97928)
| * common: Fix setting of debug level in the client codeAmitay Isaacs2013-10-041-0/+7
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 299fa487549e36572b757852d21471f9e23f6e8f)
| * libctdb: Remove incomplete libctdbAmitay Isaacs2013-10-0442-6319/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit c5a7f2b4ff011e1393c4ff34864f85e6b472ff07)
| * tools/ctdb: Pass memory context for returning nodes in parse_nodestringAmitay Isaacs2013-10-042-8/+9
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1585a8e275b0143e5e46311b3d5e9785119f735f)
| * tests: Do not use libctdb code in testsAmitay Isaacs2013-10-043-54/+24
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ae0d8f432ef98a72c85a6cd42c503b718bef0e4e)
| * tools/ctdb: Do not use libctdb for commandline toolAmitay Isaacs2013-10-042-109/+202
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit cd66282c635cf53386d8970b89c895076ea21cbd)
| * client: Add ctdb_ctrl_getdbseqnum() functionAmitay Isaacs2013-10-042-0/+36
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 8cb1fbbfe88327c9c7ab68e8eded586dff611e57)
| * client: Add ctdb_ctrl_getdbstatistics() functionAmitay Isaacs2013-10-042-0/+56
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1e7fca5cdc1d7205cf084e35aace1a5dc46ea294)
| * client: Add ctdb_client_check_message_handlers() functionAmitay Isaacs2013-10-042-1/+38
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit c9a9d14c91f203ce964a426a8a1e2c1715af2098)
| * client: Remove extra whitespacesAmitay Isaacs2013-10-041-3/+2
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 962eb63c6d500e29a03ae087757d81be449888c6)
| * tests: Remove unused test program ctdb_fetch_lock_onceAmitay Isaacs2013-10-042-153/+2
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 873b9cadbcc363a9e5f450b0a1feb1cf2ce1e6c9)
| * tools/ctdb: When printing TDB data as a string, use correct length of the stringAmitay Isaacs2013-10-041-1/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit d94a10f93a0925b17458d009e604966666b3d880)
| * tools/ctdb: Remove un-implemented ctdb vacuum commandAmitay Isaacs2013-10-042-10/+0
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 8b238852884004a56f76a1762199c338864d1249)
| * tests: Add a simple test to test cluster wide database traverseAmitay Isaacs2013-09-261-0/+73
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 713c9ecc791e3319a2d109838471833de5a158c8)
| * traverse: Send traverse end record from traverse child processAmitay Isaacs2013-09-251-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traverse records are sent directly from traverse child process, but the last empty record signalling end of traverse is sent from ctdbd. This creates a race condition between ctdbd and traverse child. There are two fds from traverse child to ctdbd - a pipe to track status of the child process and unix socket connection for sending records. It's possible that last few records are sitting in unix socket buffer when ctdbd reads the status written from traverse child. This will be interpreted as end of traverse and ctdbd will send the last empty record to originating node before it has processed the pending packets in unix socket connection. The race is avoided by sending the last empty record marking end of traverse from the child process. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 37e22fc3ac3eb64732f2e67058f5b7b06c093fbf)
| * traverse: Wait till all data has been flushed from output queueAmitay Isaacs2013-09-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To improve the traverse performance, records are directly sent from traverse child process to the originating node. Make sure that all the data is sent via socket, before informing ctdbd that traverse is complete. Without waiting for all the packets to be flushed from the queue, child process can incorrectly signal ctdbd that traverse has ended. This will cause the pending records in the queue never to make it to the originating node and traverse information will not be complete. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 482ac708cb79cb6378d814a79c2cf13f88435bc4)
| * traverse: Use ctdb local variable for convenienceAmitay Isaacs2013-09-251-3/+3
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 25e9cf86328252f96215b54b94551dd7bbdd2db4)
| * traverse: Check if local traverse failed or succeededAmitay Isaacs2013-09-251-10/+32
| | | | | | | | | | | | | | | | | | | | By passing the result of tdb_traverse_read() allows ctdbd to determine if the local traverse succeeded or not. In case of a problem with local traverse, ctdbd can log an error. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit abd51a9f41ebb178c4ea4491bdedf9a9433e7232)
| * traverse: Log information when traverse starts and endsAmitay Isaacs2013-09-251-2/+11
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit e4aba8598b00a810e721de64ac44dccc9af04ab6)