1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

2464 Commits

Author SHA1 Message Date
Ronnie Sahlberg
a92ba7f729 lower the debug levels for the "create FD messages" so we dont fill up the logs.
(This used to be ctdb commit 87146db2769c2ec494813685bf9cec0d2a6336c3)
2009-10-21 15:26:24 +11:00
Ronnie Sahlberg
9b8c72c446 When clients have blocked, perhaps because the node is banned or stopped and the client is blocked trying to tdb_fetch() a record, make sure we dont queue up too many REQ_MESSAGES.
Add a new tunable to control the maximum queue size we allow to a blocked client before we start discarding REQ_MESSAGES instead of queueing them for delivery.

    This avoids having queued up very very large number of MESSAGES that samba semds
     between eachother to nodes that are blocked/banned/stopped for extended periods
    .

(This used to be ctdb commit f76d6fed8f9630450263b9fa4b5fdf3493fb1e11)
2009-10-21 15:20:55 +11:00
Ronnie Sahlberg
149ea4e577 dont restart ctdb when installing the rpm
(This used to be ctdb commit ead97cabeb1e0b73bff9d45f8aec8b226769ee9f)
2009-10-21 13:54:02 +11:00
Michael Adam
769a36c048 In ctdb_ltdb_store(), add a missing transaction_cancel when local store failed.
Spotted by Volker.

Michael

(This used to be ctdb commit 0a4d409baabf242a87c06293789d589c896b104c)
2009-10-21 12:49:59 +11:00
Ronnie Sahlberg
14b14a2efb mprove the log message when we skip the ip allocation check from the recovery daemon.
we also skip this check if we are already in the process of performing an ip reallocation and not only when we are performing a full recovery.

(This used to be ctdb commit 1a09b02767f3928d3c5db0e0afc59bb938e4a445)
2009-10-21 11:51:30 +11:00
Ronnie Sahlberg
ff8363697d treat interfaces with the name ethX* as bond devices
(This used to be ctdb commit 3997d7e5471810e9a2f145ce2e795073dfc5eded)
2009-10-21 11:34:17 +11:00
Ronnie Sahlberg
6dd7a8bcfa version 1.0.98
(This used to be ctdb commit 02862c086d045497f49f3c060700419815d607e7)
2009-10-20 15:36:35 +11:00
Ronnie Sahlberg
28f277acd4 From Wolfgang Mueller
make sure to always create the vactun database and get rid of some annoying log messages

(This used to be ctdb commit 54f9c314a0354f1039208fe6ac7dc159b6db8750)
2009-10-20 13:01:15 +11:00
Ronnie Sahlberg
d788dd3627 From wolfgang Mueller
Add a tuneable so that when scripts starts to hang/timeout, we can make the node unhealthy instead of banned

(This used to be ctdb commit 2e9fc6f0609833c6d8146196011ef780669d615d)
2009-10-20 12:59:48 +11:00
Ronnie Sahlberg
58780f4137 add a direcotry where multiple local scripts can be added to run when executing eventscripts
(This used to be ctdb commit 27d152a918680a59c7412aec7e1772f25b72d469)
2009-10-19 16:22:15 +11:00
Ronnie Sahlberg
cdc77af3ab wait a bit longer before shutting down when the reclock file is missing
pring the filename of the missing file when we turn unhealthy and also
a 'df'

(This used to be ctdb commit 97ded8a629ec762f71bad28515e4fbc810790b1d)
2009-10-19 15:33:20 +11:00
Ronnie Sahlberg
1e91fd0a25 Revert "dont shutdown a node when the reclock file is temporarily unavailable."
This reverts commit f5e9f3007c10a937158bc8cdfabf33c984cf9c50.

(This used to be ctdb commit 02f68dc60e0b7bf26d631850b12834d5c71a88f2)
2009-10-19 15:30:44 +11:00
Ronnie Sahlberg
598419e57b Dont run eventscript monitor when the databases are frozen.
The databases can become frozen a while before we do the actual recovery
since we have the re-recovery timeout.

There is no point in doing much monitoring if we are waiting for a recovery,
or if we are banned.
This will eliminate some annoying log entries where certain tests will fail if the databases are locked.

(This used to be ctdb commit ff824676fab94168707aada7423ae766bc0f711c)
2009-10-15 16:03:43 +11:00
Ronnie Sahlberg
d258616984 dont shutdown a node when the reclock file is temporarily unavailable.
Leave the node as UNHEALTHY this stops clients from accessing the node until
the reclock file can be accessed again

(This used to be ctdb commit f5e9f3007c10a937158bc8cdfabf33c984cf9c50)
2009-10-15 13:19:10 +11:00
Ronnie Sahlberg
9de3652380 add logging everytime we create a filedescriptor in the main ctdb daemon
so we can spot if there are leaks.

plug two leaks for filedescriptors related to when sending ARP fail
and one leak when we can not parse the local address during tcp connection establish

(This used to be ctdb commit ddd089810a14efe4be6e1ff3eccaa604e4913c9e)
2009-10-15 11:24:54 +11:00
Ronnie Sahlberg
6152a7060b new version 1.0.97
(This used to be ctdb commit ef992a64d2376b621d4d2973ae22e567158aee12)
2009-10-15 07:41:56 +11:00
Ronnie Sahlberg
d08e3c628d Merge commit 'martins/onnode_options'
(This used to be ctdb commit 82fad66123c1b8c5d4ed3b19c39acf6f367b3f37)
2009-10-14 15:51:57 +11:00
Ronnie Sahlberg
53900b99ea version 1.0.96
(This used to be ctdb commit 536229fd120bc3fdc2419e22d3bd6ab243dd6667)
2009-10-14 14:52:24 +11:00
Ronnie Sahlberg
c58a6b39a6 add more debugging output to eventscripts and when a script has timed out,
print a full "pstree -p" to the log.

Example :
        |-ctdbd(29826)-+-ctdbd(29862)
        |              `-ctdbd(31897)-+-00.ctdb(31898)---sleep(31908)

change the default timeout to 60 seconds for eventscripts

(This used to be ctdb commit a3406c10d70f89d332eab25d481083142dff987d)
2009-10-14 14:14:28 +11:00
Martin Schwenke
f0dd32e412 Merge commit 'origin/master' into onnode_options
(This used to be ctdb commit e62928f56ce8927b1d8686db2c31538c86462d1a)
2009-10-14 13:49:30 +11:00
Martin Schwenke
787a6e44c6 New onnode options: -f to specify nodes file, -n to allow use of hostnames.
The -f option allows an alternate nodes file to be specified,
overriding the CTDB_NODES_FILE environment variable.

The -n option allows hostnames to be used instead of node numbers.
Using a range of hostnames is invalid, so hostnames can't contain
hyphens ('-') - sorry!  You can use this option without a nodes file
by specifying "-f /dev/null".

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

(This used to be ctdb commit 46474e5f21fd97dd765c616647ff46055a9970e7)
2009-10-14 13:44:57 +11:00
Ronnie Sahlberg
30d9fbfbec move the logging of the warning "No reclock file used" to the startup case so we only print this warning on "service ctdb start" and not for "service ctdb *"
(This used to be ctdb commit eb854f65f978f24583e221138eb4f9b917b89285)
2009-10-14 12:12:04 +11:00
Ronnie Sahlberg
80be59d35e when we change state between healthy/unhealthy, make sure we ask the recovery
master to perform an explicit ip reallocation.

This is more reliable and faster than having the recovery dameon track these
changes, and since we now have an explicit method to ask the recovery daemon
to perform an explicit ip reallocation, we should use this.

(This used to be ctdb commit 3807681e74f4bfe92befdae6ed616ff5f1a99880)
2009-10-14 11:59:16 +11:00
Ronnie Sahlberg
4b7a208b16 allow a pre .95 version of a recovery master to freeze databases on a post .95 node by remapping priority numbers and log this to log.ctdb
(This used to be ctdb commit 343c005367789e108c0320e95d7a264535d68dd8)
2009-10-14 10:14:03 +11:00
Ronnie Sahlberg
070f781e39 always create the nfs state directories during the monitor event.
this allows us to configure and enable nfs at runtime without having to restart ctdbd

(This used to be ctdb commit f6e39d35713475defaa08a623e194f3f2f8f7d53)
2009-10-14 09:15:24 +11:00
Ronnie Sahlberg
3ac5a52969 Port Volkers deadlock avoidance patch to HEAD.
This patch ensures that we lock all non-notify related databases first and
then the notify databases to avoiud a deadlock where samba needs to lock records on two databases at once (and notify being the second database).

Newer versions of samba would instead use the set-db-prio control to set this explicitely on a database per database basis instead of relying on  hardcoded database names. This patch will be reverted in the future when all updated versions of samba has been pushed out.

(This used to be ctdb commit 70e7781df1f118a0e2632a9c634f3fd388fa6c8c)
2009-10-14 08:17:49 +11:00
Ronnie Sahlberg
98b5caf003 we must break the loop as soon as we find a suitable recmaster does exist
otherwise "tdb ipreallocate" will silently fail to update the addresses.

(This used to be ctdb commit 346fa055f4106497b87df97da5ebd6e51fa1ef8c)
2009-10-13 09:49:05 +11:00
Ronnie Sahlberg
2cb9580464 new version 1.0.95
(This used to be ctdb commit 3501d6b70bd905d6fdc4e74fe2cedc3ba77e4b86)
2009-10-12 18:53:20 +11:00
Ronnie Sahlberg
d66c77d960 use the correct expected size for thew _cancel control
(This used to be ctdb commit 5974b5f7998ef96aeadb7377f32ef1ab85bb5943)
2009-10-12 18:41:57 +11:00
Ronnie Sahlberg
44f1d1fea7 add a dispatch to the recovery transaction cancel call
(This used to be ctdb commit c1d7c11978d27d2ee41a2129b31d9ab61a43f8da)
2009-10-12 18:31:59 +11:00
Ronnie Sahlberg
df0dba1862 Merge commit 'martins/master'
(This used to be ctdb commit 5f14874c5c705dd637f88a77f30c930fea1201d2)
2009-10-12 16:51:36 +11:00
Ronnie Sahlberg
122c423b82 add a new control for explicitely cancelling recovery transactions, i.e. the
transactions we start across all tdb databased during the recovery.

this allows us to properly clean up and delete these tdb transactions on a
recovery failure.

(This used to be ctdb commit b2ce8b900a7d00944c84e0574fea5b371064a06d)
2009-10-12 16:48:05 +11:00
Martin Schwenke
ab98c1b0f1 Clean up ctdb_check_directories* eventscript functions.
There are 2 problems with this code:

* The loop in ctdb_check_directories_probe() breaks on filenames
  containing whitespace.

  The fix to protect them is to pass "$@" to this function and have it
  operate on "$@".

  Note that there's still a problem with whitespace in filenames in
  the 50.samba eventscript.  To fix this ctdb_check_directories_probe
  should read the filenames from stdin.  Another time...

* The check for '%' in filenames in ctdb_check_directories_probe()
  ends up involving several forks.  On a modern machine this can cost
  a couple of minutes when checking a large number of directories.

  The fix is to use a case statement.

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

(This used to be ctdb commit eb1fecaef9aa5cb85dff7d4f7af8a9878deabed8)
2009-10-12 16:32:49 +11:00
Martin Schwenke
d8e2ddc5a8 40.vsftpd: reset the fail counter in the "recovered" event.
Each recovery that involves IP reassignments results in a restart of
vsftpd in the "recovered" event.  Currently, we can have several
recoveries in quick succession and the "monitor" event following each
can fail because vsftpd isn't ready yet.  This results in cumulative
failures, so the node is marked unhealthy, even though vsftpd has
never had a proper opportunity to become ready.

This resets the fail count after each recovery.

While we're here, also move the delete of the restart flag file into
the body of the conditional.

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

(This used to be ctdb commit 318abeb4b913a8d846e7eaf4cf5c2a67b61ce974)
2009-10-12 16:17:37 +11:00
Ronnie Sahlberg
771802b212 allow setting the recmode even when not completely frozen.
we sometimes have to do this when we want to trigger a recovery

(This used to be ctdb commit 46194e87e189521375b39b4ef33da2b493429fd8)
2009-10-12 13:06:16 +11:00
Ronnie Sahlberg
73c0adb029 initial attempt at freezing databases in priority order
(This used to be ctdb commit e8d692590da1070c87a4144031e3306d190ebed2)
2009-10-12 12:08:39 +11:00
Ronnie Sahlberg
d4c98516a2 uptade the freeze/thaw commands to be able to send the requested database priority to freeze/thaw to the daemon.
this is encoded in the srvid field of the request header

(This used to be ctdb commit 0cb3d33caa42ed783e03bc825b181dde4cf63616)
2009-10-12 09:22:17 +11:00
Ronnie Sahlberg
ae57e54566 during recovery, update all remote nodes so they use the same priorities
for the databases as this node.

(This used to be ctdb commit 465dc95fef0ff6651ff49fa94e4cf2ebd1036ac4)
2009-10-10 16:28:20 +11:00
Ronnie Sahlberg
3219f81710 add a control to read the db priority from a database
(This used to be ctdb commit ca6d045e419f308f57e74d4c978907afb05ddb85)
2009-10-10 15:04:18 +11:00
Ronnie Sahlberg
6cf7d8e131 add a control to set a database priority. Let newly created databases default to priority 1.
database priorities will be used to control in which order databases are locked during recovery in.

(This used to be ctdb commit 67741c0ee01916d94cace8e9462ef02507e06078)
2009-10-10 14:26:09 +11:00
Ronnie Sahlberg
e8e2f35985 verify the DISABLED flag and compare with the previous flag we have registered for that node and not what the node says is the difference.
this prevents a situation where the remove node may cause spurious ip reallocations.

(This used to be ctdb commit dd122351efaeef5475cdec111eb900110d83ec35)
2009-10-10 13:55:11 +11:00
Ronnie Sahlberg
05137e4718 Fix bug spotted by Metze,
the argument to ctdb_control_event_Script_disabled() is a string not a uint32

(This used to be ctdb commit 687535b51622d1fac7ccb38fa640bf1febd69fd8)
2009-10-09 22:22:11 +11:00
Ronnie Sahlberg
eb9a77c887 version 1.0.94
(This used to be ctdb commit 5cb4d63bf6887d15aba37fafc3f6b6ba38027f13)
2009-10-08 19:17:57 +11:00
Ronnie Sahlberg
342148628f if a node fails to become frozen during recovery, mark it up with as a culprit so it will soon get banned
(This used to be ctdb commit f72d33ac73ebb1af802bacdfb30279df3cd8b8f9)
2009-10-08 16:45:25 +11:00
Ronnie Sahlberg
d29c4b5c4d version 1.0.93
(This used to be ctdb commit e77bf5708df6782b4516f698b9981a1d27e2f10b)
2009-10-06 17:05:14 +11:00
Ronnie Sahlberg
42193cbff8 update natgw eventscript to allow you to fore it to update and / or to remove the configuration at runtime
(This used to be ctdb commit deed52b7e4aac94b4d11a8d89d08739e1dfd4ed7)
2009-10-06 16:09:24 +11:00
Martin Schwenke
2fa921ba92 Merge commit 'origin/master'
(This used to be ctdb commit 7d91de8a837a12082c343980428153720dcad741)
2009-10-06 13:39:31 +11:00
Martin Schwenke
47f5347963 Document CTDB_NODES_FILE environment variable used by onnode.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 22f0065cd6b66fa0f623f465aaca98883955ac79)
2009-10-06 13:38:00 +11:00
Ronnie Sahlberg
134ed842fa always send the release/take ip controls to make sure all nodes are updated
(This used to be ctdb commit 789703ea684717781c176fd3a2a24d96abde220b)
2009-10-06 12:25:44 +11:00
Ronnie Sahlberg
166b1c97b4 add a new message to ask the recovery daemon to temporarily disable checking ip address consistency.
This is useful when we are moving addresses using moveip in the cluster since otherwise if we collide with the recovery daemons own check we could cause a recovery

(This used to be ctdb commit 9c63858c0b22c81eaccb9865a414af0bbb2833d4)
2009-10-06 12:11:32 +11:00