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

1728 Commits

Author SHA1 Message Date
Ronnie Sahlberg
e4e298e10e change how we filter out "empty" records in the traversecode
so that we output the same list of keys in "catdb" as "tdbdump".

when traversing a persistent database, as an optimization, only
traverse on the local node (and thus skip checking if we are
dmaster or not). If the local node is not part of the vnnmap and thus
would not be guaranteed to have an uptodate persistent database
we instead traverse it on one of the other nodes that are in the vnnmap.

(This used to be ctdb commit 2b0bd6c302545f2533a7a67dfc6bb5f9f60799f7)
2008-07-16 12:23:18 +10:00
Ronnie Sahlberg
9a9b506d23 Add two new options
CTDB_SAMBA_SKIP_CONF_CHECK and CTDB_SAMBA_CHECK_PORTS.
The first is used to tell ctdb to no longer monitoring if the smb.conf file is consistent or not.

The second specifies which ports to check that smb is listening on
instead of using testparm to figure this out.

Since the net, testparm and smbstatus may block indefinitely in some configurations
we must have a way to configure ctdb to NOT use any of these three commands
in the scripts. These commands should thus never be used in scripts.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 2fe52c7979ecd28250ec4ac195d3c3999916e573)
2008-07-15 11:03:35 +10:00
Ronnie Sahlberg
0934f40c2a remove a debugging echo statement
(This used to be ctdb commit 495a6293c284a1e74b9c5e0c112e6ed5feead107)
2008-07-14 11:22:41 +10:00
Andrew Tridgell
3fa8aaa4e2 fixed up exit status for onnode
(This used to be ctdb commit c26afe26cc5c1f9cd9eef74166b5fc39dde591d3)
2008-07-14 09:19:22 +10:00
Andrew Tridgell
3bb727aaaf Merge commit 'ronnie/master'
(This used to be ctdb commit f8c5f6ff1cae747aae917c454b49dc5db227e140)
2008-07-11 19:21:39 +10:00
Ronnie Sahlberg
d16bc2f655 new version 1.0.47
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 1de62d1ad71fa784d5e93f76da8f872cad9b9f42)
2008-07-11 11:48:41 +10:00
Ronnie Sahlberg
66222af5e4 Fix a very subtle race where we could get a double free of a talloced
memory if ctdb_run_eventscript() would be called
during processing of ctdb_event_script_timeout() for
user unvoked eventscripts. (eventsccripts invoked by "ctdb eventscript ...")

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 15bc66ae801b0c69a65a7a2acf5df151e76edc2a)
2008-07-11 10:33:46 +10:00
Martin Schwenke
80c95f1820 Signed-off-by: Martin Schwenke <martin@meltin.net>
Update packaging/RPM/ctdb.spec to reflect onnode changes.

(This used to be ctdb commit f4a6dd98c86f2028c00b62313a071a94cafc95f9)
2008-07-11 09:34:40 +10:00
Ronnie Sahlberg
0c1ead9043 Revert "Yip yip yip!"
This reverts commit f7bdf96843a7e4ad61ad378786922d6281de9d93.

(This used to be ctdb commit b18a1b59ecd8913e03a59b1a105002f2c9221324)
2008-07-10 17:06:52 +10:00
Martin Schwenke
47cb226c9b Yip yip yip!
(This used to be ctdb commit f7bdf96843a7e4ad61ad378786922d6281de9d93)
2008-07-10 17:05:20 +10:00
Martin Schwenke
a92de86c2f When in verbose mode with -p, each line is prefixed with the node
address/name.  To implement this stderr has redirected to stdout -
this doesn't need to be done but is the simplest implementation.
Remove -t option since it doesn't seem to accomplish much but causes
spurious messages to be displayed by ssh.  Add explicit -h and --help
options.  Make style of usage message consistent with documentation.
Document new features in doc/onnode.1.xml.

(This used to be ctdb commit dfaf2c1581e547df831b3171ad47acd27b4ca2af)
2008-07-10 15:41:11 +10:00
Martin Schwenke
724e64b337 Update Makefile.in for new version of onnode.
(This used to be ctdb commit c47acc0eb2e1275a6c6fc05829bd1131d999f8fd)
2008-07-10 15:40:43 +10:00
Martin Schwenke
db55b91317 Complete rewrite of tools/onnode. Remove old tools/onnode.ssh,
tools/onnode.rsh.

(This used to be ctdb commit 2cc9aba3d7e608eccc29c897f710b69f30653bbf)
2008-07-10 15:39:30 +10:00
Ronnie Sahlberg
a89778c048 explain why you have to have a real ip address as well as the "virtual"
ip address for lvs

(This used to be ctdb commit 919af5aadb797cfdd10473b6a1269f4ae2a9dbda)
2008-07-10 13:40:00 +10:00
Ronnie Sahlberg
4dfcceb3de new version 10.0.46
(This used to be ctdb commit d94e76bfb3e464c0540331caf282efc13ff60e42)
2008-07-10 13:00:50 +10:00
Ronnie Sahlberg
d7aa3b4c69 add documentation for both LVS:single-ip and CAPABILITIES:wan-accelerator
(This used to be ctdb commit 563cdf2bd9cca358d234c797d8e1d9c8838c6ca6)
2008-07-10 12:50:16 +10:00
Ronnie Sahlberg
aa0cab2aaa Update to the LVS eventscript.
Do not assume all nodes are members of LVS so always deciding the recmaster will be lvsmaster wont work.

Instead,
Create the set of active LVS nodes as those nodes that are LVS capable and
also HEALTHY.
Except if ALL LVS capable nodes are unhealthy in which case we allow the unhealthy
nodes to be part of the active set.

In the active set, pick one of the active nodes as being the lvsmaster
which will receive all incoming traffic and distribute it across
the active lvs nodes in the cluster.

(This used to be ctdb commit b2ccb891b81b041e2186e038b67bb4354b7892aa)
2008-07-10 11:42:37 +10:00
Ronnie Sahlberg
efd840276b Add three mode commands to the CTDB tool.
lvs: which shows which nodes are active LVS servers
lvsmaster: which shows which node is the lvs master multiplex node
pnn: which prints the pnn of the local node

(This used to be ctdb commit 00025eef662b867293829228c681df491cd6f371)
2008-07-10 11:12:58 +10:00
Ronnie Sahlberg
ab8535eaa5 make LVS a capability so that we can see which nodes are configured with
LVS and which are not using LVS.

"ctdb getcapabilities"

(This used to be ctdb commit 172d01fb34f032e098b1c77a7b0f17bf11301640)
2008-07-10 10:37:22 +10:00
Ronnie Sahlberg
3c0d725e0b add an option to skip checking that all the samba shares are ok
when monitoring the node health.
this might be useful to skip for environments with thousands of shares

(This used to be ctdb commit dd900d4ed8f07003c4f1db2d441cfc2ef2c89ef5)
2008-07-10 08:56:33 +10:00
Ronnie Sahlberg
3523899c2e remove the attempts to restart NFS.
nfs should never stop spontaneously so trying to restart it is
just counterproductive and at best a workaround to
hide real bugs.

(This used to be ctdb commit 90ab48bb8e17f59fcb27ddbff51de546c4447b64)
2008-07-10 08:05:34 +10:00
Ronnie Sahlberg
31967abf5c if we have enabled LVS but we dont have all the required packages
just log it to the messages
dont stop ctdb from starting

(This used to be ctdb commit 3c3d3ac5f7dec258589aaaf0633cab3b3af65cf3)
2008-07-09 15:17:27 +10:00
Ronnie Sahlberg
334db8ccba proper waitpid() fix.
remove all waitpid() calls and use the event system to trap sigchld

(This used to be ctdb commit 77458b2b6b51b2970c12b0e5b097088d3fb9d358)
2008-07-09 14:02:54 +10:00
Ronnie Sahlberg
0fba2e36b1 Revert "pull the development files out into their own package"
This reverts commit 36be210bbc5e0af75c5fd6e57863272bfa0e942e.

(This used to be ctdb commit 02ed800f3c09e2a3d56de5ae226708d0953dd4a1)
2008-07-09 13:14:47 +10:00
Ronnie Sahlberg
48a1be7b7c Revert "add spec file for development rpm"
This reverts commit bd7b254b81dda4d9d62516abf32f93f2503eb9bb.

(This used to be ctdb commit cb67382603ffabda7f7f958b494c79b4a3c5ebe2)
2008-07-09 13:14:34 +10:00
Ronnie Sahlberg
ac283c3a9a Revert "copy ctdb-dev to the spec directory"
This reverts commit 8814997c1b9623397058088dd0e1775cecfe371b.

(This used to be ctdb commit a77850d8baebcf0b216d7c1391da9cce1c43ce2e)
2008-07-09 13:14:07 +10:00
Ronnie Sahlberg
41f6925e89 copy ctdb-dev to the spec directory
(This used to be ctdb commit 8814997c1b9623397058088dd0e1775cecfe371b)
2008-07-09 13:07:17 +10:00
Ronnie Sahlberg
4d8b9952e8 add spec file for development rpm
(This used to be ctdb commit bd7b254b81dda4d9d62516abf32f93f2503eb9bb)
2008-07-09 11:37:02 +10:00
Ronnie Sahlberg
9d65d4d79a pull the development files out into their own package
(This used to be ctdb commit 36be210bbc5e0af75c5fd6e57863272bfa0e942e)
2008-07-09 11:32:19 +10:00
Ronnie Sahlberg
9ab368e3b2 install the readme in /usr/share/doc/ctdb/ instead of under /etc
(This used to be ctdb commit becce6a9a759730d0c675a56516bb0a32a54c9f3)
2008-07-09 11:08:44 +10:00
Ronnie Sahlberg
6bf597d061 mark /etc/ctdb/functions as a config file to keep rpmlint happy
(This used to be ctdb commit 8f6cd88e74de24af8dde2b6cabb2348c4f914b99)
2008-07-09 10:24:19 +10:00
Ronnie Sahlberg
52f03be2d9 From Chris Cowan, patch to make aix compile again
(This used to be ctdb commit 77255bb5523b8d132770a0a7d4ba29ec9e5043cc)
2008-07-09 10:17:39 +10:00
Ronnie Sahlberg
2d644b3fbe Replace \s with [[:space:]] in our regexps we use for egrep.
Kevin Collins noticed that RHEL5 grep-2.5.1-54.2.el5 built for
x86 does not handle \s    while the exact same RHEL5 package for amd64
does!

[[:space:]] is more portable.  Even across the same package version ( different architecture ) from the same vendor :-)

(This used to be ctdb commit fd7bb21c4f9289fc34a57f9d8cb7c13a02d06096)
2008-07-09 10:03:21 +10:00
Ronnie Sahlberg
522830dea8 Revert "waitpid() can block if it takes a long time before the child terminates"
This reverts commit bfba5c7249eff8a10a43b53c1b89dd44b625fd10.

revert the waitpid changes.   we need to waitpid for some childredn so should
refactor the approach completely

(This used to be ctdb commit 702ced6c2fe569c01fe96c60d0f35a7e61506a96)
2008-07-08 17:41:31 +10:00
Ronnie Sahlberg
79425ddec5 Revert "set sigchild to SIG_IGN instead of SIG_DFL"
This reverts commit b1f1e80d3ad50280a300f2ed021513cf0a6f3a76.

(This used to be ctdb commit 2030e9ff2ca044181b72c3b87d513bf27057b5a2)
2008-07-08 17:40:53 +10:00
Ronnie Sahlberg
71d2315eee set sigchild to SIG_IGN instead of SIG_DFL
(This used to be ctdb commit b1f1e80d3ad50280a300f2ed021513cf0a6f3a76)
2008-07-08 16:31:23 +10:00
Ronnie Sahlberg
f1c4041c84 new version 1.0.45
(This used to be ctdb commit b4b2408ba1bdce22abb3fb19d398b72e96da6505)
2008-07-08 10:03:57 +10:00
Ronnie Sahlberg
5ab7eaa553 update the monitor event for nfs to track how many times in a row it has failed
to "ping" the local nfs daemon.

Once it has failed more than 3 times in a row it will attempt to restart the nfs service.

(This used to be ctdb commit a4e89f57a8d733ea74df7b0de31eb977d6d37388)
2008-07-08 09:58:10 +10:00
Ronnie Sahlberg
d67de4a7d2 waitpid() can block if it takes a long time before the child terminates
so we should not call it from the main daemon.

1, set SIGCHLD to SIG_DFL to make sure we ignore this signal

2, get rid of all waitpid() calls

3, change reporting of event script status code from _exit()/waitpid()   to write()/read() one byte across the pipe.

(This used to be ctdb commit bfba5c7249eff8a10a43b53c1b89dd44b625fd10)
2008-07-08 03:48:11 +10:00
Ronnie Sahlberg
6bfbec28a4 use more libral handling of event scripts timing out.
If the event script that timed out was for the "monitor" event, then
even if it timed out we still return SUCCESS back to the guy invoking the eventscript.
Only consider the eventscript for "monitor" to have failed with an error
IFF it actually terminated with an error,   or if it timed out 5 times in a row and hung.

(This used to be ctdb commit 60f3c04bd8b20ecbe937ffed08875cdc6898b422)
2008-07-07 20:38:59 +10:00
Ronnie Sahlberg
6eff9289d7 new version .44
(This used to be ctdb commit 6043f926f89b361c7fe14fc60d2769fd2ba63dfc)
2008-07-07 09:07:49 +10:00
Ronnie Sahlberg
811493a0b6 zero out the sockaddr_in structure before we store the ipv4 data in it to make sure that all data is initialized. Othervise valgrind will complain about uninitialized data when we write this structure out on the wire
(This used to be ctdb commit 80e249512f93bca2445d40590db38d31be2aafd7)
2008-07-07 08:53:22 +10:00
Ronnie Sahlberg
2003196816 we need a 'case x:' in our ugly 'encode the control opcode as a linenumber in valgrind output' hack to make it work
(This used to be ctdb commit f4929e164be1703f74fc332e740b85cfe1ae3e73)
2008-07-07 08:52:04 +10:00
Ronnie Sahlberg
64e02585e7 If a transaction commit fails. Log this error and cancel all pending transactions to the
databases instead of calling ctdb_fatal()

(This used to be ctdb commit ff2985aaef999d180277db4cf644fee0ea79c14d)
2008-07-07 08:51:05 +10:00
Ronnie Sahlberg
f25fd04f73 in the destructor for the lock-wait child, make sure that we cancel any pending
transactions.

(This used to be ctdb commit 45b6ff64f6ddf037b810c4e5f8b9f04d71067b98)
2008-07-07 08:50:12 +10:00
Andrew Tridgell
cc03304048 fixed a case statement
(This used to be ctdb commit 5168e9fa138995581fe5805f99ae569ce3c127f7)
2008-07-04 18:03:24 +10:00
Andrew Tridgell
9999f18369 an extraordinarily ugly patch!
This is a hack to allow backtraces under valgrind to show what opcode
is getting uninitialised bytes

(This used to be ctdb commit 67bb12c8f0af5914efb44b76bc6ddbb11fc0fcdf)
2008-07-04 18:00:24 +10:00
Andrew Tridgell
30f8411eb9 ensure pad bytes in the ltdb_header are initialised
(This used to be ctdb commit 00b1a635e3d61ca7c5487d65ac54f3eb6ea7355e)
2008-07-04 17:40:25 +10:00
Andrew Tridgell
50cd520c6a don't use mmap in tdb if --nosetsched is set. That makes valgrind
happier (it doesn't like the mmap/msync calls in tdb)

(This used to be ctdb commit f3a729998ce67f5d2e3b2ad41d96e8f04c0d18d8)
2008-07-04 17:32:21 +10:00
Andrew Tridgell
e7ac67ccc6 prevent valgrind errors where we print unitialised values on control errors
(This used to be ctdb commit ababd8aba2f9c13aaa1b623b8a76c2f98bb94dd4)
2008-07-04 17:15:06 +10:00