summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* autobuild: extend samba-ctdb target to build ctdb, tooMichael Adam2013-11-131-7/+14
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autobuild: add a "ctdb" targetMichael Adam2013-11-131-1/+10
| | | | | | | | | For a start, this just builds and installs the integrated ctdb copy. It does not run "make test" in ctdb. This is time consuming and too flakey for now. Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Merge branch 'master' of ctdb into 'master' of sambaStefan Metzmacher2013-11-13786-0/+162789
|\ | | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
| * tests: Fix calling of ctdb tool from testAmitay Isaacs2013-11-071-1/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 9381c33dfd40192b7532d942059c2959dfae059d)
| * Revert "tests: If transaction_start fails, try again"Amitay Isaacs2013-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ed7d999214ee009e480c26410a04fa105028cb8e. This is not necessary since ctdb_transaction_start() now will return NULL only when there is a failure and not when another transaction is currently active. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 46615c8e0e63291605d76a6d35f1a93180718c36)
| * client: Make g_lock_lock() wait till lock is obtainedAmitay Isaacs2013-11-071-1/+11
| | | | | | | | | | | | | | | | | | | | This makes the behaviour of g_lock_lock() similar to that implemented in Samba. Now ctdb_transaction_start() will return NULL only when there are failures and not when another transaction is active. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 59489019ad15a5ad6b0f295e742fc9832745a842)
| * eventscript: Fix link creation failure if the link already exist but the ↵Srikrishan Malik2013-11-011-1/+1
| | | | | | | | | | | | | | | | target path is missing Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com> (This used to be ctdb commit 370022e1ff654db99d0c3ce0c49914c249e57289)
| * doc: Update NEWSMartin Schwenke2013-10-301-0/+103
| | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 30a6565a7b476516f3daed0669b5650e1be3cd18)
| * web: Add links to new manpagesAmitay Isaacs2013-10-301-5/+9
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a7a844e7600b59d876de94ec5bf7bd1647508cdf)
| * doc: Major updates to manual pagesMartin Schwenke2013-10-3010-2858/+5389
| | | | | | | | | | | | | | | | | | This includes new manpages for ctdb.7, ctdb.conf.5 and ctdb-tunables.7. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 15b5c6c00c248bc1a8364a6da103296a55d7bfb6)
| * tunables: Remove obsolete tunablesAmitay Isaacs2013-10-302-6/+0
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ca5fc3431573c44d55d09d987c715fb53756fc1f)
| * 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)