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

2794 Commits

Author SHA1 Message Date
Rusty Russell
9a1c172139 tdb: cleanup: rename global_lock to allrecord_lock.
The word global is overloaded in tdb.  The global_lock inside struct
tdb_context is used to indicate we hold a lock across all the chains.

Rename it to allrecord_lock.

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

(Imported from commit e9114a7585)

(This used to be ctdb commit a912657fb50a78b9b328c4564281fb9f7f1b3766)
2010-04-22 13:53:51 +09:30
Rusty Russell
6fec65ac2c tdb: cleanup: rename GLOBAL_LOCK to OPEN_LOCK.
The word global is overloaded in tdb.  The GLOBAL_LOCK offset is used at
open time to serialize initialization (and by the transaction code to block
open).

Rename it to OPEN_LOCK.

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

(Imported from commit 7ab422d6fb)

(This used to be ctdb commit a4f83910a485cf56f9b3df1dcf2ad36ebec57473)
2010-04-22 13:53:51 +09:30
Rusty Russell
db7a4fedc9 tdb: make _tdb_transaction_cancel static.
Now tdb_open() calls tdb_transaction_cancel() instead of
_tdb_transaction_cancel, we can make it static.

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

(Imported from commit a6e0ef87d2)

(This used to be ctdb commit d728a7f65bcd5f1aedbee41d6db5c35f10cb417e)
2010-04-22 13:53:42 +09:30
Rusty Russell
25c9eba372 tdb: cleanup: split brlock and brunlock methods.
This is taken from the CCAN code base: rather than using tdb_brlock for
locking and unlocking, we split it into brlock and brunlock functions.

For extra debugging information, brunlock says what kind of lock it is
unlocking (even though fnctl locks don't need this).  This requires an
extra argument to tdb_transaction_unlock() so we know whether the
lock was upgraded to a write lock or not.

We also use a "flags" argument tdb_brlock:
1) TDB_LOCK_NOWAIT replaces lck_type = F_SETLK (vs F_SETLKW).
2) TDB_LOCK_MARK_ONLY replaces setting TDB_MARK_LOCK bit in ltype.
3) TDB_LOCK_PROBE replaces the "probe" argument.

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

(Imported from commit 452b4a5a6e)

(This used to be ctdb commit 7b5fdc9c588237c83a1e70e5437e2e5510055b92)
2010-04-22 13:53:42 +09:30
Brad Hards
69f5519898 Spelling fixes for tdb.
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>

(Imported from commit 09e756b1d6)

(This used to be ctdb commit b0dff4ed35ab2423b8fcc801cdaaebaa0d7654bb)
2010-04-22 13:53:42 +09:30
Andrew Tridgell
ff2e1c9fd6 tdb: use fdatasync() instead of fsync() in transactions
This might help on some filesystems

(Imported from commit 1373e748aa)

(This used to be ctdb commit e9ee4aaeb471a7f5ba4c97d3f76f406c1fe9b92f)
2010-04-22 13:53:42 +09:30
Volker Lendecke
9f003c2b54 tdb: Apply some const, just for clarity
(Imported from commit 6824c6f46b)

(This used to be ctdb commit 8b0a8a96edf8611257e58ea81ed872dc03ca5da6)
2010-04-22 13:53:42 +09:30
Rusty Russell
e552df6fa6 tdb: fix recovery reuse after crash
If a process (or the machine) dies after just after writing the
recovery head (pointing at the end of file), the recovery record will filled
with 0x42.  This will not invoke a recovery on open, since rec.magic
!= TDB_RECOVERY_MAGIC.

Unfortunately, the first transaction commit will happily reuse that
area: tdb_recovery_allocate() doesn't check the magic.  The recovery
record has length 0x42424242, and it writes that back into the
now-valid-looking transaction header) for the next comer (which
happens to be tdb_wipe_all in my tests).

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

(Imported from commit b37b452cb8)

(This used to be ctdb commit 8c8782ecbb347e026f67d82a39555c0e43b1e9f8)
2010-04-22 13:53:41 +09:30
Rusty Russell
60ae9dfe5d tdb: give a name to the invalid recovery area constant (0)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(Imported from commit 6269cdcd15)

(This used to be ctdb commit e0ca2e02120258aabca1e1586a58a8d672484fb5)
2010-04-22 13:53:26 +09:30
Simo Sorce
d15deef18b release-scripts: parametrize scripts
This should make it easier to keep all release scripts alined as it will reduce
the difference between them to ideally a few variables

Also moves the tdb script in the scripts directory.

(Imported from commit 6339de7f4f)

(This used to be ctdb commit 8885b2206fba41ec289fda5dfd653ee676aa0dd3)
2010-04-22 13:53:21 +09:30
Simo Sorce
b68642d51c tdb: raise version to 1.2.1
after recent fixes we need to raise the version to 1.2.1 so that
we can require also the right patched version.

(Imported from commit 70534adee1)

(This used to be ctdb commit 84c971f33c24d32e5599aba7ba83bb474f7ac922)
2010-04-22 13:45:58 +09:30
Martin Schwenke
f765f0ceca Fix a thinko in 2ea0a9f1a93781a0d036feb9fcc0d120b182922f.
If the driver is virtio_net then we assume that the link is up rather
than ignoring the check altogether.

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

(This used to be ctdb commit 3044d07da2a58260fa06bf489890b279bcf3ec39)
2010-04-20 10:52:31 +10:00
Ralph Wuerthner
d2f7bf804c ethtool does not support virtio_net devices.
Skip link test for this type of devices

Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 2ea0a9f1a93781a0d036feb9fcc0d120b182922f)
2010-04-15 16:38:19 +10:00
Ronnie Sahlberg
dec6ad765a Fix a compiler warning
(This used to be ctdb commit 8825a8e3936e4ddfc1482d07a63a620249f01fe7)
2010-04-08 14:28:52 +10:00
Ronnie Sahlberg
06885ea9a7 In the recovery daemon, keep track of which node we have assigned public ip
addresses and verify that the remote nodes have/keep a consistent view of
assigned addresses.

If a remote node has an inconsistent view of addresses visavi the recovery
master this will trigger a full ip reallocation.

(This used to be ctdb commit f3bf2ab61f8dbbc806ec23a68a87aaedd458e712)
2010-04-08 14:25:26 +10:00
Ronnie Sahlberg
3f226d0c8e Lower the loglevel for "Recovery lock successfully taken"
from ERR to NOTICE

BZ62086

(This used to be ctdb commit 7fa8486f9ffe2a039360b07423f734bdd884fe1d)
2010-04-07 10:45:03 +10:00
Ronnie Sahlberg
e179910136 When we forcefully abort a running eventscript, dont log this as is
the script timedout.

Instead send a different signal (SIGABRT) to the child process to silently
kill the process group for the script and its children without logging
anything.

We abort any running "monitor" script anytime any other event is generated
either by ctdbd itself or by "ctdb eventscript ..."

BZ61043

(This used to be ctdb commit 9dd25cb751919799af9d8a23a0725343a8400e58)
2010-03-30 12:47:54 +11:00
Ronnie Sahlberg
eeeb89e3e2 Reduce the loglevel for two log messages for Registering and Deregistering server ids.
BZ61890

(This used to be ctdb commit 944434eb6420774e42e58984c6ddaa326a6853bd)
2010-03-30 11:57:25 +11:00
Volker Lendecke
029d7a9b33 In ctdb catdb, print the payload data length without the ctdb header length
(This used to be ctdb commit 45b3fe253c1d00c571b351fc73415bc799df3083)
2010-03-29 17:06:29 +11:00
Volker Lendecke
184ca81bcd Fix a typo in run_startrecovery_eventscript
(This used to be ctdb commit 4f807b3a2d859f13c3e59e1ae737e9b145d7d613)
2010-03-29 17:06:28 +11:00
Michael Adam
df77489477 events:50.samba: wipe the local part of the serverid db before starting winbind/smnd/nmbd
This is necessary for the new serverid approach.

Michael

(This used to be ctdb commit 8956f32e571093db7f285b83e4dd32960f8afc7c)
2010-03-29 17:05:06 +11:00
Ronnie Sahlberg
8ed2e059f5 new version 1.0.114
(This used to be ctdb commit b07beb68bf2adf65e837669be0c7464852f829ac)
2010-03-24 17:21:10 +11:00
Stefan Metzmacher
940e58bf3f config: let 13.per_ip_routing use a flock for generate_auto_link_local()
metze

(This used to be ctdb commit dc2d0d0e559308ad2676f9ad973746c147d65eb9)
2010-03-18 11:57:16 +01:00
Ronnie Sahlberg
862e9781d4 Merge commit 'obnox/master-rebase'
(This used to be ctdb commit 216ceca7f886a9f0c4902b100f7ad44349821f9f)
2010-03-11 18:34:32 +11:00
Ronnie Sahlberg
d4f7a59960 Merge root@10.1.1.27:/shared/ctdb/ctdb-git
(This used to be ctdb commit e59310132d8126ee3afc191b5db56e80a32986e8)
2010-03-11 18:15:41 +11:00
Christian Ambach
3cf183ca40 adjust a vacuum log level
made the severity of the decreasing interval log level the same as for the increasing,
they are both just info logs because they don't report errors

(This used to be ctdb commit fde29921f14a815ea68911d758485c9070f4eb2a)
2010-03-11 18:11:57 +11:00
Wolfgang Mueller-Friedt
e26a26fd7a ctdb_setstatus in /etc/ctdb/functions was not working correctly because it was called with a wrong parameter list
(This used to be ctdb commit e1e285d9f7fa3237dbbacca52a4eb2b264fa5986)
2010-03-11 17:52:42 +11:00
Michael Adam
df2ca26557 packaging: add tdbtool and tdbdump as dependencies to the RPM
The init script relies on the existence.
This should fix bug #6773 on bugzilla.samba.org:
https://bugzilla.samba.org/show_bug.cgi?id=6773

Michael

(This used to be ctdb commit 35e6aa1630732665deaed1e7fbf2c3bf6664895d)
2010-03-10 07:55:41 +01:00
Michael Adam
6494d6434a doc: regenerate ctdb(1) manpages after xml change
(This used to be ctdb commit 6b9315b140802dee5904c1db0d57205d9efc6c1c)
2010-03-10 07:55:41 +01:00
Michael Adam
f888e3e0a4 doc: fix a linebreak in the example output of "ctdb getdbmap" in ctdb(1)
(This used to be ctdb commit aab05d67dabf11be9063a2443af4d43bbc985fb6)
2010-03-10 07:55:41 +01:00
Mathieu Parent
c57c06df8c Fix some more bashisms
(This used to be ctdb commit 3d82ca5b1b8ba2770c739493aa0cdd34bb4827d8)
2010-03-10 17:41:40 +11:00
Mathieu Parent
e7bca0dcfc Correct nice_service()
nice takes a binary as argument and not a function or builtin command

(This used to be ctdb commit e21b40db64b314a24caa2bc611cb48b93decb5aa)
2010-03-10 17:39:56 +11:00
Michael Adam
9fc080d529 doc: regenerate ctdb and ctdb manpages after xml changes
Michael

(This used to be ctdb commit 51fce280d3a7e2cce8e6e268a19d3594b38b9bb6)
2010-02-24 23:23:09 +11:00
Michael Adam
eb10f70fa1 doc: add metainfo "manual" and "source" in the ctdbd manual page
(This used to be ctdb commit 8ffd7500d1740f2ce384d2c41fa5cca983c63cea)
2010-02-24 23:22:43 +11:00
Michael Adam
3dbaec1957 doc: fill metainfo "manual" and "source" in the ctdb manual page
(This used to be ctdb commit ea7debb162edfcf5844d27400f1448e0b92a55d6)
2010-02-24 23:22:21 +11:00
Mathieu Parent
3f4ce41276 Correction of spelling errors.
* interupted -> interrupted
* dont -> don't

(thanks to lintian)

See https://bugzilla.samba.org/show_bug.cgi?id=6935

(This used to be ctdb commit 942f597dd343f21e2f0fc5d8116d929286db7413)
2010-02-24 23:22:00 +11:00
Mathieu Parent
62b0af141f Correction of spelling errors in manpages
thanks to lintian

See https://bugzilla.samba.org/show_bug.cgi?id=6935

(This used to be ctdb commit 402aad596e143c1ae3ec4bf2dfe3863c505bfc40)
2010-02-24 23:21:29 +11:00
Michael Adam
ff48fc3933 fix bug #7152: check NFS-Shares, fails with to long path-names
Thanks to Thomas Sesselmann <t.sesselmann@dkfz.de> .

Michael

(This used to be ctdb commit da5fc07baa9aa806c3cba52c00fb10cf8b7f2dc5)
2010-02-23 21:08:23 +11:00
Michael Adam
b72ccfc39a server:ctdb_send_dmaster_reply: fix a message typo.
Michael

(This used to be ctdb commit aa63f728152c37e31cecf2258efcdc8cf5ac0092)
2010-02-23 21:07:54 +11:00
Stefan Metzmacher
bb76e402e1 doc: regenerate ctdb.1*
metze

(This used to be ctdb commit 00b249d9d098d5ed03e21caed404e66336f63629)
2010-02-23 10:38:52 +01:00
Stefan Metzmacher
f984080c2a doc/ctdb.1.xml: document "ctdb setifacelink <iface> <status>"
metze

(This used to be ctdb commit b151a5bf750ffde4845d19a6ef875b4ee6085426)
2010-02-23 10:38:51 +01:00
Stefan Metzmacher
48a30a220f doc/ctdb.1.xml: document "ctdb ipinfo <ip>"
metze

(This used to be ctdb commit c72b637cc838ae6ea1694a476628c3fb4770f63b)
2010-02-23 10:38:51 +01:00
Stefan Metzmacher
f90fda0c64 doc/ctdb.1.xml: update "ctdb ip" documentation
metze

(This used to be ctdb commit 283338275c1e02811ce5062b24cc0da2288f64cc)
2010-02-23 10:38:51 +01:00
Stefan Metzmacher
65e051fd74 doc/ctdb.1.xml: document "ctdb ifaces"
metze

(This used to be ctdb commit 5ac32d3152ba11bacfab47c72ba998ac495fac00)
2010-02-23 10:38:50 +01:00
Stefan Metzmacher
b7909ad769 doc/ctdb.1.xml: document PARTIALLYONLINE status
metze

(This used to be ctdb commit 51a455940464accece218b1a018be444993b3b4b)
2010-02-23 10:38:50 +01:00
Stefan Metzmacher
e44c2396a7 config/13.per_ip_routing: fix typo in error message
metze

(This used to be ctdb commit 4b06665b77cb24d488f4ef03cc9ad5fd5d0feb0e)
2010-02-23 10:38:50 +01:00
Stefan Metzmacher
d79a70bca3 config/13.per_ip_routing: use better names for release_script and setup_script
As the basename of the script will be used for the readd script
from setup_iface_ip_readd_script, it's know easier to identify
what script is called by delete_ip_from_iface() while readding
ips to the interface.

metze

(This used to be ctdb commit 3ee225b0b6ed37c22478bd145ced56b1b9b86842)
2010-02-23 10:38:50 +01:00
Stefan Metzmacher
08d69d2cec config/13.per_ip_routing: register the setup script with setup_iface_ip_readd_script()
This is needed because we need to resetup the routing table when
the delete_ip_from_iface() function readds the ip to the interface.

metze

(This used to be ctdb commit ea87185ec9977006ef72d5a68c875154e4c84099)
2010-02-23 10:38:50 +01:00
Stefan Metzmacher
3a0d830e4c config/13.per_ip_routing: add a setup_per_ip_routing() function
This combines the logic into a shell function which can be used by the
"takeip" and "updateip" hooks.

We check the return values of the "ip" commands now
instead of ignoring them.

We now create a setup_script.sh similar to the release_script.sh
which makes it easier to analyze problems.

metze

(This used to be ctdb commit 624e8878851b4957cc7c02e922ec86926d6927ee)
2010-02-23 10:38:49 +01:00
Stefan Metzmacher
3419e9c4dd server: add "setup" event
This is needed because the "init" event can't use 'ctdb' commands.

metze

(This used to be ctdb commit 1493436b6b24eb05a23b7a339071ad85f70de8f4)
2010-02-23 10:38:49 +01:00