[openstack-ansible-ops] cleanup-venv playbook removes wsgi venv

Bug #1910223 reported by Gilles Mocellin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Adrien Cunin

Bug Description

After upgrading from rocky to ussuri, via all intermediates with openstack-ansible, I wanted to clean all the old venvs in /openstack/venvs in every server/container.

I use this playbook from the openstack-asnsible-ops project : cleanup-venvs.yml.

But, what I have not seen until I had to restart a service, it had removed /openstack/venvs/uwsgi-21.1.0-python3.

The task that must be adapted :

- name: Remove older venvs
  hosts: all
  tasks:
  - name: List venvs directories
    find:
      paths: /openstack/venvs
      file_type: directory
      patterns: '.*(?<!{{ venv_tag }})$'
      use_regex: yes
    register: result
  - name: Delete older directories
    file:
      path: "{{ item.path }}"
      state: absent
    with_items: "{{ result.files }}"

The file pattern does not match the wsgi venv because it doesn't ends with the version, but with -python3.

Adrien Cunin (adri2000)
Changed in openstack-ansible:
status: New → Confirmed
assignee: nobody → Adrien Cunin (adri2000)
status: Confirmed → In Progress
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Oh, sorry, posted previous comment too early.

Posted patch for covering your exact issue https://review.opendev.org/c/openstack/openstack-ansible-ops/+/782907

Changed in openstack-ansible:
status: In Progress → Fix Committed
Changed in openstack-ansible:
status: Fix Committed → Fix Released
Revision history for this message
keerthivasan (keerthivassan86) wrote :

Can i try upgrade two version together ? Ex: From Train to Victoria version directly instead of going step by step upgrade

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

While it's not officially supported, I've upgraded several of my environments from T to V without serious issues.
The things you should look after is wrong record for rabbitmq which involves localhost in /etc/hosts inside rabbitmq container after setup-hosts.yml is ran, and possible issues with cinder db migrate that should be solved manually by setting cluster (or volume type) name iirc for volumes that were deleted before this row has been introduced in cinder (if you deployed on R or before that).

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.