[WIP][PATCH] selftest: add clusteredmember (1-node) env
martin at meltin.net
Thu Jul 14 19:47:33 UTC 2016
On Thu, 14 Jul 2016 14:45:34 +0200, Michael Adam <obnox at samba.org>
> 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:
> > >
> > > 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.
I think I've mentioned this part before, but...
In ctdb/tests/simple/scripts/local_daemons.bash we set 2 things:
* CTDB_NODES to point to the nodes file
* CTDB_NODES_SOCKETS to point to the corresponding list of unit domain
Then we just use onnode to run "ctdb ..." commands.
onnode respects CTDB_NODES_SOCKETS if it is set and fakes the ssh call
by just setting CTDB_SOCKET.
The advantage of this approach is that onnode is the wrapper and it
already exists. You can write tests that can be transparently run on
either a real cluster or a bunch of local daemons.
peace & happiness,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the samba-technical