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

2876 Commits

Author SHA1 Message Date
Ronnie Sahlberg
bc208bc916 rename ctdb_set_message_handler to ctdb_client_set_message_handler
to avoid a colission with the function of the same name in libctdb

(This used to be ctdb commit 41dbdd4fc0ab560420fb0e24a3179ff7c94c5bb7)
2010-06-02 09:51:47 +10:00
Ronnie Sahlberg
761a075de9 rename ctdb_send_message to ctdb_client_send_message to resolve colission with the function of the same name in libctdb
(This used to be ctdb commit ac3292c12832484a22715f1d46aa23f3b7c8a6f6)
2010-06-02 09:45:21 +10:00
Ronnie Sahlberg
d3a696c6a8 Dont link with libctdb
This makes it easier to ensure we catch all places
when we rename old api functions due to colissions with
functions in libctdb

(This used to be ctdb commit d643240783d4847591c5f72ee4d65e5daf1dbcf7)
2010-06-02 09:43:16 +10:00
Ronnie Sahlberg
2f188c6422 Update the tst.c example application for libctdb to
use the headers from /usr/include
and add a comment about how to compile it

(This used to be ctdb commit c0f38e0936c487b63964fd9cef7a9370f227275f)
2010-06-02 09:24:17 +10:00
Ronnie Sahlberg
bdbf7077e8 rename ccan/typesafe_cb.h to ctdb_typesafe_cb.h and
add this file to the install/rpm

(This used to be ctdb commit 96f186240a17386de1e02eb3af392d97bb55a1ae)
2010-06-02 09:18:48 +10:00
Ronnie Sahlberg
4136f27145 When adding an ip at runtime, it might not yet have an iface assigned to it, so ensure that the next takover_ip call will fall through to accept the ip and add it.
(This used to be ctdb commit 2d60f96680d16c2992e2a35517822f88c12538b7)
2010-06-01 16:22:48 +10:00
Ronnie Sahlberg
004b849feb Dont check linkstatus for loopback. This interface never has
issues with the physical layer

(This used to be ctdb commit d938b80a1c409a9ec4b554ddca5b0d949be53d9e)
2010-06-01 14:51:09 +10:00
Ronnie Sahlberg
db9e00eec8 Prevent clients from connecting to the natgw address.
This address is dedicated for outgoing connections.

BZ62613

(This used to be ctdb commit f0e48dd833a4408449083148c172c2136b934e5b)
2010-06-01 12:43:32 +10:00
Ronnie Sahlberg
cb5210043d add a gplv3 boilerplate to the example application for libctdb
(This used to be ctdb commit 53df35aff1e10201a38931bbb82fb266a38892c0)
2010-05-26 13:55:19 +10:00
Ronnie Sahlberg
92340e4d6f check if vnn is a valid pointer before dereferencing it
based on rustys patch for bz62783

(This used to be ctdb commit bdd250b9afdd1060cfd1e2b0f0a5a567150bb380)
2010-05-26 13:43:28 +10:00
Ronnie Sahlberg
40c6535127 move the header files and libctdb.a out into a separate ctdb-devel rpm
(This used to be ctdb commit 3587df065669972a631ba08918df37536c9cb633)
2010-05-26 10:01:37 +10:00
Ronnie Sahlberg
080cef25d0 make install to install libctdb.a
(This used to be ctdb commit 93f1622cd4106fb1a2acbe643cbb2b3dc9fd0103)
2010-05-26 09:01:26 +10:00
Ronnie Sahlberg
41634eae3b make sure we build libctdb for "make all"
(This used to be ctdb commit 76acb97ebcfc378e98767113a81e413969917bb1)
2010-05-26 08:56:46 +10:00
Ronnie Sahlberg
0d46488f6e Merge commit 'rusty/libctdb2'
(This used to be ctdb commit d41b802250ddc0a89581eb6285edfd66bdc7a78a)
2010-05-25 12:48:49 +10:00
Ronnie Sahlberg
949fc096ed new version 1.9
(This used to be ctdb commit e553da6a060c9cd2514bdb888cf0e50d35572b88)
2010-05-25 12:47:15 +10:00
Ronnie Sahlberg
ad2b7c28b6 Add monitoring of quorum and make the node UNHEALTHY when quarum is lost
(This used to be ctdb commit d58b575e15015c5ef9493ab3ad3e8657c5787e2c)
2010-05-25 12:46:28 +10:00
Ronnie Sahlberg
03b112cb33 in 62.cnfs, lines in /etc/exports can have hte exports quoted,
so strip off any initial " on the exports line

(This used to be ctdb commit dce2244e8ac6617c335cfcd721c3795071b9f2b2)
2010-05-25 12:46:08 +10:00
Ronnie Sahlberg
6578a97bd9 It was possible for ->recovery_mode to get out of sync with the new three db priorities in such a way that
->recovery_mode was set to normal   but database priorities leven2 or 3 was still set to frozen.

causing the recovery daemon to fail to detect that a recovery was needed to recover access to the database.

BZ63951

(This used to be ctdb commit 7411b2b577a16f85ad6913e1bfccce7ea260a613)
2010-05-25 12:45:54 +10:00
Rusty Russell
bd8d302589 libctdb: tweak interface for readrecordlock
Previously we could hang in poll with the callback pending (since we
fake it): explicitly call it immediately.

Note: I experienced corruption using DLIST_ADD_END (ctdb->pnn was blatted
when adding to the message_handler list).  I switched them all to DLIST_ADD,
but maybe I'm using it wrong?

(This used to be ctdb commit 3727165f0d206999d2cfc2800ff8868640868c7c)
2010-05-24 13:52:17 +09:30
Rusty Russell
30f4d01df1 libctdb: uniform callbacks, _recv functions to pull out data.
This is a bit tricky for those cases where we need to do multiple or
zero I/Os (eg. attachdb and readrecordlock), but works well for the
simple cases.

(This used to be ctdb commit ebe4dd724338c156423cfdcc10a75b68c2084cde)
2010-05-24 13:17:36 +09:30
Rusty Russell
f45cf4a711 tst.c: update to Ronnie's latest
This provides a slightly more comprehensive test of the library.

(This used to be ctdb commit f36e891c00c63d5b9dfbaddacff86d9da72d3bb7)
2010-05-20 16:16:04 +09:30
Rusty Russell
5db92ccd4d libctdb: Ronnie's build changes, so we actually build libctdb with make.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit f02526486680db1473bdf10328e8f62a2590c745)
2010-05-20 15:57:40 +09:30
Rusty Russell
1dc7f2c4f8 libctdb: first cut, supports getrecmaster only
This is a completely standalone library using only ctdb_protocol.h.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Header from folded patch 'libctdb-message-handling.patch':

libctdb: add message handling to libctdb.

Now clients can send and receive ctdb messages.


(This used to be ctdb commit 732cf6ead4aa2fbefc2b81328171f52c8d935341)
2010-05-21 12:07:41 +09:30
Rusty Russell
7046a1ad0a libctdb: API changes from Ronnie's version
These simplifications mostly came up due to the implementation.

o Rename ctdb_context to ctdb_connection.
   We already have a ctdb_context internally in ctdbd; don't confuse them!
o Rename ctdb_handle to struct ctdb_request.
   From the user POV it's a request, and it's also useful internally to
   avoid implicit cast to/from void *.
o Rename ctdb_db_context to ctdb_db.
o Introduce ctdb_lock.
   This provides an explicit "lock object" you get from readrecordlock
   and have to hand to those functions which need you to hold a lock.
o status args are "int" not int32_t.
   Should this be a bool?
o Remove last traces on generic callback.
   Without semi-sync API, this doesn't help anything and loses type safety.
o Remove the semi-async API.
   We can add this later, but I think a sync and async API is enough for
   our poor users for the moment :)
o Registering a message handler also takes a callback.
   This way you can tell if it failed.  Not sure if this is overkill, but it's
   consistent.
o ctdb_service() takes an revents arg
   Strictly not necessary for a nonblocking fd, but nice to know if a
   read or write is possible.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 86e1f93df856f9627182ed0e18bfcff6866c0954)
2010-05-20 16:07:30 +09:30
Rusty Russell
bbfb992f55 libctdb: ctdb.h and tst.c from Ronnie
This imports ctdb.h and tst.c from Ronnie's work: it's a separate commit
for now to make the changes obvious.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 09f05cbfc883e5aac33d3781b163cde178ece4cf)
2010-05-20 16:01:28 +09:30
Rusty Russell
d5f6026a22 libctdb: reorganize headers: remove ctdb.h, add ctdb_client.h and ctdb_protocol.h
ctdb_client.h is the existing internal client interface (which was mainly
in ctdb.h), and ctdb_protocol.h is the information needed for the wire
protocol only.

ctdb.h will be the new, shiny, libctdb API.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 4bba6b8cd47b352f98d41f9f06258d5ac3c9adef)
2010-05-20 15:18:30 +09:30
Ronnie Sahlberg
6c5256ae69 In control_ipreallocate() we wait at most 5 tries before aborting the command
and returning an error.
This might not be sufficient if there are several recoveries in a row.

Instead loop as long as it takes for the recovery master to finish the recoveries and re
spond to the ipreallocate call.

Increase the log level of the error message when the recovery master was busy and could
not perform the ipreallocation promptly

BZ61783

(This used to be ctdb commit 8e9fd36e4619b7cc7bb6f7f7416d13e4c00a296a)
2010-05-20 12:35:57 +10:00
Ronnie sahlberg
ba0fc58235 document how to restore a backup into a different database
(This used to be ctdb commit 66e05500b6e5c8fa5efbcba4447e488dd4232897)
2010-05-20 11:44:18 +10:00
Ronnie Sahlberg
e1d1c230d3 Enhance the "ctdb restoredb" command so you can restore a backup into a different database.
(This used to be ctdb commit c692b09851fce85b61c8c654faafb49db8cb601b)
2010-05-20 11:26:37 +10:00
Ronnie sahlberg
1c357ff12d Merge commit 'obnox/master-rebase'
(This used to be ctdb commit 3f0346dc758d3b05ccb86785e7c8a2d5679ff68c)
2010-05-11 19:44:11 +10:00
Michael Adam
b40fa22239 functions: when checking for a directory also check whether it can be accessed.
Thanks to "waKKu" on irc for this improvement.

Michael

(This used to be ctdb commit 81e1483dd0ce2cd091721e456c0c194cc58442f3)
2010-05-11 11:29:45 +02:00
Michael Adam
e0666edf6b tests:ctdb_bench: make send_start_messages() static - eliminates compile warning
Michael

(This used to be ctdb commit e1a16c23d7dbf011ad220572f1bf081331efa8f8)
2010-05-11 11:29:45 +02:00
Michael Adam
fd5a55cd22 tests: eliminate a floating point exception by requiring -n option to ctdb_bench
Michael

(This used to be ctdb commit 07823e1fe75c588b75f4e42c80b0a7bc974238f7)
2010-05-11 11:29:45 +02:00
Ronnie Sahlberg
6f1221e9e1 Add the number of performed recoveries to the "ctdb statistics" output.
(This used to be ctdb commit fa045733cb81412f0d02ab52d74eabc7efca8b3d)
2010-05-11 09:44:53 +10:00
Rusty Russell
72c275dd70 ctdb: use full range of IDR
This resolves a problem with huge numbers of requests which could overflow
16 bits.  Fortunately, the IDR should scale reasonably well, so we can simply
hold all the requests.

Although noone checks for failure, I added a constant for that.

BZ: 60540
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 72efc4122e37798227c3420a65ed1f706ca9ebe7)
2010-05-11 09:44:43 +10:00
Ronnie Sahlberg
7a62592fc5 when performing a recovery,
ensure that all nodes use the same reclock file setting as the recovery master

(This used to be ctdb commit 26793ad42b77c2328a00ac9a12bca813c7425245)
2010-05-06 09:33:08 +10:00
Ronnie Sahlberg
1cb2b0b2d0 Add a new eventscript 62.cnfs to integrate better with gpfs/cnfs
(This used to be ctdb commit 4a679422dc231aa98605b9cc322e4ab442f7bde4)
2010-05-04 13:56:55 +10:00
Ronnie sahlberg
46f00a2478 Merge commit 'rusty/signal-fix'
(This used to be ctdb commit 221a9bb41c3a7af0cc65cda78365010893ca1430)
2010-05-03 15:57:41 +10:00
Ronnie Sahlberg
62742bd337 Dont check ip assignment across the cluster while ip-verification
checks are disabled

(This used to be ctdb commit 189f4a5af1053271b0834522e35c336df959aa03)
2010-05-03 15:52:02 +10:00
Ronnie Sahlberg
4a43428440 The recent change to the recovery daemon to keep track of and
verify that all nodes agree on the most recent ip address assignments
broke "ctdb moveip ..." since that call would never trigger
a full takeover run and thus would immediately trigger an inconsistency.

Add a new message to the recovery daemon where we can tell the recovery daemon to update its assignments.

BZ62782

(This used to be ctdb commit e7069082e5f0380dcddee247db8754218ce18cab)
2010-05-03 15:47:17 +10:00
Ronnie Sahlberg
c3c7aa934f Make create_merged_ip_list() a static function since
it is not called from outside of ctdb_takeover.c

(This used to be ctdb commit 880896a27adfdd5173b2810b6b2f3889802046f0)
2010-05-03 15:47:06 +10:00
Ronnie Sahlberg
79fac9771d In the log message when we have found an inconsistent ip address allocation,
add extra log information about what the inconsistency is.

(This used to be ctdb commit d2e4a9912c4bd13eb4f12681adebe7e59a6d1fb2)
2010-05-03 15:46:36 +10:00
Ronnie Sahlberg
d6ae1c4173 If the admin makes a configuration mistake and configures NATGW to use the
same ip address as a normal public-address,
check for this in the natgw script and warn the user.

Also prevent ctdb from starting up since this configuration will not work.

BZ60933

(This used to be ctdb commit 480af69b63b9162c85d8e04461ca9e4a083c04a4)
2010-04-28 08:51:06 +10:00
Ronnie sahlberg
8571fef9d2 Merge commit 'rusty/tdb-update'
(This used to be ctdb commit 35d9ac7d162f99795ac3146fcd464e9d2e45feaa)
2010-04-23 09:25:25 +10:00
Ronnie Sahlberg
2d9fee4f85 Add a setting where CTDB will monitor and warn for low memory conditions.
CTDB_MONITOR_FREE_MEMORY_WARN

BZ 59747

(This used to be ctdb commit 83446b2e7e28e3ed6627c1950053018b8799984a)
2010-04-23 09:08:38 +10:00
Ronnie Sahlberg
8ef5db522a In the example script to remove all ip addresses after a ctdb crash,
add the NATGW address as one to be removed in addition to the
public addresses.

(This used to be ctdb commit 234b86fb19aae7a43f1dd2c0f69b03164fe5aaca)
2010-04-23 09:08:26 +10:00
Rusty Russell
7d094c3dd7 tdb: define _PUBLIC_ so we can compile tdb.
The Samba tree defines _PUBLIC_ (and _PRIVATE_) for libraries to
control visibility.  The last commit absorbed this from their tdb,
but we need to #define to stub it out since ctdb doesn't use it
(and doesn't need to: we only use tdb internally).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 54bee0ec670724c337b882e7dda3e999ffa80691)
2010-04-22 14:11:38 +09:30
Andrew Tridgell
b2b5d9881a tdb: update tdb ABI to use hide_symbols=True
We now use -fvisibilty=hidden to hide symbols from outside the tdb
shared library.

This also moved tdb_transaction_recover() into the tdb_private.h
header, as it should never have been a public API. For that reason we
are changing the version number. We're only doing a minor version
increment as it is extremely unlikely that anyone was actually using
tdb_transaction_recover() as its locking requirements were rather
unusual.

Pair-Programmed-With: Rusty Russell <rusty@samba.org>

(Imported from commit 773a8afbba)

(This used to be ctdb commit e174dc084f11db0eb239b643affef2c02c711b1c)
2010-04-22 14:01:36 +09:30
Jelmer Vernooij
163603f4f4 subunit: Support formatting compatible with upstream subunit, for consistency.
Upstream subunit makes a ":" after commands optional, so I've fixed any
places where we might trigger commands accidently. I've filed a bug
about this in subunit.

(Imported from commit 7da94cc4a6)

(This used to be ctdb commit f1242d9cba676d1d393375bea42613192c70662e)
2010-04-22 13:59:22 +09:30
Simo Sorce
bca9d2764e tdb: update exports and signatures files
(Imported from commit c1f6f61f62)

(This used to be ctdb commit e61ff181085b35cb4aba933350bfe4f64471b359)
2010-04-22 13:58:35 +09:30