Fix up some inaccuracies in perfload comments and logs

The review of the addition of nested perfload (in
I617161fde5b844d7f52dc766f85c1b9f1b139e4a ) identified some
inaccuracies in the comments and logs. This fixes some of
those.

It does not, however, fix some of the duplication between the
two runner scripts. This will be done later.

Change-Id: I9c57125e818cc583a977c8155fcefcac2e3b59df
This commit is contained in:
Chris Dent 2019-07-01 12:53:09 +01:00 committed by Eric Fried
parent ceae90feac
commit ed0af2e4aa
3 changed files with 12 additions and 10 deletions

View File

@ -2,8 +2,8 @@
#
# This should be updated to represent something closer to a real
# and expected nested topology. If changes are made here that impact
# the number of total resource providers, then $COUNT in
# playbooks/nested-perfload.yaml should be updated.
# the number of total resource providers, then $PROVIDER_TOPOLOGY_COUNT
# in gate/perfload-nested-runner.sh should be updated.
defaults:
request_headers:

View File

@ -22,8 +22,8 @@ ITERATIONS=1000
ALLOCATIONS_TO_WRITE=10
# The number of providers in each nested tree. This will need to
# need to change whenever the resource provider topology created in
# $GABBIT is changed.
# change whenever the resource provider topology created in $GABBIT
# is changed.
PROVIDER_TOPOLOGY_COUNT=3
# Expected total number of providers, used to check that creation
# was a success.
@ -64,7 +64,7 @@ function check_placement {
python -m virtualenv -p python3 .perfload
. .perfload/bin/activate
# install placeload
# install gabbi
pip install gabbi
# Create $TOTAL_PROVIDER_COUNT nested resource provider trees,
@ -76,13 +76,14 @@ function check_placement {
set +x
rp_count=$(curl -H 'x-auth-token: admin' ${PLACEMENT_URL}/resource_providers |json_pp|grep -c '"name"')
# Skip curl and note if we failed to create the required number of rps
# If we failed to create the required number of rps, skip measurements and
# log a message.
if [[ $rp_count -ge $TOTAL_PROVIDER_COUNT ]]; then
load_candidates
else
(
echo "Unable to create expected number of resource providers. Expected: ${COUNT}, Got: $rp_count"
echo "See job-output.txt.gz and logs/screen-placement-api.txt.gz for additional detail."
echo "See job-output.txt.gz and logs/placement-api.log for additional detail."
) | tee -a $LOG
code=1
fi

View File

@ -14,7 +14,7 @@ traits on that resource provider.
If there are upper case versions of any of those letters, a failure
happened for a single request. The letter will be followed by the
HTTP status code and the resource provider uuid. These can be used
to find the relevant entry in logs/screen-placement-api.txt.gz.
to find the relevant entry in logs/placement-api.log.
Note that placeload does not exit with an error code when this
happens. It merely reports and moves on. Under correct circumstances
@ -91,13 +91,14 @@ function check_placement {
time placeload $PLACEMENT_URL $COUNT
) 2>&1 | tee -a $LOG
rp_count=$(curl -H 'x-auth-token: admin' ${PLACEMENT_URL}/resource_providers |json_pp|grep -c '"name"')
# Skip curl and note if we failed to create the required number of rps
# If we failed to create the required number of rps, skip measurements and
# log a message.
if [[ $rp_count -ge $COUNT ]]; then
load_candidates
else
(
echo "Unable to create expected number of resource providers. Expected: ${COUNT}, Got: $rp_count"
echo "See job-output.txt.gz and logs/screen-placement-api.txt.gz for additional detail."
echo "See job-output.txt.gz and logs/placement-api.log for additional detail."
) | tee -a $LOG
code=1
fi