Changes committed to git://oss.sgi.com/pcp/pcp.git dev
HACKING | 66 ++++++-------
Makepkgs | 31 ++++--
qa/728.out |binary
qa/750 | 5 -
qa/common.rpm | 47 +++++++++
qa/src/test_pcp.python | 14 ++
src/pmdas/rpm/rpm.c | 230 +++++++++++++++++++++++++++++-------------------
src/python/pcp/pmapi.py | 4
8 files changed, 256 insertions(+), 141 deletions(-)
commit 5e080559cb1f2032414451657c37153b14a64f39
Merge: df34bee 9b8c9b1
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon Apr 7 11:30:43 2014 +1000
Merge branch 'fche/rpm' of ../pcpfans into dev
commit df34bee42082be8f9d73bca5f1118a9dab58aa26
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon Apr 7 11:29:41 2014 +1000
Add a Makepkgs mode allowing for absence of GNU tar
If we have no GNU tar, we can still stumble on with building the
packages via Makepkgs, thanks to git-archive. Then downside of
this mode is that it does not pick up not-yet-committed changes.
So its added as a fallback mode, and is used only when a GNU tar
binary cannot be found.
commit 0f0563ad023e45feb86db2eb4de57fc96db470e4
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon Apr 7 11:24:53 2014 +1000
Provide a python pmLookupName API mode allowing partial failure
The python wrapper for pmLookupName takes a hard-line approach to
metric name resolution - if any are missing, an exception will be
thrown, and any names which did resolve are tossed in the bin.
The underlying C API is designed to cater for missing metrics and
tools use this facility surprisingly often. It allows for cross-
platform quirks to be elegantly handled, and other fallback modes
(eg. where two similar metrics exist, and a prefered one might be
unavailable).
This API extension is tackled in a backwards-compatible way, by
using an optional second argument to allow the "relaxed" handling
of missing metric names.
Tests qa/702 and qa/707 now exercise this little addition, via an
extension to the qa/src/test_pcp.python script which they share.
commit 9b8c9b1a5dc9c9fbf6266fc8884a576ee4c11f00
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon Apr 7 11:19:11 2014 +1000
Resolve missed change-does-not-match-surrounding-code in pmdarpm
A recent threading fix to pmdarpm introduced an exciting new coding
style into this file, contrary to HACKING Conventions. On review,
some were removed, but others overlooked. This fixes the remaining
ones so that this code does not start to look like Frankenstein, in
the long term (too late, you may argue ;) ... but at least we try!)
commit 862b2032bd618850258db3ca7b092bc1e30b342c
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon Apr 7 10:53:35 2014 +1000
Update test 750 to more robustly detect an installed rpm
Test qa/750 and common.rpm are updated to remove the increasing
sleep-waiting-for-rpmdb-refresh interval, and replace it with a
check on the presence/absence (depending on whether we are doing
addition/removal) of a named package in the rpm instance domain.
As an added bonus for folks running QA often, the test now runs
quite a bit more quickly in the case where the rpm refresh takes
only a short time (which appears to be the normal case, locally
at least).
commit 1e1fee65e733698c2b2daf6da4cc9348d8947d38
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon Apr 7 09:35:21 2014 +1000
Add missing output from test 728
commit dae50a1c31256e2cf1369ee53740257037e3ee4b
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon Apr 7 09:08:59 2014 +1000
Refine HACKING by removing unnecessary/ambiguous words
commit bd4ca2a97d41a33f509428a3aa98ef7f5ddfeb76
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Thu Apr 3 16:52:30 2014 -0400
RHBZ1044297: whitespace cleanup
Because any time is whitespace fixing time.
commit 2b819ff78995cf243413afe67996827a04dae551
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Thu Apr 3 11:53:28 2014 -0400
RHBZ1044297: improve rpm-pmda concurrency complications
A review with rhbz1044297 in mind indicated a few possible problems
with the way rpm-pmda was using threads. The main problem is that the
inotify_thread could run concurrently with the one-shot indom_thread,
which could lead to all kinds of mayhem, because the librpm api
functions in rpm_update_cache() are called without concurrency
protection. We eliminate the indom-thread entirely, instead
triggering an initial round of rpm-cache population at the
head of inotify_thread.
Part of the trigger appeared to be rpmReadConfigFiles(), which is
highly stateful inside librpm. We also now preclude multiple
calls to that function with a simple static flag.
Smaller problems included lack of error protection in the inotify
setup, and unnecessary processing of the received inotify events.
(If we get any events, it means we must refresh.)
The qa/750 test case's pmsleep fudge-factor was raised yet higher to
account for machines with a large rpm database. There is an inherent
race here between system rpm-database updates and the rpmpmda
listener. We might be able to solve more robustly polling the
rpm.refresh.count value, but this is left for the future.
|