testing/openstack: clean everything before testing

It happens that we have some leftovers instances running in an "error"
state (the error comes from the OpenStack scheduled deletion). This
leads to instance creation error during the test because quota limits
are hit.

Let's clean-up everything before running the new tests.

This won't impact tests from other channels as OpenStack is limited to
one CI job at a time.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Mathieu Tortuyaux 2025-02-27 09:58:25 +01:00
parent 18f9e72cf8
commit d7f8e23345
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8

View File

@ -29,6 +29,9 @@ secret_to_file config_file "${OPENSTACK_CREDS}"
openstack_keyfile='' openstack_keyfile=''
secret_to_file openstack_keyfile "${OPENSTACK_KEYFILE}" secret_to_file openstack_keyfile "${OPENSTACK_KEYFILE}"
# Make sure that everything is cleaned up before starting.
ore --config-file "${config_file}" openstack gc --duration 1s
# Upload the image on OpenStack dev instance. # Upload the image on OpenStack dev instance.
IMAGE_ID=$(ore openstack create-image \ IMAGE_ID=$(ore openstack create-image \
--name=flatcar-"${CIA_VERNUM}" \ --name=flatcar-"${CIA_VERNUM}" \