From ed0af2e4aa8352bfe79a5f3fe8ce26b06881fedb Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Mon, 1 Jul 2019 12:53:09 +0100 Subject: [PATCH] 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 --- gate/gabbits/nested-perfload.yaml | 4 ++-- gate/perfload-nested-runner.sh | 11 ++++++----- gate/perfload-runner.sh | 7 ++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gate/gabbits/nested-perfload.yaml b/gate/gabbits/nested-perfload.yaml index 5e79bc75a..fee44fb77 100644 --- a/gate/gabbits/nested-perfload.yaml +++ b/gate/gabbits/nested-perfload.yaml @@ -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: diff --git a/gate/perfload-nested-runner.sh b/gate/perfload-nested-runner.sh index c040b043a..1771bc058 100755 --- a/gate/perfload-nested-runner.sh +++ b/gate/perfload-nested-runner.sh @@ -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 diff --git a/gate/perfload-runner.sh b/gate/perfload-runner.sh index 2a7b1a77b..c39565047 100755 --- a/gate/perfload-runner.sh +++ b/gate/perfload-runner.sh @@ -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