Problem
The openmetrics and opentelemetry PMDAs are silently excluded from the macOS PKG build when python3 -c 'import requests' fails during ./configure. The configure check sets PMDA_OPENMETRICS=false and PMDA_OPENTELEMETRY=false, and their GNUmakefiles produce empty build targets — no warning, no error.
Even when they are built (as in the GitHub Actions CI which installs requests in a venv), the macOS postinstall script has no logic to activate them. On Linux, pcp-zeroconf's postinstall creates .NeedInstall marker files that tell pmcd to auto-install these PMDAs on first start. The macOS postinstall has no equivalent.
Depends on: #2539 (centralised Python deps ensure requests is available at build time)
Root Cause
- Build dependency:
requests Python package not installed → PMDA_OPENMETRICS=false (silent)
- No post-install activation:
build/mac/installer-resources/postinstall doesn't create .NeedInstall markers
How .NeedInstall works (existing platform-agnostic mechanism)
- Package postinstall touches
/var/lib/pcp/pmdas/<name>/.NeedInstall
- When pmcd starts,
rc_pmcd runs _pmda_setup() which scans for these markers
- Each PMDA's
Install script runs, adding it to pmcd.conf
- pmcd reloads and starts collecting from the new PMDA
This mechanism is already platform-agnostic — rc_pmcd works on macOS. It just never gets triggered because nobody creates the markers.
Linux precedent
Debian (pcp-zeroconf.postinst):
for PMDA in dm nfsclient openmetrics opentelemetry ; do
if ! grep -q "$PMDA/pmda$PMDA" /etc/pcp/pmcd/pmcd.conf; then
if test -d "/var/lib/pcp/pmdas/$PMDA"; then
touch "/var/lib/pcp/pmdas/$PMDA/.NeedInstall"
fi
fi
done
RPM (pcp-zeroconf %post):
needinstall='dm'
needinstall="$needinstall nfsclient openmetrics opentelemetry"
for PMDA in $needinstall ; do
if ! grep -q "$PMDA/pmda$PMDA" "$PCP_PMCDCONF_PATH"; then
touch "$PCP_PMDAS_DIR/$PMDA/.NeedInstall"
fi
done
Both use a curated list of PMDAs, not a directory scan.
Proposed Solution
Add .NeedInstall logic to build/mac/installer-resources/postinstall, placed before the launchctl kickstart for pmcd so markers exist when pmcd starts:
# Auto-enable optional PMDAs (mirrors pcp-zeroconf on Linux)
if [ -f /etc/pcp.conf ]; then
. /etc/pcp.conf
for PMDA in openmetrics opentelemetry ; do
if ! grep -q "$PMDA/pmda$PMDA" "$PCP_PMCDCONF_PATH" 2>/dev/null; then
if test -d "$PCP_PMDAS_DIR/$PMDA"; then
touch "$PCP_PMDAS_DIR/$PMDA/.NeedInstall"
echo "$prog: Queued $PMDA PMDA for installation" >> /var/log/pcp_inst.log
fi
fi
done
fi
CI verification
Add steps to both .github/workflows/macOS.yml and .cirrus.yml after installation:
# Verify openmetrics PMDA is active after install
pminfo openmetrics 2>/dev/null && echo "openmetrics PMDA active" || echo "openmetrics PMDA not active"
Notes
libuv is already a required macOS build dependency (pmproxy needs it), so pmproxy's openmetrics.c/opentelemetry.c handlers should already be compiling.
- The Linux
pcp-zeroconf also enables dm and nfsclient — those could be added to the macOS list in a follow-up.
- The openmetrics PMDA ships with default URL configs for Grafana, Ceph, etcd, vLLM, etc. These probe gracefully — they only activate if endpoints are reachable.
Problem
The openmetrics and opentelemetry PMDAs are silently excluded from the macOS PKG build when
python3 -c 'import requests'fails during./configure. The configure check setsPMDA_OPENMETRICS=falseandPMDA_OPENTELEMETRY=false, and their GNUmakefiles produce empty build targets — no warning, no error.Even when they are built (as in the GitHub Actions CI which installs
requestsin a venv), the macOSpostinstallscript has no logic to activate them. On Linux,pcp-zeroconf's postinstall creates.NeedInstallmarker files that tell pmcd to auto-install these PMDAs on first start. The macOSpostinstallhas no equivalent.Depends on: #2539 (centralised Python deps ensure
requestsis available at build time)Root Cause
requestsPython package not installed →PMDA_OPENMETRICS=false(silent)build/mac/installer-resources/postinstalldoesn't create.NeedInstallmarkersHow
.NeedInstallworks (existing platform-agnostic mechanism)/var/lib/pcp/pmdas/<name>/.NeedInstallrc_pmcdruns_pmda_setup()which scans for these markersInstallscript runs, adding it topmcd.confThis mechanism is already platform-agnostic —
rc_pmcdworks on macOS. It just never gets triggered because nobody creates the markers.Linux precedent
Debian (
pcp-zeroconf.postinst):RPM (
pcp-zeroconf%post):Both use a curated list of PMDAs, not a directory scan.
Proposed Solution
Add
.NeedInstalllogic tobuild/mac/installer-resources/postinstall, placed before thelaunchctl kickstartfor pmcd so markers exist when pmcd starts:CI verification
Add steps to both
.github/workflows/macOS.ymland.cirrus.ymlafter installation:Notes
libuvis already a required macOS build dependency (pmproxy needs it), so pmproxy'sopenmetrics.c/opentelemetry.chandlers should already be compiling.pcp-zeroconfalso enablesdmandnfsclient— those could be added to the macOS list in a follow-up.