Fix manila-tempest-*-centos-7 jobs

There was a recent change announced on the CentOS
mailing lists [1] regarding housing centos-release-SIG
repos for CPU architectures other than x86_64. We rely on
centos-release-pike within our test jobs and the
repo centos-qemu-ev is found under [2].

There is now a YUM variable called $contentdir
which determines where the repos may be, and this
variable isn't set in the base images.

With $contentdir set, the URLs resolve correctly
within /etc/yum.repos.d/CentOS-QEMU-EV.repo.

See corresponding fixes for kolla [3] and
tripleo-quickstart-extras [4]

[1] https://lists.centos.org/pipermail/centos-devel/2018-March/016542.html
[2] http://mirror.centos.org/centos/7/virt/x86_64/kvm-common
[3] Ieb26c0aa65ba3ec1a45a33f87f670e5ecb782f82
[4] I6279bd4088bd87f37c58b7da25b675c5456506d6

Change-Id: Idcacfb6dbfb0760128f10dbc0573856e4250b3bc
Closes-Bug: #1771969
This commit is contained in:
Goutham Pacha Ravi 2018-05-18 01:23:46 -07:00
parent 712d3854c7
commit 227709ba9b
3 changed files with 78 additions and 0 deletions

View File

@ -31,6 +31,32 @@
name: centos-release-openstack-pike
state: present
- name: Check for /etc/yum/vars/contentdir
stat:
path: /etc/yum/vars/contentdir
register: yum_contentdir
- when: not yum_contentdir.stat.exists
block:
- name: Discover package architecture
command: rpm -q --qf "%{arch}" -f /etc/redhat-release
register: rpm_arch
- debug:
msg: Package architecture is '{{ rpm_arch.stdout }}'
- name: Set contentdir to altarch
set_fact:
yum_contentdir: altarch
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
- name: Populate /etc/yum/vars/contentdir
copy:
dest: /etc/yum/vars/contentdir
content: "{{ yum_contentdir|default('centos') }}"
become: true
- shell:
cmd: |
set -e

View File

@ -31,6 +31,32 @@
name: centos-release-openstack-pike
state: present
- name: Check for /etc/yum/vars/contentdir
stat:
path: /etc/yum/vars/contentdir
register: yum_contentdir
- when: not yum_contentdir.stat.exists
block:
- name: Discover package architecture
command: rpm -q --qf "%{arch}" -f /etc/redhat-release
register: rpm_arch
- debug:
msg: Package architecture is '{{ rpm_arch.stdout }}'
- name: Set contentdir to altarch
set_fact:
yum_contentdir: altarch
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
- name: Populate /etc/yum/vars/contentdir
copy:
dest: /etc/yum/vars/contentdir
content: "{{ yum_contentdir|default('centos') }}"
become: true
- shell:
cmd: |
set -e

View File

@ -46,6 +46,32 @@
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- name: Check for /etc/yum/vars/contentdir
stat:
path: /etc/yum/vars/contentdir
register: yum_contentdir
- when: not yum_contentdir.stat.exists
block:
- name: Discover package architecture
command: rpm -q --qf "%{arch}" -f /etc/redhat-release
register: rpm_arch
- debug:
msg: Package architecture is '{{ rpm_arch.stdout }}'
- name: Set contentdir to altarch
set_fact:
yum_contentdir: altarch
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
- name: Populate /etc/yum/vars/contentdir
copy:
dest: /etc/yum/vars/contentdir
content: "{{ yum_contentdir|default('centos') }}"
become: true
- shell:
cmd: |
set -e