[Cluster-devel] RFC: cman_wait_init rework

Fabio Massimo Di Nitto fabbione at ubuntu.com
Thu Nov 8 22:05:49 UTC 2007


Hi guys,

I just spotted one major issue with the basic implementation of
cman_wait_init. Basically we don't provide the user any kind
of information about the status and this is bad IMHO.

So I have been thinking a bit about it and I see 2 solutions to
the problem:

One is to just revert the original patch and let the clients use
the actual code for cman_init and cman_admin_init.

Two is to complete cman_wait_init with something similar to the patch
in attachment. As an example I have converted qdisk to use it (patch is untested
and qdisk is kind of a special case because it retains backwards compatibility
with older versions of cman, so look at it in the full context of the code).
You can see that the code is generally simplified and the client can retain as
much control as they want.

The basic idea is to provide the option to hook two (optionals) callbacks that
are invoked in each loop (waiting for cman or quorum).

If we will go this route, i want to extend this patch to allow the callbacks to
either modify/reset the loops or return some values to break the loops.

Cheers
Fabio
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cman_wait.diff
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20071108/4aaa4d86/attachment.ksh>


More information about the Cluster-devel mailing list