<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/ctdb/tests/tool, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/'/>
<entry>
<title>ctdb-tests: Make the fake log timestamp string easy to modify</title>
<updated>2014-10-06T10:34:32+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-09-24T07:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=1c8c0be6f97f74169c0b46be4df2245aa631186a'/>
<id>1c8c0be6f97f74169c0b46be4df2245aa631186a</id>
<content type='text'>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tools-ctdb: Make natgwlist and lvsmaster more resilient</title>
<updated>2014-05-29T03:59:37+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-05-23T11:58:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=4dd382296d3e78000713ab0ac1f8e531e25857cc'/>
<id>4dd382296d3e78000713ab0ac1f8e531e25857cc</id>
<content type='text'>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;

Autobuild-User(master): Amitay Isaacs &lt;amitay@samba.org&gt;
Autobuild-Date(master): Thu May 29 05:59:37 CEST 2014 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;

Autobuild-User(master): Amitay Isaacs &lt;amitay@samba.org&gt;
Autobuild-Date(master): Thu May 29 05:59:37 CEST 2014 on sn-devel-104
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tools-ctdb: Drop disconnected nodes when filtering by capability</title>
<updated>2014-04-14T01:52:40+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-04-09T04:26:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=ce8ac88b969bb8bb7a94e62bb6e86aec389be6ac'/>
<id>ce8ac88b969bb8bb7a94e62bb6e86aec389be6ac</id>
<content type='text'>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Add "ctdb listnodes" and "ctdb xpnn" stub tests</title>
<updated>2014-03-23T03:20:14+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-03-17T02:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=79d28000043bd463beecaeac47855d3a4970eaf2'/>
<id>79d28000043bd463beecaeac47855d3a4970eaf2</id>
<content type='text'>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: New natgwlist tests where nodes capability not set</title>
<updated>2014-03-23T03:20:14+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-02-18T01:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=771005386403acf15a81be5de2a3798384a37d8a'/>
<id>771005386403acf15a81be5de2a3798384a37d8a</id>
<content type='text'>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Update ctdb stub LVS tests and add some new ones</title>
<updated>2014-03-23T03:20:14+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-02-18T01:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=75cf99b9da1677fa83197d111d757e14041dae05'/>
<id>75cf99b9da1677fa83197d111d757e14041dae05</id>
<content type='text'>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Support fake capabilities in CTDB tool stub</title>
<updated>2014-03-23T03:20:14+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-02-18T00:34:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=3af858e6f4990599c23b54d05c42187400fd1426'/>
<id>3af858e6f4990599c23b54d05c42187400fd1426</id>
<content type='text'>
... and add a test to make sure it works.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... and add a test to make sure it works.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Remove old, unused copy of a CTDB tool unit test</title>
<updated>2014-03-23T03:20:14+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-02-18T00:02:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=263e5eabf8d55c7f53db597b8fcede831c211e45'/>
<id>263e5eabf8d55c7f53db597b8fcede831c211e45</id>
<content type='text'>
This looks to have got left behind a long time ago when things got
moved around...

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This looks to have got left behind a long time ago when things got
moved around...

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb:tests: Rework unit test result filtering</title>
<updated>2013-11-27T17:46:17+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2013-11-15T01:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=8ca117a68e525db57623ce529690b24c45afa1e3'/>
<id>8ca117a68e525db57623ce529690b24c45afa1e3</id>
<content type='text'>
Using a variable is too fragile, so use a function instead.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Michael Adam &lt;obnox@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using a variable is too fragile, so use a function instead.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Michael Adam &lt;obnox@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/tool: Remove references in libctdb in file and function names</title>
<updated>2013-10-04T05:15:35+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2013-09-18T04:27:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pviktori/public_git/samba.git/commit/?id=24fb430d6e99e60af9b1f9e2e358ec707937e7a8'/>
<id>24fb430d6e99e60af9b1f9e2e358ec707937e7a8</id>
<content type='text'>
Main changes are:

  libctdb_test.c -&gt; ctdb_test_stubs.c
  ctdb_tool_libctdb.c -&gt; 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 &lt;martin@meltin.net&gt;
Pair-programmed-with: Amitay Isaacs &lt;amitay@gmail.com&gt;

(This used to be ctdb commit 6182bd0c19f215a997efe5272e633b1b1bd0c882)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Main changes are:

  libctdb_test.c -&gt; ctdb_test_stubs.c
  ctdb_tool_libctdb.c -&gt; 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 &lt;martin@meltin.net&gt;
Pair-programmed-with: Amitay Isaacs &lt;amitay@gmail.com&gt;

(This used to be ctdb commit 6182bd0c19f215a997efe5272e633b1b1bd0c882)
</pre>
</div>
</content>
</entry>
</feed>
