Hello Rainer

> -----Ursprüngliche Nachricht-----
> Von: Rainer Brestan [mailto:rainer.bres...@gmx.net]
> Gesendet: Dienstag, 9. April 2013 19:39
> An: The Pacemaker cluster resource manager
> Betreff: Re: [Pacemaker] Clone Resources Individual Configuration per Node
> 
> Hi Felix,
> thats exactly the reason why I took the meta attribute variant.
> It is currently available neither via crm_resource nor via crm.

That's an important point. I now thought a bit about all oft he solutions. I 
decided to use a way between.
Your solution can be configured via the crm shell and has the advantage that 
you easily see all config params at once. The "rule" solution has the advantage 
that it is flexibile for adding other hosts but it bloats configuration and 
renders it unhandy.

I decided for a way in between. That is what I am doing:

(initialisation section of RA)

LOCAL_NODE_NAME=$(uname -n)

for node in $OCF_RESKEY_parentwwpns
do
    node_name=$(echo $node | cut -d ';' -f 1)
    node_wwpn=$(echo $node | cut -d ';' -f 2)
    if [[ $node_name == $LOCAL_NODE_NAME ]]
    then
        parentwwpn=$node_wwpn
        break
    fi
done

Additionally I added another check in the validate_all that tests for -z  
$parentwwpn and i fit finds that empty it returns an error.

That means I give a space separated list in the form node;addr node2;addr 
node3;addr in a single parameter. That makes it flexible for n hosts. Each host 
can decide which ist the right addr for it, you can configure it via crm shell 
and you can see all config params in a very compact form. I know the parsing is 
quick and dirty but as long as the user does not specify more than one 
semicolon per node config it works.

Regards, Felix


_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to