1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

208 Commits

Author SHA1 Message Date
Amitay Isaacs
89415a1f00 build: Use system talloc library if available
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 94f1e02406c353c3a0235685acdd107ee5a7f285)
2012-03-30 12:33:27 +11:00
Amitay Isaacs
25d01ece07 build: Display correct LIB_FLAGS while building
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0cbe7a4f92795203f022252a50a240b8bd4238c3)
2012-03-30 12:33:27 +11:00
Amitay Isaacs
da7a1ccb81 build: Add rules to create ctags/etags
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a9e9444a7a78f5ef0e929a8dbd8ca0c68b40acd4)
2012-03-30 12:32:05 +11:00
Martin Schwenke
56d90e930d Eventscript support - Remove unused interface_modify.sh
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 994492f79275fe84155d842f6bc288c1858217dd)
2012-03-22 15:30:27 +11:00
Ronnie Sahlberg
f7b2adfde6 Test: add test tool and test that UPDATE_RECORD works on persistent databases
(This used to be ctdb commit f06634951331232cddf0b48eac3552b92aca5b93)
2012-03-12 16:10:09 +11:00
Michael Adam
55abb07f51 server: move the code for the update_record control to its own file
It is very misleading in ctdb_persistent.c, since it is used for non-persistent
dbs...

(This used to be ctdb commit a956fa3a27106d0154a3fb46987d61c0a6b7c768)
2012-02-21 17:54:17 +01:00
Volker Lendecke
3d71e9f7f0 Add common/system_freebsd.c
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 89067e12b868974f9909b447ab5e202d612ac44f)
2012-02-13 16:32:35 +01:00
Mathieu Parent
938bb15ad9 Load platform dependent objs instead of Linux one
This fix compilation on Gnu/Hurd and kFreeBSD

See also:
https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=hurd-i386&ver=1.12%2Bgit20120201-1&stamp=1328211119
https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=kfreebsd-amd64&ver=1.12%2Bgit20120201-1&stamp=1328214761
https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=kfreebsd-i386&ver=1.12%2Bgit20120201-1&stamp=1328215875

(This used to be ctdb commit 496e8f8540f78606ef23ee8fa100eb2b2cf3f106)
2012-02-11 11:15:06 +11:00
Martin Schwenke
31487f31df Tests - add a version of the ctdb tool that compiles against libctdb stubs
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 6c79b951c3ae68238f8dbd836ceca6c1187eaabe)
2012-02-06 16:00:24 +11:00
Martin Schwenke
97863216ed Tests - update test code for ctdb tool code and libctdb stubs
Rename ctdb_parse_nodestring.c to ctdb_tool_libctdb.c.  It can contain
many tests.

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

(This used to be ctdb commit d597020af01dfcdf0d39e1cf579bf33f43f87dda)
2012-02-06 16:00:23 +11:00
Martin Schwenke
af7611e4e0 Tests - test code for parse_nodestring() function
This function is fairly complex so here is some test code.

This reworks Makefile a bit and also provides test stubs for some
libctdb functions.

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

(This used to be ctdb commit 5b11f990404c26c279c9ae389483e560f1c01a81)
2011-12-08 17:21:24 +11:00
Michael Adam
a46e1d9d2c build: add target libctdb.so.0 and symlink libctdb.so
(This used to be ctdb commit 66af6659eaffaeafbfa58779162aabe915d1c50f)
2011-11-26 00:34:56 +01:00
Michael Adam
0f0250c2d0 build: add socket_wrapper objects to test binaries
(This used to be ctdb commit 7d4809ba343114e435830c7c1ab047dc4ce5ff0e)
2011-11-26 00:34:55 +01:00
Michael Adam
0ad39b733a build: add option --enable-socket-wrapper to build binaries with socket wrapper support
(This used to be ctdb commit 8d65d7f399ba2e6a4162eed5e84a58c7cb024187)
2011-11-26 00:34:55 +01:00
Martin Schwenke
bbe7cfd28f Tests: change ctdb_takeover_tests.c to include ctdbd code
Do this instead of linking to it.  This means that, after previous
cleanups, we can fix ctdb_takeover.c to use static functions when
appropriate and simply include all the code we need to run tests.

To make this reusable in other tests, new file ctdbd_tests.c does all
of the relevant including.  ctdb_takeover_tests.c just includes that
file.

Test objects built in this way can depend on new Makefile macro
$(CTDB_TEST_C), which contains ctdbd_tests.c and everything it
includes.

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

(This used to be ctdb commit 41869d42194b74db43a176a068e96e411007e5f2)
2011-11-11 14:31:50 +11:00
Martin Schwenke
bbea7ffdd0 Clean up warnings: rpcgen output contains unused variable.
Grep it out in the Makefile.  This should be very obvious if the
output changes and the grep breaks something.

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

(This used to be ctdb commit 79638bdd884caaf899c1b41984a5f0cf638207b5)
2011-11-11 14:29:36 +11:00
Martin Schwenke
aa3e368d3c Clean up warnings: add -Wno-format-zero-length to CFLAGS
There's an empty string passed to ctdb_event_script_callback() for
eventscript option arguments in ctdb_start_daemon() and this generates
a warning.

This type of warning seems pointless so let's switch it off.

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

(This used to be ctdb commit 23c164926c5ec4da6d90a5bdcbf2d0100729b451)
2011-11-10 14:10:21 +11:00
Martin Schwenke
59b4d7bf9d Clean up warnings: ‘tevent_loop_allow_nesting’ is deprecated
CTDB wants to use these functions but Samba's tevent wants to mark
them deprecated.  This adds a #define to shut up the warnings and sets
it in CFLAGS.

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

(This used to be ctdb commit 788cdbddbc902a5b076d23473450065b551d274d)
2011-11-09 14:41:17 +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
0dc5584101 Merge branch 'master-readonly-records' into foo
Conflicts:

	Makefile.in
	tools/ctdb.c

(This used to be ctdb commit 0fedef0ffba4178126eee9544c5e2db52f5db893)
2011-09-12 09:34:34 +10:00
David Disseldorp
9699e5750d pmda: Initial ctdb pmda check-in
The CTDB Performance Metrics Domain Agent (PMDA) is compiled when
Performance Co-Pilot (PCP) header files are present.

The CTDB PMDA periodically requests runtime counters from ctdbd (similar
to ctdb statistics) and exports these values via PCP for capture and
charting etc.

(This used to be ctdb commit fe7f69d6fc37661c2f1caa11de4ed3a7940d0a2f)
2011-09-06 14:01:18 +02:00
Ronnie Sahlberg
faf6710cde tests:ctdb_fetch_lock_once we must link with @POPT_OBJ@ in case -lpopt is not available
(This used to be ctdb commit cdbc800a776f213cfd0ed543cee85b0d1714a186)
2011-09-02 13:31:41 +10:00
Ronnie Sahlberg
8c3489430e tests: Link ctdb_fetch_lock_once with @TDB_OBJ@ not -ltdb so we dont create an unneeded dependency on having a standalone tdb library installed
(This used to be ctdb commit 9118b9cf1634866266fbf0a9bf857a622f994a1a)
2011-09-02 13:21:33 +10:00
Ronnie Sahlberg
c0f724e0f9 LibCTDB : change the ctdb_fetch_lock_once test tool to use libctdb instead of the old client
(This used to be ctdb commit cd1080726d7787b335ab4bfb64a7991237ab92f5)
2011-08-23 15:32:27 +10:00
Ronnie Sahlberg
6f7aacb87b LibCTDB : change the ctdb_fetch_lock_once test tool to use libctdb instead of the old client
(This used to be ctdb commit 231f16b3e0c9c44fc85c95bde7951ccfab50af91)
2011-08-23 15:13:40 +10:00
Ronnie Sahlberg
c968880e87 ReadOnly: Add a test tool that requests a readonly delegation in a loop
(This used to be ctdb commit 72a6e77fe56a4a6d11b1d02fa049b6dd347ac0f1)
2011-08-23 10:34:59 +10:00
Ronnie Sahlberg
f6de7550a4 ReadOnly: Add a test tool to fetch a record, requesting a readonly delegation and lock the record once
(This used to be ctdb commit 29c77c249d0454057ce28003e018e126c7c01513)
2011-08-23 10:34:36 +10:00
Ronnie Sahlberg
b8d06cb41b ReadOnly: add a new test tool that does a fetchlock on a record, then bunps the RSN by 10 and writes the new content to the record as sprintf("%d", rsn)
(This used to be ctdb commit 151b25798f2a2c182fc9557c1c1ea0f3ef0ad3fe)
2011-08-23 10:13:10 +10:00
Ronnie Sahlberg
9fdd258606 ReadOnly: Add test tool to validate the functions to manipulate and enumerate the bitmap of nodes to where we have readonly delegations
(This used to be ctdb commit bfdeda30ee0e359f06dd5714864f8beae22b0736)
2011-08-23 10:10:54 +10:00
Ronnie Sahlberg
ee96db07d5 Add new eventscript 40.fs_use that can be used to monitor file system use and flag a node unhealthy when they become full
(This used to be ctdb commit 2fd1babf8135ad5d53f3b25ba823d840ebc66460)
2011-08-11 10:04:40 +10:00
Ronnie Sahlberg
a17ae8a8be Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 518945e59e2e48f07fcc0955f3aa81cd0d946aea)
2011-07-29 09:04:01 +10:00
Martin Schwenke
5ac67504ca Tests: Initial test code for LCP2 IP allocation algorithm.
Move struct ctdb_public_ip_list to ctdb_private.h and put some
definitions for some functions from ctdb_takeover.c there.  This
allows those functions to be called from unit tests.

Add ctdb_takeover_tests.c and the Makefile support to build it.

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

(This used to be ctdb commit 9d34be0233edf3bc022345c0494c4b2a4d7f8480)
2011-07-29 09:01:36 +10:00
Mathieu Parent
4a43450968 Manpage for ping_pong
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit af75d3e37412e03d3978073edbe6dee78f265c3c)
2011-06-23 15:56:17 +02:00
Michael Adam
3c82a043b1 install the ltdbtool manpage with "make install"
(This used to be ctdb commit ffbff1affed8301831387e23b4f8f824d9f78e20)
2011-05-04 14:40:12 +02:00
Michael Adam
f3066d7fb4 install ltdbtool with "make install"
(This used to be ctdb commit 991ea66e5ed0eb7ab256dc8e3118dc78462d4752)
2011-05-04 14:40:12 +02:00
Michael Adam
c8f803769d build "ltdbtool" in "make all"
(This used to be ctdb commit d91e80c698a7706460e9ee74bd4f5a9ab0a7b9b1)
2011-05-04 14:38:22 +02:00
Gregor Beck
95d35de8d5 ltdbtool: add manpage
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 2ed3603274cd38dde4ae98eef653e9a9de631eb5)
2011-05-04 14:38:22 +02:00
Gregor Beck
082de99f87 add ltdbtool - a standalone ltdb tool
This this is a tool to handle (dump and convert) ctdb's local tdb
copies (ltdbs) without connecting to a ctdb daemon.

It can be used to

* dump the contents of a ltdb, printing
  the ctdb record header information

* dump a non-clustered tdb database (like tdbdump)

* convert between an ltdb and a non-clustered tdb
  (adding or removing ctdb headers)

* convert between 64 and 32 bit ltdbs
  (the ctdb record headers differ by 4 bytes of padding)

usage: bin/ltdbtool dump [-p] [-s{0|32|64}] <idb>
       bin/ltdbtool convert [-s{0|32|64}] [-o{0|32|64}] <idb> <odb>

Pair-Programmed-With: Michael Adam <obnox@samba.org>

(This used to be ctdb commit efcf2815711cd5371633614fb91273bd0a786da0)
2011-05-04 12:48:50 +02:00
Ronnie Sahlberg
b2d7554b32 Add a new test tool that fetch locks a record and then blocks until it receives
user input to unlock the record again.

(This used to be ctdb commit 1b3c5278aa1bf712606e2ec138e6be7b2e8a6ad1)
2011-01-24 12:21:46 +11:00
Ronnie Sahlberg
1df9ed58b0 Add 60.ganesha to what gets installed by make install as well as by the RPM
(This used to be ctdb commit 8a6da384f3fa08b1c5eba79d6febc7af7b3d9229)
2010-12-06 11:50:18 +11:00
Ronnie Sahlberg
9f66a93f12 Add rolling statistics that are collected across 10 second intervals.
Add a new command "ctdb stats [num]" that prints the [num] most recent statistics intervals collected.

(This used to be ctdb commit e6e16fcd5a45ebd3739a8160c8fb5f44494edb9e)
2010-09-29 12:14:45 +10:00
Ronnie Sahlberg
0757edfd83 remove 61.nfstickles from the makefile
(This used to be ctdb commit 893465ddde0b730aa142f165cfdc4a57fc5517bf)
2010-08-30 18:29:56 +10:00
Ronnie Sahlberg
ddf3c621c1 Merge commit 'rusty/libctdb-new' into foo
(This used to be ctdb commit 1566d2d23ab698896b3b6a76974a5c7452db4a62)
2010-08-18 09:53:52 +10:00
Rusty Russell
f93440c4b7 event: Update events to latest Samba version 0.9.8
In Samba this is now called "tevent", and while we use the backwards
compatibility wrappers they don't offer EVENT_FD_AUTOCLOSE: that is now
a separate tevent_fd_set_auto_close() function.

This is based on Samba version 7f29f817fa939ef1bbb740584f09e76e2ecd5b06.

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


(This used to be ctdb commit 85e5e760cc91eb3157d3a88996ce474491646726)
2010-08-18 09:16:31 +09:30
Volker Lendecke
a79168f587 Correctly set docdir
(This used to be ctdb commit a69916d0687309766b0014dc9cee6a966aaa89da)
2010-08-16 11:28:05 +10:00
Rusty Russell
379fd4e606 libctdb: add logging infrastructure
This is based on Ronnie's work, merged with mine.  That means
errors are all my fault.

Differences from Ronnie's:
1) use syslog's LOG_ levels directly.
2) typesafe arg to log function, and use it (eg stderr) in helper function.
3) store fn in ctdb context, and expose ctdb_log_level directly thru API.

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

(This used to be ctdb commit 86259aa395555aaf7b2fae7326caa2ea62961092)
2010-06-04 20:27:03 +09:30
Ronnie Sahlberg
ae3e91f0ce link ctdb with libctdb and connect to the daemon both the old way and by using libctdb
update the function "control_pnn()" to use libctdb to ask the daemon for the pnn

(This used to be ctdb commit 3f651eb8d71c7af0268460bc4b1476112140b290)
2010-06-02 10:37:00 +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
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
080cef25d0 make install to install libctdb.a
(This used to be ctdb commit 93f1622cd4106fb1a2acbe643cbb2b3dc9fd0103)
2010-05-26 09:01:26 +10:00