passing venv_rebuild=true leaves repo server in unusable state

Bug #1914301 reported by Jonathan Rosser
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Unassigned

Bug Description

Any time venv_rebuild=true is used the wheel build directory on the repo server is emptied out. The constraints and requirements text files for the currently running role will be deleted from the repo server and this forces the wheels to be rebuilt for that, and only that role.

If the playbook calls several roles, the next role that runs will also delete the entire wheel cache contents and also the constraints/requirements files for that next role.

This means that every role run by a playbook will individually succeed when venv_rebuild=true, but at any one time the repo server wheel cache only contains the wheels needed for that role.

Subsequent playbooks run without venv_rebuild=true will find the wheel cache in an inconsistent state with the requirements/constraints files on the repo server, and the required wheels will not be built nor be available for download to the installation target. Pip will fall back to trying to build the wheels locally on the target host, and as we have done considerable cleanup of target vs. devel packages it is almost certain that the build will fail due to missing headers of some form.

The behaviour of python_venv_build when venv_build=true seems incorrect and can lead to a situation where it is not possible to run further playbooks correctly.

Changed in openstack-ansible:
status: New → Confirmed
Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :
Changed in openstack-ansible:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ansible-role-python_venv_build (stable/train)

Reviewed: https://review.opendev.org/c/openstack/ansible-role-python_venv_build/+/773973
Committed: https://opendev.org/openstack/ansible-role-python_venv_build/commit/fe05e23fcfebbc6ad960b85c78ee808549578b97
Submitter: "Zuul (22348)"
Branch: stable/train

commit fe05e23fcfebbc6ad960b85c78ee808549578b97
Author: Dmitriy Rabotyagov <email address hidden>
Date: Wed Feb 3 20:37:44 2021 +0200

    Do not drop all wheels with venv_rebuild

    Removal of venv_build_host_wheel_path leads to all wheels for all
    services being dropped which results in other role brokeness
    since we build wheels only when requirements or constraints
    file is changed. Also we technically don't need to clean it up, since
    removal of just rest of the files will lead to wheels being rebuild.

    This change should make usage venv_rebuild safe and not breaking wheels
    for all services rather then single one.

    Change-Id: I6bbe66b699ce5ab245bb9779b61b5c4625eba927
    Related-Bug: #1914301
    (cherry picked from commit 9e7877d55af8088533f623deccfa8f3b48dfc398)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ansible-role-python_venv_build (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/ansible-role-python_venv_build/+/773971
Committed: https://opendev.org/openstack/ansible-role-python_venv_build/commit/73ac14dfaa5b7df9927190b0a5e66de11d5baac5
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 73ac14dfaa5b7df9927190b0a5e66de11d5baac5
Author: Dmitriy Rabotyagov <email address hidden>
Date: Wed Feb 3 20:37:44 2021 +0200

    Do not drop all wheels with venv_rebuild

    Removal of venv_build_host_wheel_path leads to all wheels for all
    services being dropped which results in other role brokeness
    since we build wheels only when requirements or constraints
    file is changed. Also we technically don't need to clean it up, since
    removal of just rest of the files will lead to wheels being rebuild.

    This change should make usage venv_rebuild safe and not breaking wheels
    for all services rather then single one.

    Change-Id: I6bbe66b699ce5ab245bb9779b61b5c4625eba927
    Related-Bug: #1914301
    (cherry picked from commit 9e7877d55af8088533f623deccfa8f3b48dfc398)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ansible-role-python_venv_build (master)

Reviewed: https://review.opendev.org/c/openstack/ansible-role-python_venv_build/+/773984
Committed: https://opendev.org/openstack/ansible-role-python_venv_build/commit/5051b52275271f4b2c2d2a6488f7e00c938687c3
Submitter: "Zuul (22348)"
Branch: master

commit 5051b52275271f4b2c2d2a6488f7e00c938687c3
Author: Dmitriy Rabotyagov <email address hidden>
Date: Wed Feb 3 20:57:11 2021 +0200

    Split venv_rebuild functionality

    This patch aims to split functionality of ``venv_rebuild`` into 2
    separate parts - rebuilding venv and rebuilding wheels. That will give
    more control over what needs to be done.

    Change-Id: Ie14f12c6756cd1f866b660acc8fd6aa5695f6c33
    Related-Bug: #1914301

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.