[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] ocf (non) unique parameter
From:       Andrew Beekhof <andrew () beekhof ! net>
Date:       2009-05-25 10:44:23
Message-ID: b80f82d20905250344u79616c86u5abf754fbf78f40a () mail ! gmail ! com
[Download RAW message or body]

On Fri, May 22, 2009 at 5:52 PM, Raoul Bhatia [IPAX] <r.bhatia@ipax.at> wrote:
> can someone explain the practical usage of non-unique attributes?
>
> in the ocf ra specs [1], one can read
>> The meta data allows the RA to flag one or more instance parameters as
>> 'unique'. This is a hint to the RM or higher level configuration tools
>> that the combination of these parameters must be unique to the given
>> resource type.
>
> speaking in the v2 configuration language, i thought that this means
> that one can specify multiple nvpairs with the same name to the cib.xml

but for different resources.
ie. multiple ip addresses can use the same netmask (unique=0) but each
must have a different ip address (unique=1)

> file. e.g. looking at the pingd ra:
>
>> <parameter name="pidfile" unique="0">
>> <longdesc lang="en">PID file</longdesc>
>> <shortdesc lang="en">PID file</shortdesc>
>> <content type="string" default="$HA_RSCTMP/pingd-${OCF_RESOURCE_INSTANCE}" />
>> </parameter>
>
> -> e.g.
>> <nvpair id="pidfile1" name="pidfile" value="/tmp/pid1.pid" />
>> <nvpair id="pidfile2" name="pidfile" value="/tmp/pid2.pid" />
>
> as far as i can see, the first nvpair seems to "win" though and
> OCF_RESKEY_pidfile is set to "/tmp/pid1.pid".

yep

> can someone please shed a light on how to (not) use unique="0"
> attributes and how they are passed to the ocf ra scripts?

as above.  a resource can only have one value for any given attribute
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic