summaryrefslogtreecommitdiffstats
path: root/ctdb
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Move the default CTDB socket from /tmp to /var/run/ctdbAmitay Isaacs2013-10-254-9/+5
| | | | | | | | | | | | | | | | | Use /var/run/ctdb/ctdbd.socket because there might be other daemons that need sockets in the future. The local daemons test code to create a link for the default convenience socket has to be removed because the link can't be created as a regular user in the new location. This should be OK since all calls to the ctdb tool in the test code should be wrapped in onnode. When debugging tests, a developer will have to set CTDB_SOCKET by hand. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-programmed-with: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit dc67a4e24af9d07aead2a1710eeaf5d6cc409201)
* packaging: Move ctdb/ directory from /var to /var/libAmitay Isaacs2013-10-252-3/+4
| | | | | | | | | Introduce CTDB_VARDIR variable that points to /var/lib/ctdb by default. This makes CTDB_VARDIR consistent across C code and scripts. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 2c09aac71188f43cd592572b10ea30b7a2969678)
* ctdbd: Simplify database directory setting logicMartin Schwenke2013-10-253-64/+3
| | | | | | | | | | | | | | No need to check if the options are set. The options are always set via static defaults. No need to talloc_strdup() the values via wrapper functions. The options aren't going away. Remove now unused ctdb_set_tdb_dir() and similar functions. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1fe82f3d7b610547ff4945887f15dd6c5798a49b)
* ctdbd: Remove duplicate database directory setting logicMartin Schwenke2013-10-252-34/+5
| | | | | | | | | | | | | Defaults for ctdb->db_directory and similar variables are currently set in 2 places. Change this to set them in only 1 place and make the directories at initialisation time instead of waiting until later. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit d73d84346488a2ed54e6a86f9d7ec641c8e33ace)
* common: New function ctdb_mkdir_p_or_die()Martin Schwenke2013-10-252-0/+15
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7b971df79b0b63f83555205eacf48d49ca3a273a)
* common: New function mkdir_p()Martin Schwenke2013-10-253-4/+30
| | | | | | | | | Behaves like mkdir -p. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit afe2145d91725daf1399f0a24f1cddcf65f0ec31)
* tcp: Create socket lock in /var/run/ctdb instead of /tmpAmitay Isaacs2013-10-251-1/+1
| | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-programmed-with: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b9b9f6738fba5c32e87cb9c36b358355b444fb9b)
* doc/examples: Add CTDB configuration examplesAmitay Isaacs2013-10-244-0/+206
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 6a5469a63547029f4fc704a4d4075543e06c36d1)
* Add missing $remote_fs LSB dependencyMathieu Parent2013-10-241-2/+2
| | | | (This used to be ctdb commit a0b965bb73777dde7a4abf80c5c4742581bce520)
* Improved check_ctdbMathieu Parent2013-10-241-14/+30
| | | | | | | | | - increase verbosity with "-v" - concat error messages (if there are several) - handle 255 return code as warning (as it is the return code when any of the node is missing) - read /etc/ctdb/nodes remotely (ctdb_check can be run on a non-ctdb host) (This used to be ctdb commit cea81bdd503f6ef8b5bbd3582a8e0085bb02bc9f)
* Add missing events.d/99.timeoutMathieu Parent2013-10-242-0/+2
| | | | (This used to be ctdb commit 1f6cc8764e28058c56d0350147032b6e30cb355d)
* eventscripts: Instead of listing all tunables, query EventScriptTimeoutAmitay Isaacs2013-10-241-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 58ca2c3e7e3a27023ad86660f01a2052e2a19635)
* ctdb_client.h: fix build on AIX by removing C++-style commentsMichael Adam2013-10-231-2/+2
| | | | | | | | Reported by John P Janosik <jpjanosi@us.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 1f327401f2e181780937aa3f6c479376ff787f3f)
* ctdbd: Pass the public address file location in ctdb contextMartin Schwenke2013-10-223-6/+6
| | | | | | | | | | No need to pass it as an extra argument to ctdb_start_daemon. Also ensure options.public_address_list gets a nice static default. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a3d63a9db89d08bb284b3b3a6db773422f21b477)
* ctdbd: Debug locks by default with override from enviroment variableMartin Schwenke2013-10-221-4/+16
| | | | | | | | Default is debug_locks.sh, relative to CTDB_BASE. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c11803e3dcc905a45a08d743595e63f9ca445f0d)
* ctdbd: Default for event_script_dir should use CTDB_BASEMartin Schwenke2013-10-223-16/+10
| | | | | | | | | | Also get rid of ctdb_set_event_script_dir(). It creates an unnecessary copy of something that will be around for the lifetime of the process. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 21b4d1aba00902f1eee0cbf4f082b0794fd5b738)
* ctdbd: Add nodes_file member to struct ctdb_contextMartin Schwenke2013-10-225-24/+26
| | | | | | | | | | | | | | | | | This allows ctdb_load_nodes_file() to move to ctdb_server.c and ctdb_set_nlist() to become static. Setting ctdb->nodes_file needs to be done early, before the nodes file is loaded. It is now set from CTDB_BASE instead ETCDIR, so setting CTDB_BASE also needs to be done earlier. Unhack ctdbd_test.c - it no longer needs to define ctdb_load_nodes_file(). Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 20e705e63bd3b20837cc3ac92fdcf2a9650ccfc8)
* tools/ctdb: CTDB_BASE is the default location of configuration filesMartin Schwenke2013-10-221-2/+15
| | | | | | | | | | | Ensure that environment variable CTDB_BASE is set. Update defaults for nodes and natgw_nodes to use CTDB_BASE. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 2b6dc0d2799f3563b767622b6f9246450aa4036b)
* ctdbd: Don't check CTDB_BASE before setting it, just don't overrideMartin Schwenke2013-10-221-5/+2
| | | | | | | | That's what the 3rd argument to setenv(3) is for... :-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 30ca419aa1c78008f81839497921bbfba480e7fc)
* tests/integration: Pass --valgrinding option when running under valgrindMartin Schwenke2013-10-221-0/+4
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 913f229508302378212678d98c22606a4954b09c)
* ctdbd: Fix some errors in the popt configurationMartin Schwenke2013-10-221-2/+2
| | | | | | | | | That 4th argument isn't a default or similar, so consistently make it 0. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1c0a627df1b510f49c65ffeb4474240c8856cdf2)
* initscript: New configuration variable CTDB_DBDIR_STATEMartin Schwenke2013-10-221-0/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 30d9b634b16c3cc740e5e453ea5c21012b1fde88)
* scripts: Make detect_init_style() more readableMartin Schwenke2013-10-221-2/+3
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 516cdea0e73cf3f63b3303e22809834c8cbc64e4)
* eventscripts: Rework the iSCSI eventscriptMartin Schwenke2013-10-221-11/+13
| | | | | | | | | | * It should run on "ipreallocated" instead of "recovered" * Variable name NODE -> ip since that's what it is * Simplify some logic Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 45e2bc66abf9fcfeadcc279a656ed7fd1838920a)
* eventscripts: Don't update static routes on "recovered" eventMartin Schwenke2013-10-221-1/+1
| | | | | | | | | | Routes only need to be updated when IPs have moved. IP takeover runs will generate "ipreallocated", which is enough. "recovered" always follows "ipreallocated" anyway, so avoid the redundancy. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1152215fc69217e4292762e28d193b7ea0e06ee3)
* eventscripts: NAT gateway script doesn't need to handle "recovered" eventMartin Schwenke2013-10-221-9/+3
| | | | | | | | | | | Any time a node changes flags in any significant way there will be a takeover run, which will generate an "ipreallocated" event. The "recovered" event always happens straight after a takeover run so we update the NAT gateway twice. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 542c70d6281d636ecd51502fbbf219f418bfac66)
* eventscripts: Delete placeholder "recovered" and "shutdown" eventsMartin Schwenke2013-10-221-11/+0
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 00736a21fc268c10b6a718731e56b3dbb7e60554)
* eventscripts: Clean up comment at the top of 00.ctdbMartin Schwenke2013-10-221-9/+3
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2ea9d3acfe7e8665685f54294f5edc9b8ffc2f3f)
* eventscripts: Remove reconfigure check from samba and winbind eventscriptsMartin Schwenke2013-10-222-4/+0
| | | | | | | | | There is no reconfigure code for these scripts so no need to check for reconfiguration. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 41df1637c1d8a7b2f5a9974408db71b1f74cb2f2)
* eventscripts: Remove reconfigure code from httpd eventscriptMartin Schwenke2013-10-221-7/+0
| | | | | | | | | Nothing ever (or has ever) set the "needs reconfigure" flag, so this code is unnecessary. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5b77fd95bda5f1960aca952e1b759231890b56f3)
* eventscripts: Fold ctdb_check_tcp_ports_ctdb() into ctdb_check_tcp_ports()Martin Schwenke2013-10-221-50/+16
| | | | | | | | | A generic framework is no longer needed now that the "ctdb" checker is the only one left. Simplify the code. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 044d302b41a2040642355401e3236fcecc3a620a)
* eventscripts: Remove TCP port checks other than the built-in CTDB oneMartin Schwenke2013-10-225-165/+1
| | | | | | | | | | | "ctdb checktcpport" is no longer experimental so the other checkers are no longer required. Remove tests related to the removed checkers. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 50e330d0679614bee2e7bab028436e929f74ca50)
* scripts: Remove setting of PATH from functions fileMartin Schwenke2013-10-221-2/+0
| | | | | | | | | | | | | | | | The current setting is inconsistent with settings on most systems, putting /bin before /sbin. Use of /usr/local/bin, which may be required on some systems, is also overridden. This can make it difficult to do interactive debugging of script problems. Rely on the system PATH instead. If system-specific changes need to be made then this can be done in a configuration file. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit cfbff39e22e42f3997f637290748290833525714)
* tests/eventscripts: Run scripts under sh by defaultMartin Schwenke2013-10-221-6/+10
| | | | | | | | | | Some scripts are disabled by default so are no executable. Explicitly running them under sh allows them to be run without having to mess around and make them executable or similar. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9437d4809bfbbb5c6a32a610665333d2f641881d)
* tests/eventscripts: New tests for 20.multipathdMartin Schwenke2013-10-226-0/+110
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 212d4b201c30804f69cffe4b7150d4b74bf2e54f)
* eventscripts: Clean up 20.multipathdMartin Schwenke2013-10-221-57/+44
| | | | | | | | Reduce the complexity, including the depth of background processes. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 49f077c475b078889ff0492fe7d567a64d6cb87c)
* eventscripts: NAT gateway script should export CTDB_NATGW_NODESMartin Schwenke2013-10-221-1/+2
| | | | | | | | | | Otherwise calls to "ctdb natgwlist" will not behave as expected if a non-standard file is used, since that command will use the default file location. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e574b30257126679704b088c4334a8e7a53a9c3f)
* 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)