Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/performancecopilot/pcp
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcdonell committed Apr 24, 2019
2 parents d33340f + f4fba93 commit ff6836f
Show file tree
Hide file tree
Showing 15 changed files with 919 additions and 19 deletions.
65 changes: 64 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,68 @@
pcp-4.3.2 (26 April 2019)
- Work in progress, see https://pcp.io/roadmap
- Client tools and utilities:
pcp-dstat: fix invisible gray coloring ansi escape code
pcp-dstat: GH#624 handle the end-of-archive condition correctly
pcp-pidstat: drop unused -h/--host option
pcp-atopsar: RHBZ1673996 fix -A for replying from archive
pcp-atopsar: improve handling of mark records and log end
pcp2spark: minor output tweak
pcp2zabbix: send first metrics without waiting
pcp2template: aid to creating new pcp2xxx tools
pmlogrewite: diagnostic changes to use new flags
pmrep: tweak output in case of no values available with -X
pmrep: introduce fixed header (-7, --fixed-header option)
pmrep/pcp2xxx: more helpful error message when pmcd not running
pmsnap: fix leak of Xvfb processes
pmgadgets pmgsys.py: make this work with Python2 and Python3
pmgadgets: fixes so it builds again with Qt5
pmview: set correct default time if no -t on command line
- PMDA additions, enhancements and bug fixes:
pmdalinux: fixes to parsing of /proc/zoneinfo
pmdalinux: fix two metrics with no values on some kernel versions
pmdalinux: updates to SYSV IPC metrics
pmdaproc: fix Linux cgroup *service_bytes.* metric metadata
pmdabcc: uprobe_hits: fix use of wrong variable
pmdabcc: make cachestat module currently working with ext4 only
pmdabcc: add kprobe hit count BPF/Python module
pmdabcc: keep uprobes_hits logging consistent with other hit modules
several pmdas: remove PM_ERR_AGAIN uses, correct PMDA_FETCH_* macros
txmon: update from PMDA_INTERFACE_2 to PMDA_INTERFACE_7
pmdaperfevent: deprecate pmdapapi, upgrade to perfevent
pmdanvidia: fix up indom help text macro name typo
pmdazimbra: major overhaul
- Server-side utilities and log management scripts:
systemd: fix Environment parameter usage
pmdaroot: ensure zombie PMDA processes are reaped
pmproxy: initial pmseries and grafana datasource REST APIs
pmproxy, libpcp_web: support for pmproxy configuration file
pmcd: RHBZ1641161 add support for PMDA suspend and resume (fencing)
pmlogger_daily.sh: try harder in the presence of errors
pmwebd: fix a broken diagnostic causing crashes
- Security Enhanced Linux:
RHBZ1693332 update BPF permissions for pmdabcc
fix some fallout from the systemd timer transition
allow pcp_pmcd_t module_request access from class system
allow the nvidia pmda to dlopen libnvidia-ml
- libpcp, libpcp_pmda, libpcp_mmv, libpcp_web and language bindings
perl PMDA.pm: expose PMDA_FETCH_* macros
pmapi.h: add appl3, appl4 and appl5 debug flags
libpcp_web: refactoring and support for Redis cluster protocol
- Misc build, infrastructure and packaging updates:
builddefs: rework qmake recipe
replace libdbd-pg-perl Debian dep with python3-psycopg2
add python-devel (v2) explicitly for el7 vagrants
update generated rpm spec to drop 'Group' keyword
vagrant: various fixes, improvements to provisioning scripts
configure: set pcp_rc_dir correctly for FreeBSD
configure: allow --with-qt=DIR to specify QT installation dir
- Documentation and QA infrastructure:
qa: adjust for Python 3 only systems
qa: massive change to remove init script chatter
qa/check et al: rework callback workflow
qa/common.check: change to using systemctl if available
qa/check.callback captures the before+after state of pmcd and pmlogger
qa/check.callback captures any new selinux AVC denials from each test
INSTALL.md: update and clarify a few things

pcp-4.3.1 (27 February 2019)
- Client tools and utilities:
Expand Down
3 changes: 3 additions & 0 deletions build/rpm/fedora.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3297,6 +3297,9 @@ cd
%changelog
* Fri Apr 26 2019 Nathan Scott <nathans@redhat.com> 4.3.2-1
- Work in progress, see https://pcp.io.roadmap
- Resolve selinux policy issues for BPF permissions (BZ 1693332)
- Further improvements to daily archive processing (BZ 1647390)
- Update to latest PCP sources.

* Wed Feb 27 2019 Mark Goodwin <mgoodwin@redhat.com> - 4.3.1-1
- Fixes pcp-dstat in --full (all instances) mode (BZ 1661912)
Expand Down
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pcp (4.3.2-1) unstable; urgency=low
* New release (full details in CHANGELOG).
* Remove anibal from uploaders, MIA team request (closes: #925090)

-- Nathan Scott <nathans@debian.org> Fri, 26 Apr 2019 17:35:59 +1100
-- Nathan Scott <nathans@debian.org> Fri, 26 Apr 2019 09:35:59 +1000

pcp (4.3.1-1) unstable; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion qa/1600
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pmsleep 0.5

# start pmproxy
proxyport=`_find_free_port`
proxyopts="-p $proxyport -r $redisport" # -Dseries,discovery
proxyopts="-p $proxyport -r $redisport -t" # -Dseries,discovery
pmproxy -f -U $username -x $seq.full -l $tmp.pmproxy.log $proxyopts &
pmproxy_pid=$!

Expand Down
2 changes: 1 addition & 1 deletion qa/1601
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pmseries $options --load "{source.path: \"$here/archives/proc\"}" | _filter_sour

# start pmproxy
proxyport=`_find_free_port`
proxyopts="-p $proxyport -r $redisport" # -Dseries,http,af
proxyopts="-p $proxyport -r $redisport -t" # -Dseries,http,af
pmproxy -f -U $username -x $seq.full -l $tmp.pmproxy.log $proxyopts &
pmproxy_pid=$!

Expand Down
130 changes: 130 additions & 0 deletions qa/1602
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
#!/bin/sh
# PCP QA Test No. 160f
# Exercise Redis protocol proxying using redis-cli(1).
#
# Copyright (c) 2019 Red Hat.
#

seq=`basename $0`
echo "QA output created by $seq"

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

_check_series

_cleanup()
{
cd $here
[ -n "$pmproxy_pid" ] && $signal -s TERM $pmproxy_pid
[ -n "$options" ] && redis-cli $options shutdown
if $need_restore
then
need_restore=false
_restore_config $PCP_SYSCONF_DIR/pmproxy
fi
$sudo rm -rf $tmp $tmp.*
}

status=1 # failure is the default!
signal=$PCP_BINADM_DIR/pmsignal

userid=`id -u`
groupid=`id -g`
username=`id -u -n`
hostname=`hostname`
machineid=`_machine_id`
if which domainname >/dev/null 2>&1
then
domainname=`domainname`
else
domainname=`hostname -d`
fi
[ -z "$domainname" ] && domainname=localdomain
[ "$domainname" = "(none)" ] && domainname=localdomain

need_restore=false
$sudo rm -rf $tmp $tmp.* $seq.full
trap "_cleanup; exit \$status" 0 1 2 3 15

_filter_redis()
{
sed \
-e "s,:$port1>,:PORT1>,g" \
-e "s,:$port2>,:PORT2>,g" \
#end
}

# real QA test starts here
_save_config $PCP_SYSCONF_DIR/pmproxy
$sudo rm -f $PCP_SYSCONF_DIR/pmproxy/*
need_restore=true

echo "== start two test Redis servers"
redisport1=`_find_free_port`
redis-server --port $redisport1 > $tmp.redis1 2>&1 &
echo "PING1"
pmsleep 0.125
options1="-h localhost -p $redisport1"
redis-cli $options1 ping
echo
redisport2=`_find_free_port`
redis-server --port $redisport2 > $tmp.redis2 2>&1 &
echo "PING2"
pmsleep 0.125
options2="-h localhost -p $redisport2"
redis-cli $options2 ping
echo

# start pmproxy
cat >$tmp.conf <<EOF
[pmproxy]
pcp.enabled = true
redis.enabled = true
[pmseries]
servers = localhost:$redisport1,localhost:$redisport2
EOF
proxyport=`_find_free_port`
proxyopts="-p $proxyport -c $tmp.conf"
pmproxy -f -t -U $username -x $seq.full -l $tmp.pmproxy.log $proxyopts &
pmproxy_pid=$!

# check pmproxy has started and is available for requests
pmcd_wait -h localhost@localhost:$proxyport -v -t 5sec

# check redis protocol proxying
echo "== redis-cli set two keys"
redis-cli -p $proxyport set pcpqa:$seq:one 1
redis-cli -p $proxyport set pcpqa:$seq:ten 10
echo

# check pcp protocol proxying
echo "== pminfo get two metrics"
pminfo -f -h localhost@localhost:$proxyport sample.long.one sample.long.ten
echo

# check redis protocol proxying
echo "== redis-cli get two keys"
redis-cli -p $proxyport get pcpqa:$seq:one
redis-cli -p $proxyport get pcpqa:$seq:ten
echo

# check redis protocol error handling
echo "== redis-cli empty key set"
redis-cli -p $proxyport keys no-such-key
echo
echo "== redis-cli handle errors"
redis-cli -p $proxyport get foo bar
echo

cat $tmp.conf >> $seq.full
$PCP_PS_PROG $PCP_PS_ALL_FLAGS | grep pmproxy >> $seq.full
redis-cli $options1 keys pcpqa:* >> $seq.full
redis-cli $options2 keys pcpqa:* >> $seq.full
cat $tmp.pmproxy.log >> $seq.full

echo "== all done" | tee -a $seq.full
status=0
exit
31 changes: 31 additions & 0 deletions qa/1602.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
QA output created by 1602

== start two test Redis servers
PING1
PONG

PING2
PONG

== redis-cli set two keys
OK
OK

== pminfo get two metrics
sample.long.one
value 1

sample.long.ten
value 10

== redis-cli get two keys
"1"
"10"

== redis-cli empty key set
(empty list or set)

== redis-cli handle errors
(error) ERR wrong number of arguments for 'get' command

== all done
1 change: 1 addition & 0 deletions qa/581
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ _filter_pmie_log <$tmp.out \
-e '/^DISK wd[0-9][0-9]*$/d' \
-e '/^DISK xscsi\/pci/d' \
-e '/^DISK xvm\//d' \
-e '/^DISK nvme[0-9]*n[0-9]*/d' \
-e '/^DISK disk[0-9][0-9]*$/d' \
-e '/^CPU cpu[0-9][0-9]*$/d' \
-e '/^CPU cpu:[0-9][0-9]*\.[0-9][0-9]*\.[ab]$/d' \
Expand Down

0 comments on commit ff6836f

Please sign in to comment.