>From 0a724dafb408edce468104b089eeb1b760b79bed Mon Sep 17 00:00:00 2001 From: Paul Evans Date: Sun, 9 Feb 2014 11:24:04 +0000 Subject: [PATCH 1/1] pmdaproc.sh patch: Amendment after testing with RHEL 7 Small change with the proposed patch by Nathan with regards to the logic checking if Rebuild exists. Upon testing on RHEL 7 any pmda's which included stdpmid in their root would fail parsing the pmda's root (pmcpp would fail, pmcpp: root[5]: To counter this call Make.stdpmid. PMDA installs work correctly now, there is just a verbal warning on locking the global root the first time a PMDA is installed (lockpmns: Warning: Unable to acquire lock (root.lock) after 120 seconds ... continuing anyway), but again this down to a global root not yet existing in the scenario. --- src/pmcd/pmdaproc.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/pmcd/pmdaproc.sh b/src/pmcd/pmdaproc.sh index 43cffa7..b273422 100644 --- a/src/pmcd/pmdaproc.sh +++ b/src/pmcd/pmdaproc.sh @@ -1163,6 +1163,27 @@ _install() # Install the namespace # + if [ ! -f $NAMESPACE ] + then + # We may be installing an agent right after an install - + # before pmcd startup, which has a pre-execution step of + # rebuilding the namespace root. Do so now. + # + # pmcpp exits with file not found when reading a pmda root + # that includes stdpmid. (Does not exist yet). Generate one now. + if [ ! -x $PMNSDIR/Rebuild ] + then + echo "$prog: cannot Rebuild the PMNS for \"$NAMESPACE\"" + exit 1 + fi + cd $PCP_VAR_DIR/pmns/ + ./Make.stdpmid + cd $PMNSDIR + ./Rebuild -dus + cd $__here + forced_restart=true + fi + for __n in $pmns_name do if pminfo $__ns_opt $__n >/dev/null 2>&1 -- 1.7.11.7