[openstack-ansible-ops] cleanup-venv playbook removes wsgi venv
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-
But, what I have not seen until I had to restart a service, it had removed /openstack/
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.
Changed in openstack-ansible: | |
status: | New → Confirmed |
assignee: | nobody → Adrien Cunin (adri2000) |
status: | Confirmed → In Progress |
Changed in openstack-ansible: | |
status: | Fix Committed → Fix Released |
Fixed with https:/ /review. opendev. org/c/openstack /openstack- ansible- ops/+/782756