Fix tempest init logic
The tempest init was checking if the workspace/etc directory exists, and were creating a new workspace without pass a name, the default is workspace, but passing a --name ensure it won't break if tempest decides to change it. Also, the rename command only change the name in the $HOME/.tempest/workspace.yml, it doesn't change the path for the particular workspace. The same happens with the move command, it just update the path on the workspace.yml file. With this patch, the tempest workspace is being moved properly to a workspace_$CURDATE, all the files are copied to the new workspace, delete the old workspace directory, and call tempest init properly. Also adding tripleo upgrade job as nv for now, since this issue only happen in upgrade jobs. Change-Id: I8a3b79352819f5e980eaea7482cd6b1f1bfc47be Closes-Bug: #1896126
This commit is contained in:
parent
5a46aff857
commit
278ef6f829
|
@ -97,15 +97,19 @@
|
||||||
# breakage when we are upgrade from rocky to stein as the workspace
|
# breakage when we are upgrade from rocky to stein as the workspace
|
||||||
# path has been change between these two releases
|
# path has been change between these two releases
|
||||||
if tempest workspace list | grep ' workspace '; then
|
if tempest workspace list | grep ' workspace '; then
|
||||||
if ! tempest workspace list | grep ' workspace ' | grep -w {{ tempest_workspace }}; then
|
# Init not working on existing entry. Renme old workspace instead and init new.
|
||||||
# Init not working on existing entry. Renme old workspace instead and init new.
|
export CURDATE=$(date +"%d%^b%g_%H%M%S%Z")
|
||||||
export CURDATE=$(date +"%d%^b%g_%H%M%S%Z")
|
WSPATH=$(dirname $(tempest workspace list | awk '{if($2 == "workspace"){print $4}}'))
|
||||||
tempest workspace rename --old-name workspace --new-name workspace_${CURDATE}
|
|
||||||
tempest init {{ tempest_workspace }}
|
tempest workspace rename --old-name workspace --new-name workspace_${CURDATE}
|
||||||
fi
|
|
||||||
|
mv ${WSPATH}/workspace ${WSPATH}/workspace_${CURDATE}
|
||||||
|
tempest workspace move --name workspace_${CURDATE} --path ${WSPATH}/workspace_${CURDATE}/
|
||||||
|
tempest init ${CURWORKSPACE}
|
||||||
|
else
|
||||||
|
tempest init --name workspace {{ tempest_workspace }}
|
||||||
|
exit 3
|
||||||
fi
|
fi
|
||||||
tempest init {{ tempest_workspace }}
|
|
||||||
exit 3
|
|
||||||
fi
|
fi
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
tox_environment:
|
tox_environment:
|
||||||
PYTEST_REQPASS: 1
|
PYTEST_REQPASS: 1
|
||||||
- tripleo-ci-centos-8-standalone
|
- tripleo-ci-centos-8-standalone
|
||||||
|
- tripleo-ci-centos-8-standalone-upgrade:
|
||||||
|
voting: false
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-deploy-aio_distro_metal_tempestconf-centos-8
|
- openstack-ansible-deploy-aio_distro_metal_tempestconf-centos-8
|
||||||
|
|
Loading…
Reference in New Issue