onnode: add "any" nodespec to select any node with running CTDB.
authorMartin Schwenke <martin@meltin.net>
Tue, 8 Sep 2009 05:10:20 +0000 (15:10 +1000)
committerMartin Schwenke <martin@meltin.net>
Tue, 8 Sep 2009 05:10:20 +0000 (15:10 +1000)
commitfb47cce86c0edae5caaf485f13ae7a151b6cb00d
tree9ace62f93104def770c7550643009bdb8f01bbb8
parent10ebeb215e7260186dab8f4f2403c48db9df9a00
onnode: add "any" nodespec to select any node with running CTDB.

In testing and other situations (e.g. eventscripts) it is necessary to
select a node where a ctdb command can be run.  The whole idea here is
to avoid nodes where ctdbd is not running and where most ctdb commands
would fail.  This implements a standard way of doing this involving a
recursive onnode command.

There is still a small window for a race, where the selected node is
suddenly shutdown, but this is unavoidable.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tools/onnode