Skip to content

Commit

Permalink
Merge branch 'main' of ../pcp
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcdonell committed Sep 27, 2023
2 parents 6a9c858 + 1039a92 commit 18f7406
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 46 deletions.
5 changes: 2 additions & 3 deletions qa/102
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@ do
cat <<End-of-File >$tmp.config
log advisory on $delta sample.bin [100]
End-of-File
# pmlogger -c $tmp.config -T 4 $tmp
$sudo rm -f $tmp.*
_start_up_pmlogger -L -c /dev/null -l $tmp.log -T 4 $tmp
pmsleep 0.5
_start_up_pmlogger -L -c /dev/null -l $tmp.log -T 6 $tmp
pmsleep 1
cat <<End-of-File >$tmp.pmlc
connect $pid
log advisory on $delta sample.bin [100]
Expand Down
12 changes: 12 additions & 0 deletions qa/1190
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@ fi

$PCP_PS_PROG $PCP_PS_ALL_FLAGS | grep -E '[P]ID|[p]mlogger .*-P ' >$tmp.out
n=`grep -v PID <$tmp.out | wc -l | sed -e 's/ //g'`
if [ "$n" -eq 0 ]
then
# if systemctl is in the frame, check for Activating ... we may
# be checking a bit too soon and consider Activating the same as
# Active for the current purposes
#
_systemctl_status pmlogger >$tmp.activating
if grep "Active: activating" $tmp.activating >/dev/null
then
n=1
fi
fi
if [ "$n" -eq 1 ]
then
$check || echo "Count of primary pmlogger's ... OK"
Expand Down
6 changes: 5 additions & 1 deletion qa/1339
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ echo "=== socket Internet agent ===" | tee -a $here/$seq.full

# pick two tcp ports that are not in use
#
port1=`_find_free_port 95670`
port1=`_find_free_port 5670`
if [ -z "$port1" ]
then
echo "Arrgh ... port1: no free TCP port in the range 5670 ... "
Expand All @@ -142,6 +142,10 @@ then
netstat -a | grep $port2 >>$here/$seq.full
fi

# Give the PMDA + internet socket a chance to be setup before pminfo check
#
export PCPQA_CHECK_DELAY=2

echo 'socket
Internet
'$port1 | $sudo ./Install -e >$tmp.out 2>&1
Expand Down
2 changes: 2 additions & 0 deletions qa/1429
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ _cleanup()
cd $here
$sudo rm -rf $tmp $tmp.*
$sudo mv $PCP_LOG_DIR/NOTICES.$seq $PCP_LOG_DIR/NOTICES
_service pcp restart >>$seq.full 2>&1
_wait_for_pmlogger
}

status=0 # success is the default!
Expand Down
2 changes: 2 additions & 0 deletions qa/1432
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ fi
. ./common.filter
. ./common.check

[ -d $PCP_PMDAS_DIR/overhead ] || _notrun "overhead PMDA not installed"

_cleanup()
{
cd $here
Expand Down
56 changes: 20 additions & 36 deletions qa/766
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.discovery

_get_libpcp_config
$service_discovery || _notrun "No support for service discovery"

status=1 # failure is the default!
$sudo rm -rf $tmp.* $seq.full
trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
Expand Down Expand Up @@ -70,36 +67,14 @@ _error_tolerance_filter()
# real QA test starts here
_control_service_discovery

# Obtain the inet address of an active network interface
# We're extracting a metric of the form:
#
# inst [0 or "eth0"] value "172.31.0.12"
#
# and then extracting the address
#
echo >$tmp.tmp
pminfo -f network.interface.inet_addr | \
tail -n +3 | \
grep -v 127.0.0.1 | \
awk '{ print $6 }' | \
sed s/\"//g \
| while read addr
do
if `host $addr 2>&1 | grep NXDOMAIN >/dev/null`
then
# continue, no DNS for this interface, may be partially configured
# DHCP
#
:
else
echo $addr >$tmp.tmp
break
fi
done

addr=`cat $tmp.tmp`
[ -z "$addr" ] && _notrun "no active inet interfaces with DNS resolution"

# Obtain the inet address of the primary network interface
addr=`host $(hostname) | sed -n -e '/has address/s/.* address //p'`
if [ -z "$addr" ]
then
host $(hostname) >>$seq.full 2>&1
_notrun "no primary network interface?"
#NOTREACHED
fi
echo "addr=$addr" >>$seq.full

# Probe the obtained network.
Expand All @@ -110,19 +85,28 @@ echo "-m probe=INET_ADDR/32"
pmfind -m probe=$addr/32 | _unresolved_filter
echo "Exit status: $?" | tee -a $seq.full

# for this one, we should not be surprised to find peer VMs
# in the QA Farm ... there is no DNS to support the reverse
# lookup, so they will be IP addr on the same Class C subnet
#
subnet=`echo $addr | sed -e 's/\.[^.]*$/./' -e 's/\./\\\\./g'`
echo "subnet=$subnet" >>$seq.full
echo "-s pmcd -m probe=$addr/31" -r >> $seq.full
echo "-s pmcd -m probe=INET_ADDR/31 -r"
pmfind -s pmcd -m probe=$addr/30 -r | _resolved_filter
pmfind -s pmcd -m probe=$addr/31 -r \
| tee -a $seq.full \
| _resolved_filter \
| grep -v "pcp://$subnet"
echo "Exit status: $?" | tee -a $seq.full

echo "-q -m probe=$addr/30" >> $seq.full
echo "-q -m probe=INET_ADDR/30"
pmfind -q -m probe=$addr/29 | _unresolved_filter
pmfind -q -m probe=$addr/30 | _unresolved_filter
echo "Exit status: $?" | tee -a $seq.full

echo "-q -s pmcd -m probe=$addr/29 --resolve" >> $seq.full
echo "-q -s pmcd -m probe=INET_ADDR/29 --resolve"
pmfind -q -s pmcd -m probe=$addr/28 --resolve | _resolved_filter
pmfind -q -s pmcd -m probe=$addr/29 --resolve | _resolved_filter
echo "Exit status: $?" | tee -a $seq.full

echo "-q -s pmcd -m probe=$addr/28,maxThreads=8" >> $seq.full
Expand Down
1 change: 1 addition & 0 deletions qa/870
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ _is_activating()
\( -n "$PCP_SYSTEMDUNIT_DIR" -a -f $PCP_SYSTEMDUNIT_DIR/pmlogger.service \) ]
then
eval `systemctl show --property=ActiveState pmlogger.service`
echo "ActiveState=$ActiveState" >>$here/$seq.full
[ "$ActiveState" != activating ] && return 0
fi
return 1
Expand Down
1 change: 1 addition & 0 deletions qa/admin/package-lists/Ubuntu+18.04+i686
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ iproute2
libavahi-common-dev
libclass-dbi-perl
libcmocka-dev
libncurses5-dev
libdbd-mysql-perl
libdbd-pg-perl
libdevmapper-dev
Expand Down
8 changes: 4 additions & 4 deletions qa/common.config
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ in
unset DISPLAY
fi
fi
# X11 server is on vm36 (ipaddr 192.168.178.236)
PCPQA_CLOSE_X_SERVER=${DISPLAY-192.168.178.236:0}
# currently not working on bozo (ipaddr 192.168.178.100)
PCPQA_SOCKS_SERVER=192.168.178.100
# X11 server is on vm36 (ipaddr 192.168.20.236)
PCPQA_CLOSE_X_SERVER=${DISPLAY-192.168.20.236:0}
# currently not working on bozo (ipaddr 192.168.20.100)
PCPQA_SOCKS_SERVER=192.168.20.100
;;

# add settings here for your host if the domain is
Expand Down
1 change: 1 addition & 0 deletions qa/common.filter
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ s/Performance Co-Pilot starting archive loggers .../Starting pmlogger ... /
-e '/is not a native service, redirecting to .*chkconfig/d' \
-e '/^Executing .*chkconfig pm.* --level=5/d' \
-e '/Failed to create avahi client:/d' \
-e '/pmsignal.* kill: [0-9][0-9]*: No such process/d' \
| _filter_pcp_start_distro \
| _filter_init_distro
}
Expand Down
4 changes: 2 additions & 2 deletions qa/src/ready-or-not.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ smack(void)
exit(1);
}
/* store NOTREADY-to-READY delay in msec */
smack_rp->vset[0]->vlist[0].value.lval = 5;
smack_rp->vset[0]->vlist[0].value.lval = 20;
}

if ((sts = pmStore(smack_rp)) < 0 && sts != PM_ERR_AGAIN) {
Expand All @@ -105,7 +105,7 @@ main(int argc, char **argv)
pmDesc desc;
pmResult *rp;
pmHighResResult *hrp;
struct timeval delay = { 0, 5000 };
struct timeval delay = { 0, 20000 }; /* 20msec pause */

pmSetProgname(argv[0]);

Expand Down

0 comments on commit 18f7406

Please sign in to comment.