pcp
[Top] [All Lists]

[Bug 1270176] Python PMAPI pmSetOptionHostList no workie

To: pcp@xxxxxxxxxxx
Subject: [Bug 1270176] Python PMAPI pmSetOptionHostList no workie
From: bugzilla@xxxxxxxxxx
Date: Tue, 13 Oct 2015 03:18:21 +0000
Auto-submitted: auto-generated
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <bug-1270176-355098@xxxxxxxxxxxxxxxxxxx>
References: <bug-1270176-355098@xxxxxxxxxxxxxxxxxxx>
https://bugzilla.redhat.com/show_bug.cgi?id=1270176

Nathan Scott <nathans@xxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |MODIFIED



--- Comment #5 from Nathan Scott <nathans@xxxxxxxxxx> ---
(In reply to Marko Myllynen from comment #4)
> 
> A quick and simple test script attached. Setting archive folio works but
> setting host/archive fails.

Thanks Marko.  The reason it fails with --host-list and --archive-list with
that error (e.g. "too many hosts requested") is that these options require the
script to be flagged as allowing multiple contexts via PM_OPTFLAG_MULTI.

So, the error is actually coming out of the libpcp getopts code, which is
perhaps a little too strict in the case of a host/archive list with only one
element as you built here.  I'll fix that up to make it behave more
intuitively.

However, I think what you really want here is an interface for setting just one
source (then you wouldn't have got thrown a red herring by the list interfaces)
- these single-source interfaces exist in libpcp, but are missing in the python
API.  With this, setting a host from your config file will be just like setting
sample interval.

I've converted your little script into a regression test for these new python
interfaces, and written the new API code - will commit shortly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug 
https://bugzilla.redhat.com/token.cgi?t=DnsQKflb6y&a=cc_unsubscribe

<Prev in Thread] Current Thread [Next in Thread>