1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

3990 Commits

Author SHA1 Message Date
Mathieu Parent
68d81587dc Nagios plugin for CTDB
This plugin is GPL2 or greater as generally found in Nagios.
(this is obviously compatible with GPL3 or greater).

(This used to be ctdb commit df1ac1cfd65f32743ca2588edfdad46ce5a4f03f)
2011-11-08 16:34:15 +11:00
Mathieu Parent
fa197073cd config can be in /etc/default/ instead of /etc/sysconfig/ (ctdb_gnostics part)
(This used to be ctdb commit b6a9dacefd8f031677702f0fbf6b321beb4c4d54)
2011-11-08 16:32:03 +11:00
Mathieu Parent
4617a0e9cf config can be in /etc/default/ instead of /etc/sysconfig/
... on Debian system and derivated.

(ctdb_diagnostics still hardcodes /etc/sysconfig/)

(This used to be ctdb commit 1341329f6125d491b82c873f793af819e677f714)
2011-11-08 16:31:15 +11:00
Mathieu Parent
91431262be config/functions: CTDB_VARDIR is /var/lib/ctdb on Debian-like systems
(This used to be ctdb commit 56160eccb62178f645b017b1257677a1e854b2bc)
2011-11-08 16:31:03 +11:00
Ronnie Sahlberg
c3ee6e3dbd New version 1.12
* Tue Nov 8 2011 : Version 1.12
 - Add new tunable : AllowClientDBAttach that can be used to stop
   client db access during maintenance operations
 - Updated logging for interfaces that are missing or dont exist but are
   configured to be used.
 - Add timeout argument to ctdb_cmdline_client
 - PDMA support
 - Initial support for 'readonly' delegations for ctdb databases
   This will when finished greatly improve performance for contended hot
   records that are used for just read-access.
 - New 'ctdb cattdb' command
 - Massive updates to tests and eventscripts
 - LCP2 ip allocation algorithm
 - Record Fetch collapse. Collapse multiple fetch-lock requests from cients
   to a single network fetch and defer other concurrent requests until the
   initial fetch completes, and then service the deferred calls locally.
   This will greatly improve performance for contended hot records
   where clients request write-locks.

(This used to be ctdb commit bda24b7f313289404b68ce8b9177fbd6b6a05dd7)
2011-11-08 16:20:09 +11:00
Ronnie Sahlberg
0e79b2d1e8 Record Fetch Collapse: Collapse multiple fetch request into one single request.
When multiple clients fetch the same record concurrently, send only one single
fetch across the network and deferr all other fetches locally.
This improves performance for hot records and reduces cpu load on ctdb.

(This used to be ctdb commit 82d6946ad8b3348e8b9d3d971f24925ade02d1be)
2011-11-08 16:08:28 +11:00
Ronnie Sahlberg
8db9b73920 Merge remote branch 'martins/lcp2fix'
(This used to be ctdb commit 7c02d242af552aa732f5c70ea4eeefbc8a8542e2)
2011-11-08 14:06:30 +11:00
Ronnie Sahlberg
afd0b63273 Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit d772743e9a4d4d40eb95cd8d5178708e77057b79)
2011-11-08 14:01:22 +11:00
Ronnie Sahlberg
0f92fa224c RB_TREE: Add mechanism to abort a traverse
This patch changes the callback signature for traversal
functions to allow a client to abort a traverse before it finishes.
Updates to all callers and examples as well as rb-test tool.

(This used to be ctdb commit 8ab0c63ad36cfbbb1e5fed46a1f4c47b1fdb581f)
2011-11-08 13:40:28 +11:00
Volker Lendecke
47f20e8ae5 Fix some typos
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit f24e943eb7d8b86ce6b32ae37e3884ec4af0f7df)
2011-11-02 17:05:47 +01:00
Martin Schwenke
cb21f178e3 Tests - IP allocation - add some extra output due to recent fix
A recent fix made the LCP2 algorithm try harder find a candidate
source node.  The debug output shows extra output because it is trying
harder so we accommodate that.

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

(This used to be ctdb commit 9a6f918bf6db79c1f8c53c0df23d47b73c117ea2)
2011-11-02 10:17:00 +11:00
Martin Schwenke
c0939af571 LCP IP allocation algorithm - try harder to find a candidate source node
There's a bug in LCP2.  Selecting the node with the highest imbalance
doesn't always work.  Some nodes can have a high imbalance metric
because they have a lot of IPs.  However, these nodes can be part of a
group that is perfectly balanced.  Nodes in another group with less
IPs might actually be imbalanced.

Instead of just trying the source node with the highest imbalance this
tries them in descending order of imbalance until it finds one where
an IP can be moved to another node.

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

(This used to be ctdb commit 574091d5aced5e87aefad52f8bc47aa75c25fbf6)
2011-11-02 10:17:00 +11:00
Martin Schwenke
575f76788b Tests - IP allocation - new test that shows current LCP2 failure
There are 4 IPs across 2 nodes and 2 addresses across 2 other nodes.
If one of the latter nodes is unhealthy and then becomes healthy
again, an IP isn't failed back.  This is because the nodes in the 1st
group are >= unbalanced then the nodes in the 2nd group.

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

(This used to be ctdb commit 1d26e7cff6292fcbf63efc4628ffbb63b6f1f73c)
2011-11-01 21:01:25 +11:00
Martin Schwenke
fa29fdf9ba Tests - Allow some tests in ctdb_takover_tests to specify allowed nodes
This mainly applies to ctdb_takeover_run_core when you might want to
specify that some IPs can only be hosted by some nodes.

Syntax on each line is now:

IP current_pnn  allowed_pnns

where allowed_pnns is a comma-separated list.

allowed_pnns is optional.  If not specified then address can be
assigned to all nodes that aren't included in an allowed_pnns list.
Just think of it as all PNNs and that the behaviour is undefined when
you only specify allowed_pnns for some IPs.  ;-)

current_pnn is optional and defaults to -1.

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

(This used to be ctdb commit ed83604da82ebe566d6eb330ab7119e861e853c8)
2011-11-01 21:01:25 +11:00
Martin Schwenke
695432c52f Tests - IP allocation tests - must export CTDB_LCP2.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a97f19d1281eaf9874e64995a43524aeed315515)
2011-11-01 21:01:25 +11:00
Martin Schwenke
98c27f973d LCP IP allocation algorithm - new function lcp2_failback_candidate()
There's a bug in LCP2.  Selecting the node with the highest imbalance
doesn't always work.  Some nodes can have a high imbalance metric
because they have a lot of IPs.  However, these nodes can be part of a
group that is perfectly balanced.  Nodes in another group with less
IPs might actually be imbalanced.

Factor out the code from lcp2_failback() that actually takes a node
and decides which address should be moved to which node.

This is the first step in fixing the above bug.

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

(This used to be ctdb commit 75718c5768b5bb5c0bcd7dd90e0327c6ed22a63d)
2011-11-01 21:01:25 +11:00
Ronnie Sahlberg
552412d180 Merge remote branch 'ddiss/master_pmda_namespace'
(This used to be ctdb commit 6dbbc86f36a1fd07d90ca947a35ad7b1f8554636)
2011-10-31 20:25:16 +11:00
Ronnie Sahlberg
1f74d60491 Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit bdcaf531e07ad5a08841aab2f396849c554a0fa6)
2011-10-28 16:04:55 +11:00
Ronnie Sahlberg
263031c73a Tests: convert test tool for fetching a readonly lock to libctdb
(This used to be ctdb commit 18b6969dd1760521f839e5a928f1c7e9b3c34d4e)
2011-10-28 15:50:44 +11:00
Ronnie Sahlberg
25f1b4eb86 Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 996aa01af9b402d2cd07c6942fdcc5ffc111ca85)
2011-10-28 13:51:46 +11:00
Ronnie Sahlberg
74579a3193 libctdb: dont allow ctdb_writerecord() for readonly records
(This used to be ctdb commit c930a44731d24b3bb51851864c7cdd0061483c0b)
2011-10-28 13:38:32 +11:00
Ronnie Sahlberg
86a1482514 Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 0474a9244c6721f85955efcbdd630c0e5990e76c)
2011-10-28 12:56:24 +11:00
Ronnie Sahlberg
bb3509b6d2 ReadOnly: If record does not exist, upgrade to write-lock
If we attempt a readonly lock request for a record that do not exist (yet)
in the local TDB, then upgrade the request to ask for a write lock and force a
request for migrate the record onto the local node.
This allows the "only request record on second local request for known contended records"
heuristics to try to avoid creating readonly delegations unless we have good reason to
assume it is a contended record.

(This used to be ctdb commit e6003e52617385f731ccf93b13d21d5403534a78)
2011-10-28 12:41:27 +11:00
Ronnie Sahlberg
e7cdc3cd4c Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 0452f212f2ddc1089dce83339bad0d73763f238f)
2011-10-28 12:10:38 +11:00
Ronnie Sahlberg
c21ec9fffc ReadOnly: add readonly record lock requests to libctdb
Initial readonly record support in libctdb.
New records are not yet created by the library but extising records will be delegated as readonly records.
This needs a bit more tests before we can drop the "old style" implementation of client
code in client/ctdb_client.c

(This used to be ctdb commit fb50a45a21ff56480d76acd1c33c13c323cbf5e2)
2011-10-28 11:55:46 +11:00
Ronnie Sahlberg
19bd9149c3 ReadOnly: fix bug writing incorrect amount of data in delegated record
Fix bug when ctdbd updates the local copy of a delegated record to write the correct
amount of data to the record.

(This used to be ctdb commit 8814d8bc159a5e368afaa236ac7d865165db04b2)
2011-10-28 11:44:19 +11:00
Ronnie Sahlberg
26aee76add Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 0a2ea7e1a1e034a9a17debff763084a0936b0515)
2011-10-24 13:30:28 +11:00
Ronnie Sahlberg
f7db49798c ReadOnly DOCS: update the docs for readonly delegations to remove the passage that records are written/updated by the client
(This used to be ctdb commit b44ded0e0771c87321b568588c08195222a026c3)
2011-10-24 13:19:30 +11:00
Ronnie Sahlberg
a9e77de9e4 ReadOnly: Dont update the record header from the calling client. While it is convenient since it avoids having to create a child process from the main dameon for writing the updated record it makes the cleitn more complex.
Remove the code in the example client code that writes the record to the local tdb.
Add code to the local ctdbd processing of replies to check if this reply contain a ro delegation and if so, spawn a child process to lock the tdb and then write the data.

(This used to be ctdb commit bf1d429227dc4f5818263cc39401d0a22663cdba)
2011-10-24 13:14:26 +11:00
Ronnie Sahlberg
90c0c235fa Remove debug message
(This used to be ctdb commit db0fdc2281c4742113c92d697371c37815db35a0)
2011-10-24 12:21:55 +11:00
Ronnie Sahlberg
4dabd1fe05 Merge remote branch 'martins/tests'
(This used to be ctdb commit 99de5bceb788ba56ebc052c05d29a834ba2496fa)
2011-10-18 11:54:55 +11:00
Martin Schwenke
2e3febe283 onnode: unset EXTRA_SSH_OPTS when using fakessh
This case was never tested and fakessh obviously won't handle the
extra arguments.

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

(This used to be ctdb commit 02184bd5b9ab94cdf2b9ff92e56a509f92f9e4aa)
2011-10-18 11:51:06 +11:00
Martin Schwenke
4b034a6401 Web - add me as a developer. :-)
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit c774e17c78f181833ca688aa48b42e7b90c822d8)
2011-10-18 11:50:05 +11:00
Ronnie Sahlberg
24b56c62b1 Merge branch 'master' of ssh://git.samba.org/data/git/ctdb
(This used to be ctdb commit dd9f82dbe2346c7143b0229e3611c402ee8c4025)
2011-10-17 15:08:39 +11:00
Martin Schwenke
71b8015ccf Make ctdb_diagnostics more resilient to uncontactable nodes.
Current behaviour is for onnode to timeout (for about 20s) for each
attempted ssh to a down node.  With 40 or 50 invocations of onnode
this takes a long time.

2 changes to work around this:

* If EXTRA_SSH_OPTS (which is passed to ssh by onnode) does not
  contains a ConnectTimeout= setting then add a setting for a 5 second
  timeout.

* Filter the nodes before starting any diagnosis, taking out any "bad
  nodes" that are uncontactable via onnode.

  In the nodes summary at the beginning of the output, print
  information about any "bad nodes".

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

(This used to be ctdb commit 8c3b6427dbaade87e1a0f5590f0894c2e69b31a3)
2011-10-13 14:27:34 +11:00
Michael Adam
2189337334 doc: update compiled manpages of ctdb.1 after change to xml
(This used to be ctdb commit 1198df0fd2c90cbca86d0499b43562fac4f25731)
2011-10-12 22:38:02 +02:00
Gregor Beck
28a434051c ltdbtool: ignore empty (deleted) records per default.
Add option -e to get the old behaviour and process empty records too.

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit d9859540c2000864bc6c58be5afe19aa3b1064b2)
2011-10-12 22:38:02 +02:00
Ronnie Sahlberg
a19ec048ca Merge branches 'master' and 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 137299fadd0537612701c5902517857028236ed7)
2011-10-12 20:11:28 +11:00
Mathieu Parent
0250b72a65 Fix bashism in 40.fs_use
Also, add -P to df, to avoid multiline on Linux when device name is long (this is the case with LVM)

(This used to be ctdb commit f4d5a5810f1a840a41c3541a3b822fce44d41e9a)
2011-10-12 20:08:40 +11:00
Mathieu Parent
d71d640d33 Typo deamon -> daemon
Thanks to lintian

(This used to be ctdb commit dd9e508c947613cc7a5046a35c80fbeced408803)
2011-10-12 20:08:08 +11:00
Mathieu Parent
a1919fd316 apache's service name is not always httpd
Solution 2 of <https://bugzilla.samba.org/show_bug.cgi?id=8317>

(This used to be ctdb commit 8b9ac5cd8d867ff4866ac464c570d9293d03a91e)
2011-10-12 20:07:45 +11:00
Mathieu Parent
7f1ff4dbd8 Less verbosity when there is no public addresses file
This partialy reverts 81eff51, but still avoid spam.

(This used to be ctdb commit e646142f4d28b5401235cd5edee325f7a29f8193)
2011-10-12 20:07:03 +11:00
Mathieu Parent
df0dd8a3ab Fix broken readdir
Submited by Lorenzo De Liso on <http://bugs.debian.org/603155>
(originaly named 99-fix-broken-readdir-test.diff). Also reported as
<https://bugzilla.samba.org/show_bug.cgi?id=7032>.

(This used to be ctdb commit 29474420606e802c83b53ef5f8e372c8eeac83c1)
2011-10-12 20:06:13 +11:00
Martin Schwenke
4b606fbb56 Tests - simple integration - do a "ctdb sync" after restarting the cluster
There looks to be a minor race where IPs haven't yet been reallocated
but the cluster is healthy.  This should fix it.

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

(This used to be ctdb commit 2d6a800a789ca59fdab92422f98a4e05ba55f34c)
2011-09-25 14:45:48 +10:00
Martin Schwenke
155862ea21 Tests - IP allocation - initial unit tests
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3922225ddff90281189ebdab77620b560d233e04)
2011-09-25 14:45:48 +10:00
Martin Schwenke
87b02f5d45 Tests - IP allocation - allow more interesting node states to be specified
Node states on the command line are now comma-separated hex numbers,
so all flag states can be expressed.

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

(This used to be ctdb commit 1f1534435b9d5f464604e28a8cce2cd0a779ef68)
2011-09-25 14:45:48 +10:00
Ronnie Sahlberg
d79596ba1a One of the entry points to release an ip reset the pnn field before invoking the eventscript.
this triggered a check for "only run the eventscript if we host the address" to trigger and shortcir=cuit calling the eventscript.

An effect of this would be that 'ctdb delip' would remove the ip from ctdb, but fail to delete it from the interface.

S1028798

(This used to be ctdb commit b82524f240bf21769dd7624ca6026763d38b9396)
2011-09-22 15:17:23 +10:00
Ronnie Sahlberg
8a104331e8 Change the 'This Node' column of the machinereadable output for 'ctdb status -Y' to Y/N instead of 1/0
1/0 is unsuitable since it can be useful to check 'if a column is "1" there is something wrong with that node'

(This used to be ctdb commit b963f5e40b1e73a60363568da88557cad9e58a28)
2011-09-21 15:41:28 +10:00
Ronnie Sahlberg
4587bdb052 when checking that the interfaces exist in ctdb_add_public_address()
cant talloc off vnn since it is not yet initialized and might not always be NULL

(This used to be ctdb commit 3d37be3e2bfb61ede824028aeebaa18ba304faae)
2011-09-21 11:42:19 +10:00
David Disseldorp
a3357af926 pmda: Use upstream assigned PCP domain id
Also use saner PMIDs in the pmns file.

(This used to be ctdb commit dcf150f8165316fefd53f9eecb1437195e631da6)
2011-09-14 12:54:04 +02:00