| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Use a variable to allow easy change of this string in case future
logging changes modify the timestamp format or do not support
timestamping.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent changes have caused these commands to attempt to get
capabilities from all nodes before doing further filtering. This
means that capabilities are unnecessarily fetched from nodes that are
unlikely to be the master. If such a node does not answer the control
then many nodes can fail to calculate the master node. In the case of
natgwlist this will cause "monitor" events to fail resulting in
unhealthy nodes.
Restore the behaviour where capabilities are only fetched for a node
that will be the master if it has the desired flags.
Although this masks a problem where a connected node is not replying,
it can help to avoid an outage in some cases.
Add supporting tests and infrastructure. Infrastructure just lets a
timeout be faked - just for ctdb_ctrl_getcapabilities_stub() so far.
First test checks that this infrastructure works if the first node
times out in natgwlist. Second test checks the case worked around by
the above fix - that is, no failure when a node with PNN beyond the
NATGW master can time out.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu May 29 05:59:37 CEST 2014 on sn-devel-104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit ba69742ccd822562ca2135d2466e09bf1216644b missed the point of
filtering disconnected nodes while limiting the nodemap to those in
the NAT gateway group. It was really to avoid trying to fetch
capabilities from disconnected nodes. This should be explicitly done
in filter_nodemap_by_capabilities(), otherwise "ctdb natgwlist" simply
fails when there is a disconnected node.
Note that the alternate solution where filter_nodemap_by_flags() is
called before filter_nodemap_by_capabilities() would not be not
correct. Filtering on flags first can produce a "healthier" set of
nodes where none of them have the NAT gateway capability.
Also extend stub for ctdb_ctrl_getcapabilities() to fail when trying
to get capabilities from a disconnected node and add a corresponding
test to confirm that "ctdb natgwlist" is no longer broken.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tests for xpnn need to implement a stub for ctdb_sys_have_ip(). The
cheapest way of doing this is to read a fake nodemap using the
existing code and check if the IP of the "current" node is the one
being asked about. However, the fake state initialisation isn't
currently available to without_daemon commands because it is meant to
represent daemon state. However, it can be made available by moving
the relevant code into a new stub for tevent_context_init(). The stub
still needs to initialise a tevent context - this can be done by
calling a lower level function.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
|
|
|
|
|
|
|
| |
... and add a test to make sure it works.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
|
|
|
|
|
|
|
|
| |
This looks to have got left behind a long time ago when things got
moved around...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
|
|
|
|
|
|
|
| |
Using a variable is too fragile, so use a function instead.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Main changes are:
libctdb_test.c -> ctdb_test_stubs.c
ctdb_tool_libctdb.c -> ctdb_functest.c
ctdb_tool_stubby.c is gone, replaced with existing ctdb_test.c.
Functions starting with "libctdb_test_" now start with
"ctdb_test_stubs_".
Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 6182bd0c19f215a997efe5272e633b1b1bd0c882)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 59bd4ede15a5958b87e0d253461eb9111885bd2f)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6bd4feff7039138d435428eeded51975c44e567c)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0f0aef21a1bb2d88a8c184ef70c718e0c91acdc3)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6616a5712b5d4db2b9ba6a88cec79378696c2184)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bef03b32f8ec114a64c55b25951aeeb939d87b33)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b5308142d03332d6d4e0c3b77283c772462fbb23)
|
|\
| |
| |
| | |
(This used to be ctdb commit abe7ebe6c531f912efe4ebc1daade4d2af67574c)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move some options from eventscripts/run_tests.sh to scripts/run_tests.
Remove the former.
Move some functions from eventscripts/scripts/local.sh to
scripts/unit.sh.
Both of these are modified during move so they are no longer
eventscript-specific.
Tweak */local.sh so that the new functions in unit.sh are used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7ff485687891732074c9fc9998502ca197663d02)
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 89571585d87b391ff79647cd1f0f6ac193079e72)
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit ca9e75eaea9c9b02bb44ca338e28fdae0c8d582c)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Although not obvious, when asking each node for nodestatus, it will report
each node is the current node.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a65ba7211ec7f102b32060b173606a61fb5c20a9)
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 902d8a4709e7a269d2a75522a998f9a60ae13d78)
|
|/
|
|
|
|
|
|
|
| |
Although not obvious, when asking each node for nodestatus, it will report
each node is the current node.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 261258c1a4268230b2559bc5d8664b1197b22450)
|
|
|
|
|
|
|
|
| |
Need to filter dates before comparing...
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6127515ea62173ff1574d1217129ec05a8fbeb3f)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 47e86c33d768816d03817124481bb6aa967bf2a6)
|
|
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 47e9975fa75a7bb2628a751dc19d35e2c5c57ce3)
|