stale tempest config remains in the workspace after re-running os_tempest role

Bug #1763336 reported by Jonathan Rosser
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
High
Shannon Mitchell

Bug Description

The tempest config file gets templated to here:

/root/.tempest/etc/tempest.conf

At some point it is copied to the tempest workspace, possibly here:

https://github.com/openstack/openstack-ansible-os_tempest/blob/540a6be329d78df6a195bf1749364c6f514cefe9/tasks/tempest_post_install.yml#L56

The resulting file ends up here:

/openstack/venvs/tempest-17.0.2/workspace/etc/tempest.conf

Making modifications to the tempest config vars can change the contents of the config file, but leaves a stale copy in the workspace and a subsequent tempest run uses the stale rather than new config.

A workaround is to login to the utility container and delete the workspace, prior to running the tempest playbook.

Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

Please also see our bug triage conversation on how to fix it.

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → High
Changed in openstack-ansible:
assignee: nobody → Shannon Mitchell (shannon-mitchell)
Revision history for this message
Shannon Mitchell (shannon-mitchell) wrote :

It looks like on the older versions the tempest init call pulls the updated config from /root/.tempest/etc/tempest.conf and places it in a workspace in the venv. Newer versions just use /etc/tempest/tempest.conf as the source. This only happens on the first init, any changes to the tempest.conf in /root or /etc are NOT placed in the workspace on future inits. I'm looking into moving both the path and the name so old workspaces are retained and a new one generated on a config change.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/638014

Changed in openstack-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_tempest (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/638030

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_tempest (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/638032

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_tempest (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/638036

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_tempest (master)

Reviewed: https://review.openstack.org/638014
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_tempest/commit/?id=cd23f62b01408a0389440b77dacdf954d54be0df
Submitter: Zuul
Branch: master

commit cd23f62b01408a0389440b77dacdf954d54be0df
Author: Shannon Mitchell <email address hidden>
Date: Tue Feb 19 15:19:13 2019 -0600

    Update workspace tempest.conf on changes

    When updating variables that would result in a modified
    tempest.conf, the /root/.tempest/etc/tempest.conf or
    /etc/tempest.conf would get updated properly. A tempest
    init happens after and does not copy those into an
    existing workspace. This change allows backup workspaces
    to be kept on each modification to keep from loosing any
    existing workspaces.

    Change-Id: Id2de9cbd0f06b73dead5298afb857df2700bab60
    Closes-Bug: #1763336

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_tempest (stable/rocky)

Reviewed: https://review.openstack.org/638030
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_tempest/commit/?id=f5bc5f6c9f006d5b7fe3221e180c511e7e3a21ce
Submitter: Zuul
Branch: stable/rocky

commit f5bc5f6c9f006d5b7fe3221e180c511e7e3a21ce
Author: Shannon Mitchell <email address hidden>
Date: Tue Feb 19 15:19:13 2019 -0600

    Update workspace tempest.conf on changes

    When updating variables that would result in a modified
    tempest.conf, the /root/.tempest/etc/tempest.conf or
    /etc/tempest.conf would get updated properly. A tempest
    init happens after and does not copy those into an
    existing workspace. This change allows backup workspaces
    to be kept on each modification to keep from loosing any
    existing workspaces.

    Change-Id: Id2de9cbd0f06b73dead5298afb857df2700bab60
    Closes-Bug: #1763336
    (cherry picked from commit 7654719383ad8a88db52e37564a8b9f9eaaca939)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible-os_tempest (stable/queens)

Change abandoned by Jonathan Rosser (<email address hidden>) on branch: stable/queens
Review: https://review.opendev.org/638032
Reason: queens is now extended-maintainance

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest rocky-eol

This issue was fixed in the openstack/openstack-ansible-os_tempest rocky-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest stein-eol

This issue was fixed in the openstack/openstack-ansible-os_tempest stein-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest train-eol

This issue was fixed in the openstack/openstack-ansible-os_tempest train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest ussuri-eol

This issue was fixed in the openstack/openstack-ansible-os_tempest ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest yoga-eom

This issue was fixed in the openstack/openstack-ansible-os_tempest yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest victoria-eom

This issue was fixed in the openstack/openstack-ansible-os_tempest victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest wallaby-eom

This issue was fixed in the openstack/openstack-ansible-os_tempest wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest xena-eom

This issue was fixed in the openstack/openstack-ansible-os_tempest xena-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.