On 2010-02-26 14:49, Marian Marinov wrote:
> On Friday 26 February 2010 15:46:19 Lars Marowsky-Bree wrote:
>> On 2010-02-25T12:32:50, Dejan Muhamedagic <[email protected]> wrote:
>>>> How would I match two hostnames:
>>>>
>>>> host_a='shrek' host_b='shrek '
>>>>
>>>> I don't know how to do that without RE in shell. I'll gladly change
>>>> my stupid solution.
>> I didn't say your solution was stupid, I was actually agreeing with you
>> ;-)
>>
>>> You can try:
>>>
>>> is_hostname_in_list() {
>>> for h in $VAR; do
>>>     [ "$h" = "$HOSTNAME" ] && return 0
>>> done
>>> return 1
>>> }
>> The RA also should make sure that the list only contains one value. But
>> yes, this should work.
>>
> 
> Is it actually possible to have more then one nodes in this variable for 
> Master/Slave resources ?

Well, yes, if master-max>1 and 2 nodes have an equal master preference,
then that's possible, IIRC. Andrew is the authority on that, though.

Now, if you want to disallow that behavior (in other words: you want to
limit the number of possible masters to 1), which is probably a good
idea, then you need to add that check to validate, and exit with
$OCF_ERR_CONFIGURED if master-max>1.

Cheers,
Florian

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to