From e1ebeefecbdd47b53379cfdca7593d980bb4da97 Mon Sep 17 00:00:00 2001 From: Ronelle Landy Date: Wed, 28 Aug 2019 15:14:24 -0400 Subject: [PATCH] Only use RHEL8 deps repo on Red Hat systems newer than 7 https://opendev.org/zuul/zuul-jobs/commit/cecf9e902ce73b83d9329c364b2f6d2324a305db broke Openstack jobs running on Red Hat 7. This review includes the ansible_distribution_major_version when deciding which repos to include for openvswitch. Change-Id: I6ec32e2913843adb0778a63133296bb26a0b5e6e --- .../templates/zuul-multi-node-bridge-ovs.repo.j2 | 6 +++--- roles/multi-node-bridge/vars/RedHat.yaml | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/roles/multi-node-bridge/templates/zuul-multi-node-bridge-ovs.repo.j2 b/roles/multi-node-bridge/templates/zuul-multi-node-bridge-ovs.repo.j2 index 3621474bc..796111b9c 100644 --- a/roles/multi-node-bridge/templates/zuul-multi-node-bridge-ovs.repo.j2 +++ b/roles/multi-node-bridge/templates/zuul-multi-node-bridge-ovs.repo.j2 @@ -1,5 +1,5 @@ # Vendored from rdo-release: https://github.com/rdo-infra/rdo-release -{% if ansible_distribution == 'CentOS' %} +{% if ansible_distribution in ['CentOS', 'RedHat'] and ansible_distribution_major_version|int <= 7 %} [centos-openstack-queens] name=CentOS OpenStack Queens Repository {% if zuul_site_mirror_fqdn is defined %} @@ -10,10 +10,10 @@ baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-queens/ gpgcheck=1 enabled=1 gpgkey=file:///tmp/RPM-GPG-KEY-CentOS-SIG-Cloud -{% elif ansible_distribution == 'RedHat' %} +{% elif ansible_distribution == 'RedHat' and ansible_distribution_major_version|int >= 8 %} [RDO-RHEL8-deps] name=RedHat Openstack deps repo baseurl=https://trunk.rdoproject.org/rhel8-master/deps/latest/ gpgcheck=0 enabled=1 -{% endif %} \ No newline at end of file +{% endif %} diff --git a/roles/multi-node-bridge/vars/RedHat.yaml b/roles/multi-node-bridge/vars/RedHat.yaml index 1ae946d9e..6f26a79c2 100644 --- a/roles/multi-node-bridge/vars/RedHat.yaml +++ b/roles/multi-node-bridge/vars/RedHat.yaml @@ -1,3 +1,8 @@ --- -ovs_package: "rhosp-openvswitch" +ovs_package: >- + {% if ansible_distribution_major_version|int >= 8 -%} + rhosp-openvswitch + {%- else -%} + openvswitch + {%- endif %} ovs_service: "openvswitch"