1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

2214 Commits

Author SHA1 Message Date
Ronnie Sahlberg
969cb64056 disable VerifyRecoveryLock when the user modifies the filename
(This used to be ctdb commit d973cb6e83b2f7cc37bd39c1219dcfbd4911a8ee)
2009-06-25 14:34:21 +10:00
Ronnie Sahlberg
5b235c3999 add a control to set the reclock file
(This used to be ctdb commit 36cc2e586f03fa497ee9b06f3e6afc80219c4aaa)
2009-06-25 14:25:18 +10:00
Ronnie Sahlberg
7f8d98ebb0 update the recovery daemon to read the recovery lock file off the main daemon and handle when the file is changed/enabled/disabled
(This used to be ctdb commit 31acc11a6389d4dd9f7b71b7cfa2f2450076f1f7)
2009-06-25 12:55:43 +10:00
Ronnie Sahlberg
10db6a41df return NULL and not a "" when there is no reclock file returned from the server
(This used to be ctdb commit 6755f89f81aba63bfe00ee16d44a0201cbfa90ca)
2009-06-25 12:26:14 +10:00
Ronnie Sahlberg
2b253c094c add a control to read the current reclock file from a node
(This used to be ctdb commit ed6a4cbcdcbb4e0df83bec8be67c30288bf9bd41)
2009-06-25 12:17:19 +10:00
Ronnie Sahlberg
4a1a3652fe Document that you can run ctdb without a reclock file in the sysconfig file
(This used to be ctdb commit 33895d217ee096b356f02b5292ba27a840c4f559)
2009-06-25 11:59:21 +10:00
Ronnie Sahlberg
77ef745394 Allow setting the recovery lock file as "", which means that we do not use a file and that we implicitely also disable the recovery lock checking.
Update the init script to allow starting without a reclock file.

(This used to be ctdb commit 07855ff5eba71e7d607d52e234a42553d9b93605)
2009-06-25 11:50:45 +10:00
Ronnie Sahlberg
180a576f7b Dont access the reclock file at all if VerifyRecoveryLock is zero and also
make sure the reclock file is closed if the variable is cleared at runtime

(This used to be ctdb commit a25f4888689a0725971606163d87c39a41669292)
2009-06-25 11:41:18 +10:00
Ronnie Sahlberg
dc17b5f1fe Merge root@10.1.1.27:/shared/ctdb/ctdb-git
(This used to be ctdb commit 553a244fc8d7814634330bf4829ac127d63886be)
2009-06-23 11:21:37 +10:00
Ronnie Sahlberg
52861523f6 new version 1.0.85
(This used to be ctdb commit a4b682e3b2657abeca3e387d96949f83bdbd7b2f)
2009-06-23 11:30:25 +10:00
Ronnie Sahlberg
5f680fa2b4 rename 99.routing to 11.routing so that it executed before the service scripts
(This used to be ctdb commit 9bc8e7eec7ffa8969f0f170a77b13cd0033790f1)
2009-06-23 11:29:26 +10:00
Ronnie Sahlberg
af23fdde78 new version 1.0.85
(This used to be ctdb commit 937b029fd47d6af162c27d9dce6da0e22b36b79a)
2009-06-23 11:23:54 +10:00
Ronnie Sahlberg
d3dde37934 rename 99.routing to 11.routing so the eventscript is processed before
NFS and LVS

(This used to be ctdb commit 16ec9ca56a9f5b88d7a5ed4f89a28a53f5c9c081)
2009-06-23 11:01:04 +10:00
Martin Schwenke
566314ca97 Fix minor problem in previous initscript commit.
The valgrind start case should not use daemon, since this is specific
to Red Hat.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 867f57d166395c92949e480ca725249b0ca8950b)
2009-06-19 18:08:54 +10:00
Martin Schwenke
3dad79b88e Initscript fixes, mostly for "stop" action.
Use a local variable $ctdbd so that we always run ctdbd from the the
same place and so that we know what to kill.  This variable respects
the $CTDBD environment variable, which may be used to specify an
alternative location for the daemon.

In the important cases use "pkill -0 -f" to check if ctdbd is
running.  Also, remove the special case for killing ctdbd when running
under valgrind.  The regular case will handle this just fine.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 070305adfe636c2580776e6bf24bb8be06622b86)
2009-06-19 18:08:31 +10:00
Martin Schwenke
7bfc19d635 Clean up handling the of CTDB restarts in testcases.
Glitches during restarts of the CTDB cluster have been causing some
tests to fail.  This is because restarts are initiated in the body of
many tests.  This adds a simple function ctdb_restart_when_done, which
schedules a restart using an existing hook in the test exit code.
This function is now used in tests that need to restart CTDB.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit fc69b6a66282d5be6edeb286bf72aeafb252e6dd)
2009-06-19 18:03:14 +10:00
Martin Schwenke
635da189dc Fix minor onnode bugs relating to local daemons.
Commit a0f5148ac749758e2dfbd6099e829c5bf1d900e6 caused a subtle
regression.  Due to the subtlety, this description is much longer than
the 1 line patch that fixes it!  The regression, where a process that
invokes onnode is unexpectedly blocked, is only apparent if the
following conditions are met:

1. $CTDB_NODES_SOCKETS is set;
2. The command passed to onnode attempts to background a process; and
3. onnode is run in certain types of subshell (e.g. foo=$(onnode ...)).

In particular, when testing against local daemons (i.e. condition (1)
is met), tests/simple/07_ctdb_process_exists.sh would fail (because it
does both (2), (3)).

The problem is caused by the use of file descriptor 3 in the code that
allows separate filtering of stdout and stderr.  A backgrounded
process will have this descriptor open and the $(...) construct
appears to wait for all file descriptors to be closed.  This only
happens with local daemons because SSH is replaced by a shell and file
descriptor 3 leaks into that shell.  It does not occur when SSH is
used because the file descriptor does not leak into the remote shell
where the process is backgrounded.

The fix is simply to redirect file descriptor 3 to /dev/null in the
fakessh function, which is used when $CTDB_NODES_SOCKETS is set.

Also fixed is another minor bug when the -o option and
$CTDB_NODES_SOCKETS are used in combination.  The code uses the node
name as a suffix for the output filename(s).  Usually this is an IP
address.  However, when $CTDB_NODES_SOCKETS is in use the node name is
the socket name, which might be a path several directories deep.
Each output file is created via a simple redirection and this would
fail if unexpected directories appear in the filename.  3 possible
fixes were considered:

1. Replace all '/'s in the node name by '_'s.  Nice and simple.
2. Use the basename of the node name.  However, sockets may be in
   different directories but have the same basename.
3. Create all required directories before redirecting.  This is a
   little more complex and probably doesn't meet the user's
   expectations.

Option (1) is implemented here.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5d320099025b6835eda3a1e431708f7e0a6b0ba6)
2009-06-19 18:02:17 +10:00
Ronnie Sahlberg
de1402d471 dont log an error if waitpid returns -1 and errno is ECHILD
(This used to be ctdb commit fdf50f3e774e3980af81c0b6f4ff81d085f4f697)
2009-06-19 15:55:13 +10:00
Ronnie Sahlberg
baead0fdcc dont leak file descriptors when set recmdoe timesout
(This used to be ctdb commit fc8a364eb095ec11ca01246a583bf1dc53510141)
2009-06-19 14:58:06 +10:00
Ronnie Sahlberg
d3c5fb4bd1 dont leak file descriptors
(This used to be ctdb commit 268c3e4b269a92741a02280c84384178e73de10e)
2009-06-19 14:54:22 +10:00
Ronnie Sahlberg
d72b14e86c in the recovery daemon, check that the recovery master can access the recovery lock file and verify it is not stale from a child process.
This allows us to timeout the operation if the underlying filesystem has become temporarily unresponsive without causing a new recovery.

(This used to be ctdb commit d177b08f1dc79534491f27726b05405d47e12e20)
2009-06-19 14:44:26 +10:00
Ronnie Sahlberg
1183b364f1 reduce the timeout we wait for the reclock child process to finish to 5 seconds
before we log an error and abort

(This used to be ctdb commit 6d1e4321b63973c2e53c63d386e8cc0bd9605cae)
2009-06-19 13:09:11 +10:00
Ronnie Sahlberg
0ddf79a3bc increase the timeout before we shutdown when ther ecovery daemon is hung
(This used to be ctdb commit facddcacb4a961cddb117818fa38a3e97770b2fa)
2009-06-18 09:20:18 +10:00
Ronnie Sahlberg
34fbfb8b89 rename 99.routing to 11.routing
so it is executed before any of the service scripts

(This used to be ctdb commit 1205673499618f90f413fad9e96a88733b5ce359)
2009-06-18 09:11:46 +10:00
Martin Schwenke
b0fd8fffcf New tests for NFS and CIFS tickles.
New tests/complex/ subdirectory contains 2 new tests to ensure that
NFS and CIFS connections are tracked by CTDB and that tickle resets
are sent when a node is disabled.

Changes to ctdb_test_functions.bash to support these tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5d188af387a2a1d68d66f47edb7a9ca546ed357c)
2009-06-18 09:04:43 +10:00
Martin Schwenke
133826f5da Increase threshold in 51_ctdb_bench from 2% to 5%.
The threshold for the difference in the number messages sent in either
direction around the ring of nodes was set to 2%.  Something
environmental is causing this different to sometimes be as high as 3%.
We're confident it isn't a CTDB issue so we're increasing the
threshold to 5%.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit be3e23c9fcb9c716e492af102830a4f6ad8bda7b)
2009-06-18 09:02:21 +10:00
Ronnie Sahlberg
d1c40424f6 When we ban a node, only drop the IPs on the node being banned, not on every node
(This used to be ctdb commit 46e8c3737e6ff54fc80de8e962e922924c27bc35)
2009-06-10 10:35:20 +10:00
Ronnie Sahlberg
2bb687c4cd remove unused variable
(This used to be ctdb commit 2a52336ec021dfe8d56ba72726feb7b2dbd41f68)
2009-06-09 10:58:46 +10:00
Ronnie Sahlberg
ac931b1371 dont require particular values for NoIPFailback and DeterministicIPs when
using ctdb moveip

(This used to be ctdb commit d350c631850377c09968d2978ef57d2bd0d50116)
2009-06-09 10:57:46 +10:00
Ronnie Sahlberg
f135684766 improve ctdb moveip so that it does not always trigger a recovery.
(This used to be ctdb commit 0ca28d7336463ecd2ff65620d8dbcbb496991531)
2009-06-09 10:56:50 +10:00
Ronnie Sahlberg
f6ccf96898 try avoiding to cause a recovery when deleting a public ip from a node
(This used to be ctdb commit 6318ea13464e2fe630084c40802d8e697c2cb999)
2009-06-05 17:57:14 +10:00
Ronnie Sahlberg
b046f5e3aa when adding an ip, try manually adding and takingover the ip instead of triggering a full recovery to do the same thing
(This used to be ctdb commit 4d5d22e64270cfb31be6acd71f4f97ec43df5b2c)
2009-06-05 17:00:47 +10:00
Ronnie Sahlberg
79eef7f2b5 dont list DELETED nodes in the ctdb listnodes output
(This used to be ctdb commit 7eb137aa4c24c69bd93b98fb3c7108e5f3288ebd)
2009-06-04 13:25:58 +10:00
Ronnie Sahlberg
f691b96d84 make it possible to run 'ctdb listnodes' also if the daemon is not running.
in this case, read the nodes file directly instead of asking the local daemon for the list.

add an option -Y to provide machinereadable output to listnodes

(This used to be ctdb commit 4a55cacc4f5526abd2124460b669e633deeda408)
2009-06-04 13:21:25 +10:00
Ronnie Sahlberg
85d67197fe From William Jojo <w.jojo[AT]hvcc.edu>
AIX dont have getopt.h by default.
Dont try including this file when building on AIX

(This used to be ctdb commit 06b33a826e71e1dd2f9e02ad614be55535d42045)
2009-06-04 09:41:05 +10:00
Ronnie Sahlberg
e2810c0cb4 new version 1.0.84
(This used to be ctdb commit af1b3de978089a9819716b33c13c941b5558cb17)
2009-06-02 15:05:41 +10:00
Ronnie Sahlberg
45aa542064 teach ONNODE about deleted nodes
(This used to be ctdb commit 03d304e72a5839dc8d8d2e2312b346c21dca5774)
2009-06-02 15:03:44 +10:00
Ronnie Sahlberg
f49c71fa4f new version 1.0.83
(This used to be ctdb commit f236fa289f3115b1f4eb108eb668392dc520f61a)
2009-06-02 13:13:03 +10:00
Ronnie Sahlberg
676f7e0206 idocument how to remove a node from an existing cluster using 'ctdb
reloadnodes'

(This used to be ctdb commit e3d9722e332f132bd47dc41621d4e1d2b5c9c62a)
2009-06-02 12:43:11 +10:00
Ronnie Sahlberg
1dee7a2401 hide all DELETED nodes from the ctdb command output
(This used to be ctdb commit 91fdfee371d6be83af60cd38ac34afb295b9987a)
2009-06-01 15:43:30 +10:00
Ronnie Sahlberg
5371e3a793 lower the loglevel when we long that we skip an evenscript because it is not executable
(This used to be ctdb commit c265df3c7950aab51b8b6ef17040229b97345c35)
2009-06-01 15:29:36 +10:00
Ronnie Sahlberg
6c0c3577f8 dont try to queue packets for sending to (recently) deleted nodes since these nodes do not have a queue.
(This used to be ctdb commit 1b7c88ae7643f9bcc52b1d33095f97de88fc2316)
2009-06-01 14:56:19 +10:00
Ronnie Sahlberg
8a0880c843 when building the initial vnnmap, make sure to skip any deleted nodes
(This used to be ctdb commit 0cd66c744cd9533ce8d4c4374bcee3bf49b66dae)
2009-06-01 14:44:15 +10:00
Ronnie Sahlberg
dc5e4906cc use num_nodes and the nodes array instead of walking the vnnmap
when counting the number of active nodes

(This used to be ctdb commit df20cd9b05ad9ca72e32ccc42354eafc12b68c04)
2009-06-01 14:39:34 +10:00
Ronnie Sahlberg
e6170b5389 add a new node state : DELETED.
This is used to mark nodes as being DELETED internally in ctdb
so that nodes are not renumbered if / when they are removed from the nodes file.

This is used to be able to do "ctdb reloadnodes" at runtime without
causing nodes to be renumbered.
To do this, instead of deleting a node from the nodes file, just comment it out like

   1.0.0.1
   #1.0.0.2
   1.0.0.3

After removing 1.0.0.2 from the cluster,  the remaining nodes retain their
pnn's from prior to the deletion, namely 0 and 2

Any line in the nodes file that is commented out represents a DELETED pnn

(This used to be ctdb commit 6a5e4fd7fa391206b463bb4e976502f3ac5bd343)
2009-06-01 14:18:34 +10:00
Ronnie Sahlberg
4259156050 dont remove the socket when the dameon stops. This can race if the
service is immediately restarted

(This used to be ctdb commit b18356764cd49d934eab901e596bb75c6e3ecdf8)
2009-05-29 18:16:13 +10:00
Ronnie Sahlberg
6feb7a1bf8 New attempt at TDB transaction nesting allow/disallow.
Make the default be that transaction is not allowed and any attempt to create a nested transaction will fail with TDB_ERR_NESTING.

If an application can cope with transaction nesting and the implicit
semantics of tdb_transaction_commit(), it can enable transaction nesting
by using the TDB_ALLOW_NESTING flag.

(This used to be ctdb commit 3e49e41c21eb8c53084aa8cc7fd3557bdd8eb7b6)
2009-05-25 17:04:42 +10:00
Ronnie Sahlberg
96340bd166 Revert "we only need to have transaction nesting disabled when we start the new transaction for the recovery"
This reverts commit bf8dae63d10498e6b6179bbacdd72f1ff0fc60be.

(This used to be ctdb commit 87292029cb444ffab130ff7dae47a629c2d15787)
2009-05-25 16:55:27 +10:00
Ronnie Sahlberg
270907faec Revert "set the TDB_NO_NESTING flag for the tdb before we start a transaction from within recovery"
This reverts commit 1b2029dbb055ff07367ebc1f307f5241320227b2.

(This used to be ctdb commit 9762a3408f10409b629637d237ec513a825a6059)
2009-05-25 16:55:02 +10:00
Ronnie Sahlberg
c429ca114d Revert "add TDB_NO_NESTING. When this flag is set tdb will not allow any nested transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones."
This reverts commit 459e4ee135bd1cd24c15e5325906eb4ecfd550ec.

(This used to be ctdb commit f1c6f7dd47bb1081781c0a0d567a92bbbc0aa5d5)
2009-05-25 16:54:25 +10:00