What appears to be happening is that in DoPMNSNames of
pmcd/src/dopdus.c that it is required that all PMDA_INTERFACE_4
metrics must be valid, else an error is generated.
That doesn't seem to be enforced for static lookups in that same
function. sts is just set to the number found.
Also not for PMNS_LOCAL lookups for PMDA_INTERFACE_4 metrics in
pmLookupName directly. "lsts" is ignored if the lookup fails.
So would the appropriate thing be do ignore PM_ERR_NAME errors,
increment sts on success, and propagate the number of names
converted back to the caller through sts?
Sorry for the convoluted descriptions, just trying to work my way
through this code.
Thanks
Martins
On 4/2/2015 1:49 PM, Martins Innus
wrote:
Hi,
Please see the attached code for an example of differences in
return value for pmLookupName when a metric is not found depending
on whether the top level namespace is handled by a dynamic pmda.
For a regular metric (non dynamic) if we give it a bogus metric
name, the function returns fine, the appropriate pmID is set to
NULL and "sts" reflects the valid number of names converted, as
expected.
For a metric that would be rooted at a dynamic tree, it seems
the lookups all happen properly, NULL is set for the bogus metric
properly, but "sts" returns PM_ERR_NAME.
I think it is somewhere in the pmns<->pdu interaction
that the status is being propagated all the way back for dynamic
metrics but not normal ones. I'm not familiar enough with this
code to figure out the right way to fix it.
Thanks for any insight.
Martins
_______________________________________________
pcp mailing list
pcp@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/pcp
|
|