dab0c7c606
Between September 4 and 5, our wheel cache publication began failing for Debian distributions. The ansible_distribution_version fact began to differentiate between Debian minor versions (so e.g. bullseye went from "11" to "11.7"), and this does not match our cache scheme in AFS so resulted in attempts to write to a nonexistent directory. This corresponds to when I9527fc847e18a80414139ebd6f19a9dbb9a5778e merged to switch the tenant's default Ansible version to 8, so is very likely a behavior change in Ansible itself. Switch the logic in our wheel-mirror playbook to use ansible_distribution_major_version like we do for Ubuntu, and rename the tasks to be a little more generic. Change-Id: Ie95e99bce1ed01aa9c284871b517e6c28c278d16
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
- hosts: all
|
|
# We don't want the python2 & python3 hosts copying to AFS at the
|
|
# same time. In some cases for generic wheels they can have
|
|
# produced a file with the same name and thus we open a window to
|
|
# corruption on AFS with multiple simultaneous writers to the same
|
|
# file.
|
|
serial: 1
|
|
|
|
pre_tasks:
|
|
- name: Generate AFS slug - Major version distros
|
|
set_fact:
|
|
afs_slug: "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}"
|
|
when: ansible_distribution == "CentOS" or
|
|
ansible_distribution == "Debian"
|
|
|
|
- name: Generate AFS slug - Major.Minor version distros
|
|
set_fact:
|
|
afs_slug: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}-{{ ansible_architecture }}"
|
|
when: ansible_distribution == "Ubuntu"
|
|
|
|
- name: Set fact for AFS dir
|
|
set_fact:
|
|
afs_dir: "/afs/.openstack.org/mirror/wheel/{{ afs_slug }}/"
|
|
|
|
- name: Set fact for wheel dir
|
|
set_fact:
|
|
wheel_dir: /opt/wheel/workspace
|
|
|
|
roles:
|
|
- create-afs-token
|
|
- copy-wheels
|
|
- destroy-afs-token
|