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

4268 Commits

Author SHA1 Message Date
Martin Schwenke
f082f4006f Eventscripts: 10.interface startup event should only process interfaces once
Provided that monitor_interfaces() sets the state of each interface,
there's no need to mark all interfaces as up before running
monitor_interfaces() in the startup event.  monitor_interfaces() will
set the true status of each interface anyway.  The duplication is
unnecessary and may cause extra action in the recovery daemon because
the state of some interfaces is changed an extra time.

Instead, add a comment at the top of the loop in monitor_interfaces()
to warn against early loop exits.

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

(This used to be ctdb commit f243a916ee71013f7402b9c396c2ead88eb3aab0)
2012-11-14 10:57:48 +11:00
Volker Lendecke
4c5852bf0f build: Fix the build with old system-installed tevent
We depend on the tracing callback mechanism in ctdb.

(This used to be ctdb commit 5f58c811127a89f162b6a41ddcd6e944801740a5)
2012-11-08 12:57:58 +11:00
Martin Schwenke
861d5304ac ctdbd: Fix compilation warning in locking code
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit cd64035d71ddff6aebe6c15a49e09527283425d2)
2012-10-31 12:33:25 +11:00
Amitay Isaacs
a6d9b6f473 web: Update instructions for building from tarball
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit ceac026713a7ee30ea865ed4a9422900ed76fdf6)
2012-10-31 12:19:08 +11:00
Amitay Isaacs
4ca7f95d4f tests: Do not check release suffix in ctdb version test
release suffix added by RPM is to track packaging changes. Core CTDB
version does not include the release suffix.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit aad1584da8a8425bc6f5163c95810e9d2390dc91)
2012-10-31 12:19:03 +11:00
Amitay Isaacs
79aeac6bfe packaging: Use maketarball.sh script to create tarball for RPM
This removes the duplicate code for building tarball and reuses existing
script.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 16a91c2a4d03b46743611e2fe844bb2cef95e46a)
2012-10-30 18:01:38 +11:00
Amitay Isaacs
49bddd6f1e packaging: Use optional argument as targetdir when creating tarball
In addition, do not modify CTDB version string with extra suffix.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 3d4838db51dd8199b9c29aebb6e7bfbd2a27b8bb)
2012-10-30 15:58:14 +11:00
Amitay Isaacs
b0f90052cb tool/ctdb: Always support ctdb version command, don't make it optional
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit f8af7d8de76e68e5c4bde15f832a31ce9107e8c7)
2012-10-30 11:56:00 +11:00
Amitay Isaacs
1a6ccd1bf1 build: Add rules to create include/version.h when building from git tree
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 8df7ea6b20417833792932487a082b3c71bb6837)
2012-10-30 11:55:59 +11:00
Amitay Isaacs
92207245ba packaging: Create include/version.h to define CTDB_VERSION_STRING
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit b151f9b62299ec5b887c62cef780547a39c0ba9d)
2012-10-30 11:55:59 +11:00
Volker Lendecke
2d1d5d312e Add a \n to an error message
(This used to be ctdb commit 9be3b23adbfc844b71bf1d4ddf0fbc3b269f15fa)
2012-10-25 17:11:15 +11:00
Volker Lendecke
295dfa771a Avoid a bashism in 60.ganesha
This file is #!/bin/sh. On sn-devel at least, with this /bin/sh the
shell does not like == for string equality.

(This used to be ctdb commit e2213db479129ce9c2b2fb88ec8c53cbd33d54b3)
2012-10-24 18:31:16 +11:00
Amitay Isaacs
594284f2d7 web: Update broken links to manpages
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit e94070de52232d6cefae0c6276df88b8fc380a4e)
2012-10-24 12:59:14 +11:00
Amitay Isaacs
42d8e379fe packaging: Bundle README, COPYING and html version of manpages
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 6871415f6cb50c4f9753067359f0e264d3f93871)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
56e1d523a5 doc: Do not keep the built version of manpages in version control
Generated docs will be bundled with release tarballs. No need to keep
them in git. This avoids the need to commit the generated doc version
if source xml is modified.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit f3888712298f1de7cc7eb51f50c22080fa64e3c0)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
231898db1f packaging: Use common code to generate VERSION string
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0019291371af1e63ee132ed173ba7f52a0291a44)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
5ea3a56b62 packaging: Factor out the code to genreate VERSION string
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 19fb26346567d2249b1237f92d871022db2ba8cd)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
68b32e53ce packaging: Build docs and include them in tarball
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 69f0473b72aadab5bd5791ccff2facd0cd469d43)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
43b25d1948 build: Extract building of manpages in a separate Makefile
This can then be used to build manpages/html when creating tarball.
Do not build docs during a regular build, but only for install.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 3274cffe2052953b34141a82de6053b747532a88)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
5b6625793d doc: README - add information about CTDB, license and website
(This used to be ctdb commit db987eeb3c6e10552a1c1334bf263eb66fcad9ab)
2012-10-22 17:39:49 +11:00
Amitay Isaacs
9e4453451b web: Add posix locking information to prerequisites
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit b3eac871895cc586bcc671835e882b136e466b98)
2012-10-22 17:39:47 +11:00
Amitay Isaacs
46199534b5 web: Add the links to ftp/http ctdb download area
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 12e4a3e2953842b4c3842bf920fe2086df4fe46c)
2012-10-22 17:39:45 +11:00
Amitay Isaacs
30642440f0 web: Remove reference to non-existent config files
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 4250c7ebe369e73cf29ff910bb9bfc929735408c)
2012-10-22 17:39:42 +11:00
Martin Schwenke
b63c3deb63 doc: getlog and clearlog changes for recovery daemon logs
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit c18ec8ec234cb71da6cc77b1aadc398f57187947)
2012-10-22 12:47:04 +11:00
Martin Schwenke
3189eef7d9 tests: Local daemons should use the logging ringbuffer
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7547e011005f0dd5bd38e67572280126cf16e229)
2012-10-22 12:47:04 +11:00
Martin Schwenke
d78ac9c364 tools/ctdb: Merge recoverd log handling into getlog/clearlog
We don't need extra commands for these.

Also, allow a default value of NOTICE for the getlog level.

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

(This used to be ctdb commit 7197e600f46f2d1638f6c45c0149f109ea25a47c)
2012-10-22 12:21:24 +11:00
Martin Schwenke
798b632e03 tools/ctdb: Add log ringbuffer handling for recoverd
This adds commands rdgetlog and rdclearlog

These are analogous to getlog and clearlog but operate on the logs for
the recovery daemon.

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

(This used to be ctdb commit ef55e06192819d840c09b65741bab737223ac34c)
2012-10-22 11:15:36 +11:00
Martin Schwenke
db5dfe891c recoverd: Add CTDB_SRVID_GETLOG and CTDB_SRVID_CLEARLOG
These support getting and clearing logs from the ring-buffer in the
recovery daemon.

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

(This used to be ctdb commit cbca233d1e03b2410e0bb63b936328d4a8b3c7b4)
2012-10-22 11:15:36 +11:00
Amitay Isaacs
bc126ccdd4 build: Set CTDB_PATH to /tmp/ctdb.socket if SOCKPATH is not defined
When building samba with CTDB, if samba configure/waf does not support
setting of SOCKPATH, fallback to /tmp/ctdb.socket.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a9511cf5ecd5bc39b0070f0afa8ac4d4926c6cab)
2012-10-22 09:01:27 +11:00
David Disseldorp
8cbf1a00c4 Build: Set the default ctdb socket path at configure time
The ctdb socket path currently defaults to /tmp/ctdb.socket and can be
modified at runtime using the --socket=filename option, common to both
ctdb and ctdbd binaries.

This change allows the default path to be set at configure time using
the --with-socketpath=FILE argument. When not specified, the default
path remains /tmp/ctdb.socket, documentation remains unchanged as a
result.

Signed-off-by: David Disseldorp <ddiss@samba.org>

(This used to be ctdb commit f92b9c83a2f39fba9a141417a88de96fc8c592ff)
2012-10-21 01:39:08 +11:00
Amitay Isaacs
d39fbd60b9 locking: Do not use ctdb_kill() to kill smbd processes
ctdb_kill() is used to terminate processes spawned by CTDB.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 7d025281ee70c91ebcd4d9a908de1045a689786b)
2012-10-20 02:48:45 +11:00
Amitay Isaacs
1d83df7516 locking: Add database priority handling for older versions of samba
In samba versions 3.6.x and older, database priorities are not set.
later_db() function implements higher database priority (locking order)
for these databases -
   brlock, g_lock, notify_onelevel, serverid, xattr_tdb

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit edbc8a6669b594d3c413d603e1c9fada9244c2ee)
2012-10-20 02:48:45 +11:00
Amitay Isaacs
3c34207481 locking: Schedule a new lock request everytime a lock is released
Since the number of active lock requests is limited to
MAX_LOCK_PROCESSES_PER_DB (= 100), any new requests won't get scheduled
when they are created. So schedule a pending request once current active
request is done.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit c8eb4a3170ab8524e638047053831ba547e9cce8)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
a00e50e503 ctdbd: Replace lockwait with locking API and remove ctdb_lockwait.c
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 2126795153dacb255e441abcb36ee05107b6282a)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
08ffbc342c ctdb_recover: Replace static locking functions with locking API
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 4456a01d8f54ca6c771d7488048de5f638477d21)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
23f83d58a5 ctdb_freeze: Replace locking functions with locking API
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 01ee86d2aafbcda658ef6acc2bba6d6781ae4047)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
cbf16856f8 ctdbd_test: Include ctdb_lock.c code for test stubs
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit caff197edf6f928494028ac6c993901954aaa36f)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
6182d9eaa1 tests: Fix statistics test for new output lines from locking API
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 1ee55c511b99e9f8a6fa4e34207267e953f09bae)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
8d7d9ac8ce tools/ctdb: Display the locking statistics
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit e24b5bf283736624b387b0364d7200212bb3054b)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
83306337df ctdbd: locking: Provide non-blocking API for locking of TDB record/db/alldb
This introduces a consistent API for handling locks on single record, complete
db or all dbs. The locks are taken out in a child process. In cases of timeout,
find the processes that currently hold the lock and log.

Callback functions for locking requests take locked boolean to indicate
whether the lock was successfully obtained or not.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 1af99cf0de9919dd89af1feab6d1bd18b95d82ff)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
1011d10a51 common: Add routines to get process and lock information
Currently these functions are implemented only for Linux.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit be4051326b0c6a0fd301561af10fd15a0e90023b)
2012-10-20 02:48:44 +11:00
Amitay Isaacs
ef79dc012e header: Added DB statistics update macros
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a0cdfae7438092f5c605f0608daa536be860b7fe)
2012-10-20 02:48:44 +11:00
Martin Schwenke
9f6b30a517 scripts: Refactor logging code in initscript and functions file
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5ee242c949a98bb7397e0f7368b20d44c06fe772)
2012-10-18 20:05:43 +11:00
Martin Schwenke
7bf693fc1b tools/ctdb_diagnostics: Add "ctdb listvars" output
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 2d75a04ba9a2e87a0dcb9bf778c58e335af1871c)
2012-10-18 20:05:43 +11:00
Martin Schwenke
ad8eb45fe2 initscript: Check that rc.ctdb is executable before running it
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 59a47c0674bacfebc17a1b44f0244727bf2fa7a4)
2012-10-18 20:05:43 +11:00
Martin Schwenke
199b971f57 ctdbd: Remove references to forcing running of eventscripts from log messages
Running of eventscripts can be initiated from many places, including
the recovery daemon.

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

(This used to be ctdb commit 440892d75ef73c0aca22f47c0c01712be00cf5b7)
2012-10-18 20:05:43 +11:00
Martin Schwenke
bfbcdea610 recoverd: Clarify some misleading log messages
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 14589bf7c16ba017fe00d4e8bea8cc501546c60f)
2012-10-18 20:05:43 +11:00
Martin Schwenke
c5e24b23cf tools/ctdb: Remove extra header from natgwlist -Y output
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 59520c9785d113ad5063eb5fbe42a9efc7e30076)
2012-10-18 20:05:42 +11:00
Martin Schwenke
a884c8c453 recoverd: Verifying local IPs should only check for unhosted available IPs
Currently it checks for unhosted IPs among the known IPs rather than
available IPs.  This means that a takeover run can be flagged even
when that takeover run will be unable to assign a known, unhosted IP.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3cc878bc97fdac764a60ed805f64d649eaab06e8)
2012-10-18 20:05:42 +11:00
Martin Schwenke
66d0aba85b Revert "Eventscripts - add facility to 10.interface to delete unmanaged IPs"
This reverts commit 88f88d86b0d08240f749fb721b8c401c2eeb1099.

This is dangerous and, on reflection, I can't see it being useful.
There are often permanent IPs on interfaces that CTDB shares with its
public IPs.

(This used to be ctdb commit 16aba4eb620844626a1c71c58b51658caf44dea6)
2012-10-18 20:05:42 +11:00