On Fri, May 22, 2009 at 5:52 PM, Raoul Bhatia [IPAX] <[email protected]> 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: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to