Skip to content

Commit 8c2b4c6

Browse files
committed
Create 2 dummy temporary flavors
discover-tempest-config needs 2 flavors it can't run without. When ran without "--create" param, it can't create the flavors itself and fails. Let's create 2 flavors and delete them afterwards to leave the system intact.
1 parent c030097 commit 8c2b4c6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

container-images/tcib/base/os/tempest/run_tempest.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,14 @@ function run_git_tempest {
331331

332332
# We're running cleanup only under certain circumstances
333333
if [[ ${TEMPEST_CLEANUP} == true ]]; then
334+
# discover-tempest-config needs 2 flavors it can't run without. When ran without "--create"
335+
# param, it can't create the flavors itself and fails.
336+
# Let's create 2 flavors and delete them afterwards to leave the system intact.
337+
openstack flavor create --ram 128 --disk 1 --ephemeral 0 --vcpus 1 tempestconf_small
338+
openstack flavor create --ram 192 --disk 1 --ephemeral 0 --vcpus 1 tempestconf_medium
334339
# generate a simple tempest.conf so that we can run --init-saved-state
335340
discover-tempest-config
341+
openstack flavor delete tempestconf_small tempestconf_medium
336342
# let's remove the images that discover-tempest-config creates by default
337343
# so that the're not part of the saved_state.json and can be deleted
338344
# by tempest cleanup later
@@ -371,8 +377,14 @@ function run_rpm_tempest {
371377

372378
# We're running cleanup only under certain circumstances
373379
if [[ ${TEMPEST_CLEANUP} == true ]]; then
380+
# discover-tempest-config needs 2 flavors it can't run without. When ran without "--create"
381+
# param, it can't create the flavors itself and fails.
382+
# Let's create 2 flavors and delete them afterwards to leave the system intact.
383+
openstack flavor create --ram 128 --disk 1 --ephemeral 0 --vcpus 1 tempestconf_small
384+
openstack flavor create --ram 192 --disk 1 --ephemeral 0 --vcpus 1 tempestconf_medium
374385
# generate a simple tempest.conf so that we can run --init-saved-state
375386
discover-tempest-config
387+
openstack flavor delete tempestconf_small tempestconf_medium
376388
# let's remove the images that discover-tempest-config creates by default
377389
# so that the're not part of the saved_state.json and can be deleted
378390
# by tempest cleanup later

0 commit comments

Comments
 (0)