From d17dc136a0175ffc51560ec0bc118a1c8815c745 Mon Sep 17 00:00:00 2001 From: Odin Ugedal Date: Sun, 29 Sep 2019 11:10:08 +0200 Subject: [PATCH] Fix host reuse for e2e tests This will now filter the hosts in gcloud by project, instance name and zone, to make sure we only reuse the correct hosts. Previously it would try to reuse images outside the selected zone, resulting in a crash. The resulting command will look like this: $ gcloud compute instances list --project="my-project-123" --filter="name:'test-cos-beta-78-12499-16-0' AND zone:'europe-west6-b'" --- hack/make-rules/test-e2e-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/make-rules/test-e2e-node.sh b/hack/make-rules/test-e2e-node.sh index 620e21d017a..bec1f08d6bb 100755 --- a/hack/make-rules/test-e2e-node.sh +++ b/hack/make-rules/test-e2e-node.sh @@ -117,7 +117,7 @@ if [ "${remote}" = true ] ; then IFS=',' read -ra IM <<< "${images}" images="" for i in "${IM[@]}"; do - if gcloud compute instances list "${instance_prefix}-${i}" | grep "${i}"; then + if gcloud compute instances list --project="${project}" --filter="name:'${instance_prefix}-${i}' AND zone:'${zone}'" | grep "${i}"; then if [[ "${hosts}" != "" ]]; then hosts="${hosts}," fi