mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
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'"
This commit is contained in:
parent
29f23e6647
commit
d17dc136a0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user