Skip to content

Commit

Permalink
qa: when we run pmlogger_check directly, ned to be pcp:pcp not root:root
Browse files Browse the repository at this point in the history
    modified:   1763
    modified:   793
  • Loading branch information
kmcdonell committed Feb 16, 2024
1 parent 858cf84 commit 59fdbfe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions qa/1763
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ cat >$tmp.ctl <<End-of-File
LOCALHOSTNAME n n PCP_ARCHIVE_DIR/$seq -c $tmp.config
End-of-File
$sudo cp $tmp.ctl $PCP_ETC_DIR/pcp/pmlogger/control.d/$seq
$sudo $PCP_BINADM_DIR/pmlogger_check
$sudo -u $PCP_USER -g $PCP_GROUP $PCP_BINADM_DIR/pmlogger_check

echo "Expect installed and running ..."
pmlogctl -V status | _filter_status
Expand All @@ -105,7 +105,7 @@ cat >$tmp.ctl <<End-of-File
`hostname` n n PCP_ARCHIVE_DIR/$seq -c $tmp.config
End-of-File
$sudo cp $tmp.ctl $PCP_ETC_DIR/pcp/pmlogger/control.d/$seq
$sudo $PCP_BINADM_DIR/pmlogger_check
$sudo -u $PCP_USER -g $PCP_GROUP $PCP_BINADM_DIR/pmlogger_check

echo "Expect installed and running ..."
pmlogctl -V status | _filter_status
Expand Down
14 changes: 8 additions & 6 deletions qa/793
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,15 @@ echo "pmproxy_was_running=$pmproxy_was_running" >>$here/$seq.full
_setup

mkdir $tmp
$sudo chown $PCP_USER:$PCP_GROUP $tmp

# this one is set via the environment
#
export qatmp=$tmp

# control file
#
cat >$tmp/control <<End-of-File
cat >$tmp.control <<End-of-File
\$version=1.1
\$PMLOGGER_CHECK_SKIP_JANITOR=yes
\$A=A
Expand All @@ -229,17 +230,18 @@ LOCALHOSTNAME n n \$qatmp/\$A --pmlc-ipc-version=2 -c $tmp.config -l $tmp.A.lo
LOCALHOSTNAME n n '\$(echo $qatmp/B)' --pmlc-ipc-version=2 -c $tmp.config -l $tmp.B.log -Dservices,appl3,appl4
LOCALHOSTNAME n n "$qatmp/\`echo c | tr '[a-z]' '[A-Z]'\`" --pmlc-ipc-version=2 -c $tmp.config -l $tmp.C.log -Dservices,appl3,appl4
End-of-File
sudo -u $PCP_USER -g $PCP_GROUP cp $tmp.control $tmp/control

cat $tmp/control >>$here/$seq.full
echo "qatmp=$qatmp" >>$here/$seq.full
echo "PCP_TMP_DIR=$PCP_TMP_DIR" >>$here/$seq.full

echo "pmlogger_check #1" | tee -a $here/$seq.full
$sudo sh -c "qatmp=$qatmp $PCP_BINADM_DIR/pmlogger_check -V -c $tmp/control -l $tmp/log"
$sudo -u $PCP_USER -g $PCP_GROUP sh -c "qatmp=$qatmp $PCP_BINADM_DIR/pmlogger_check -V -c $tmp/control -l $tmp/log"
if [ -s $tmp/log ]
then
echo "$tmp.log from pmlogger_check #1 ..." >>$here/$seq.full
$sudo cat $tmp/log | tee -a $here/$seq.full | _filter
cat $tmp/log | tee -a $here/$seq.full | _filter
fi
_check_loggers
for x in A B C
Expand All @@ -254,11 +256,11 @@ sleep 1
_stop_loggers

echo "pmlogger_check #2" | tee -a $here/$seq.full
$sudo sh -c "qatmp=$qatmp $PCP_BINADM_DIR/pmlogger_check -V -c $tmp/control -l $tmp/log"
$sudo -u $PCP_USER -g $PCP_GROUP sh -c "qatmp=$qatmp $PCP_BINADM_DIR/pmlogger_check -V -c $tmp/control -l $tmp/log"
if [ -s $tmp/log ]
then
echo "$tmp.log from pmlogger_check #2 ..." >>$here/$seq.full
$sudo cat $tmp/log | tee -a $here/$seq.full | _filter
cat $tmp/log | tee -a $here/$seq.full | _filter
fi
_check_loggers
for x in A B C
Expand Down Expand Up @@ -288,7 +290,7 @@ fi

echo
echo "pmlogger_daily"
$sudo sh -c "qatmp=$qatmp $PCP_BINADM_DIR/pmlogger_daily -D -Z -VV -x never -c $tmp/control -l $tmp/log"
$sudo -u $PCP_USER -g $PCP_GROUP sh -c "qatmp=$qatmp $PCP_BINADM_DIR/pmlogger_daily -D -Z -VV -x never -c $tmp/control -l $tmp/log"
if [ -s $tmp/log ]
then
echo "$tmp.log from pmlogger_daily ..." >>$here/$seq.full
Expand Down

0 comments on commit 59fdbfe

Please sign in to comment.