On Dec 7, 2007, at 11:56 AM, Keisuke MORI wrote:
Andrew,
Can I ask a question about the internal status of the PE?
My SNMP subagent code is using cluster_status(pe_working_set_t)
to analyze the current status of resources like crm_mon.
When a parent resource(group/clone/master) is unmanaged,
'running_on' and 'allowed_nodes' member of resource_t gets NULL.
Is this an expected value?
I thought that group/clone/master always had NULL... since they can be
running on more than one node (especially clone and m/s resources)
I recall also doing something special for unmanaged resources but I
can probably change that behavior for you.
that said, it would be better to use the recently added API call:
node_t *(*location)(resource_t *, GListPtr*, gboolean);
eg.
node_t *native_location(resource_t *rsc, GListPtr *list, gboolean
current)
returns node_t* which will be non-NULL if "rsc" and all its children
are active on a single node.
if it returns NULL, check "list" for all the nodes "rsc" is active on.
if you want the existing location, set current=TRUE
if you want the calculated next location, set current=FALSE (most
people will always want true)
or any intention about this?
If the parent resource was managed, those members have node values
according to its children.
In the case of a child resource(primitive), those members always
contain node values no matter if it's in managed or unmanaged.
My SNMP subagent has a minor problem for displaying the status
of an unmanaged group resource and I'm now looking into how
should I fix it.
Thanks,
Keisuke MORI
NTT DATA Intellilink Corporation
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/