Hi,

while writing the o2cb RA for autoconfiguring the Oracle Cluster
Filesystem membership layer I arrived at what I think to be a neat
conclusion for the problem of configuring all nodes in the same way, and
distributing a configuration file across all nodes.

It also shows how powerful the CIB/CRM combo is, even for "just" a shell
script!

First, I need to distribute the IP address every node uses for the O2CB
layer - I use a transient node attribute with a well known name to store
this data.

Second, I select one of the nodes as the "leader" in the clone script;
this one computes the new configuration (and looking up all the nodes's
values). To make everyone wait until this step has completed, I again
use a transient node attribute as a "lock" - everyone else waits until
the leader unlocks it.

Third, I use the lock data value to store the hash of the configuration
file in question; that makes it very easy to detect when the other nodes
should retrieve an updated copy.

Maybe some of this is useful for some ideas you've meant to implement.

(For example, I could see this being used in the drbd RA - it could
auto-detect the peer's IP address & hostname. It could lead to
"zero-config" drbd deployments, which would be cool. Any takers? ;-)


Regards,
    Lars

-- 
Teamlead Kernel, SuSE Labs, Research and Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to