[WIP][PATCH] selftest: add clusteredmember (1-node) env

Michael Adam obnox at samba.org
Thu Jul 14 12:45:34 UTC 2016


On 2016-07-14 at 14:00 +0200, Ralph Boehme wrote:
> Hi!
> 
> On Thu, Jul 14, 2016 at 01:23:39PM +0200, Michael Adam wrote:
> > On 2016-07-14 at 12:47 +0200, Michael Adam wrote:
> > > Well, as you can see in the Samba3.pm, you need to tell
> > > ctdb this:
> > >  - --socket=<location of ctdbd socket> as cmdline option
> > >  - CTDB_NODES=<location of nodes file> in env
> > >    or
> > >    CTDB_BASE=<directory containing nodes file> in env
> > > 
> > > Will propose such an update to your test later.
> > 
> > Attached patch (to be squashed with yours) fixes
> > the calling of ctdb.
> 
> cool, thanks! I'll give it a whirl.
> 
> That approach requires getting the individual test right, ie setting
> the necessary variables in every test script.
> 
> Isn't there a way to do this in a more centralized manner ?

Not right now, I'm afraid.

We should provide a wrapper, and if only for
selftest. But it needs input where files
are located. If only the CTDB_BASE one.

> > But the test does not succeed currently, since this is about
> > ip-reallocation, and the clusteredmember does not do public
> > addresses (yet), and it also doe not to reallocations because
> > it is currently a 1-node setup... ?! :-)
> 
> Yeah, I know, the test is misnamed, should be called
> "test-cleanupd-restart-on-a-ctdb-node-where-ctdb-messaging-is-down". ;)
> 
> So I don't really want to test ctdb ban, but just that.

Hmm, ok. Just looked a little more. It fails like this:

>>>> [1(0)/1 at 0s] samba3.blackbox.ctdb_ban(clusteredmember:local)
>>>> UNEXPECTED(failure): samba3.blackbox.ctdb_ban(clusteredmember:local).ctdb_ban(clusteredmember:local)
>>>> REASON: Exception: Exception: Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> Still waiting for confirmation of IP reallocation
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> IP reallocation failed with result -1
>>>> ...
>>>> Maximum runtime exceeded - exiting

This comes from the single call to ctdb.
Need to understand what is going on...

Once more add-on patch the afaict corrects
the place of one cmd in the test script..

Cheers - Michael

-------------- next part --------------
From 8c28940dc521731a75454237c805a92895c36d6e Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 14 Jul 2016 14:26:24 +0200
Subject: [PATCH] SQ: fix printing of new cleanupd pid

---
 source3/script/tests/test_ctdb_ban.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/script/tests/test_ctdb_ban.sh b/source3/script/tests/test_ctdb_ban.sh
index 3853b48..e998c16 100755
--- a/source3/script/tests/test_ctdb_ban.sh
+++ b/source3/script/tests/test_ctdb_ban.sh
@@ -32,8 +32,8 @@ echo Old cleanupd: $CLEANUPD_PID
 kill -KILL $CLEANUPD_PID
 echo Sleeping for 70 seconds...
 sleep 70
-echo New cleanupd: $CLEANUPD_PID
 CLEANUPD_PID=$(ps -e -o pid,comm | awk '/cleanupd/ {print $1}')
+echo New cleanupd: $CLEANUPD_PID
 testit "ctdb_cleanupd" test x"${CLEANUPD_PID}" != x"" || failed=`expr $failed + 1`
 
 export -n CTDB_NODES
-- 
2.5.5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160714/1a61af1f/signature.sig>


More information about the samba-technical mailing list