summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * recoverd: Rebalancing should be done regardless tunableMartin Schwenke2013-10-301-7/+14
| | | | | | | | | | | | | | | | | | Rebalance target nodes should be set even if a deferred rebalance is not configured. The user can explicitly cause a takeover run. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit afd9b51644af074752d74c412cb4e7ec2eba2c69)
| * recoverd: Improve an error message in the election codeMartin Schwenke2013-10-301-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 275ed9ebe287e39d891888c13810c70f347af8ac)
| * Revert "if a new node enters the cluster, that node will already be frozen ↵Martin Schwenke2013-10-301-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at start" This is unnecessary due to 03e2e436db5cfd29a56d13f5d2101e42389bfc94. Furthermore, if a node doesn't force an election but wins it then it can fail to record that it is the new recovery master. This can lead to a reverse split brain where there is no recovery master. This reverts commit c5035657606283d2e35bea40992505e84ca8e7be. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Conflicts: server/ctdb_recoverd.c (This used to be ctdb commit c8b542e059a54b8d524bd430cad9d82e5edd864d)
| * ctdbd: When a node is connected, log at DEBUG NOTICE not DEBUG_INFOMartin Schwenke2013-10-291-2/+3
| | | | | | | | | | | | | | | | | | This is important enough that we should see it when the log level is DEBUG_NOTICE. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eb8ec5681bfccb26c8ffae72952d54bb0ba46249)
| * tests/complex: Remove CTDB_NFS_SKIP_SHARE_CHECK testMartin Schwenke2013-10-291-129/+0
| | | | | | | | | | | | | | | | | | | | This is a needlessly complex way of testing the same thing as the eventscripts unit tests 60.nfs.monitor.161.sh and 60.nfs.monitor.162.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d1674aad224f8f0c9a03c3cd38a647318ba0f03e)
| * tests/complex: Remove CTDB_SAMBA_SKIP_SHARE_CHECK testMartin Schwenke2013-10-291-134/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is adequately covered by eventscripts unit tests 50.samba.monitor.105.sh and 50.samba.monitor.106.sh. This test is broken if CTDB_SAMBA_CHECK_PORTS is not specified in the CTDB configuration. Fixing it is hard and involves adding a more complex stub for testparm. We already have that in the eventscript unit tests above. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 81b94fbb7495ac3204f1a84c673c8babf04663bc)
| * eventscripts: Rewrite the smb.conf cache file handlingMartin Schwenke2013-10-292-78/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The background update is never guaranteed to complete before the cache is used, so don't bother trying it at the beginning. Instead, put a timeout on a foreground update. If the foreground update fails: * If there's no available cache file then die. * If there is a previous cache file then use it and log a warning. * Do a background update at the end of the monitor event. Also remove commas in the "smb ports" list before use, since (newer?) testparm seem to insert commas into the default value. Update the associated test to add a comma. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 8c6f511254ecb0381a609b37e3a0ee6e5ec5d562)
| * tools/ctdb: Fix documentation string for ban commandMartin Schwenke2013-10-291-1/+1
| | | | | | | | | | | | | | | | Ban time of 0 is not supported. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c072eb1f6488f94f83a6d3a81d88bf29ad866943)
| * Revert "recoverd: Disable takeover runs on other nodes for 5 minutes"Martin Schwenke2013-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | 5 minutes is too long to leave the cluster in limbo if the recovery daemon dies during a takeover run, even though this is quite unlikely. We need a new recover master to be able to do takeover runs fairly quickly. This reverts commit 71080676bb4acbd0d9b595a30cf7fe6dddbf426f. (This used to be ctdb commit 3e41170c78fc7a2bf526129c9b7db3739b61c6bf)
| * tools/onnode: Fix healthy/ok node handlingMartin Schwenke2013-10-294-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bit-rotted a long time ago when the "ThisNode" column was added to "ctdb -Y status" output. The fake "ctdb -Y status" output in the test was never updated to reflect this change. Instead of making sure that all columns are "0", just check that they're not "1". This implicitly ignores "Y" and "N" in this "ThisNode" column without having to do anything else clever. Also update associated tests. The main "ctdb ok" test had a duplicate opening line for a here document, which was tickled by this change. This fixes samba bz#8122. Signed-off-by: Martin Schwenke <martin@meltin.net> onnode test fixup Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 01a46205c3a3d6609dc0b0324319b89667dffa32)
| * daemon: Change the default recovery method for persistent databasesAmitay Isaacs2013-10-282-5/+8
| | | | | | | | | | | | | | | | | | Use sequence numbers to do recovery for persistent databases instead of RSNs. This fixes the problem of registry corruption during recovery. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 56486d1c01cc8ad0e4b8cee7a22429e72e50f03d)
| * packaging: Create runtime directories for CTDBAmitay Isaacs2013-10-251-0/+3
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit c7450f9e22133333bf82c88a17ac25990ebc77ab)
| * initscript: Update systemd configuration to put PID file in /run/ctdbMartin Schwenke2013-10-251-3/+3
| | | | | | | | | | | | | | | | | | | | Elsewhere we're moving the socket to /var/run/ctdb. We might end up with PID files and sockets for other daemons later, so let's call the directory "ctdb" instead of "ctdbd". Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b63f6fd2d295c8e18cbf3420ab05fce07b727f31)
| * 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)