@@ -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