From 5fd623e1c30cf73faf01c355b1f769a68794aa49 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Thu, 3 Aug 2017 12:02:31 -0500 Subject: [PATCH] Enable minimum CentOS repositories The CentOS CI images have many yum repositories enabled by default. This can cause package conflicts in gate jobs and it doesn't match what a basic CentOS system would look like for an OpenStack-Ansible deployer. This patch disables all repositories for the ansible-role-jobs and only enables base, epel, and updates. This allows individual roles to add extra repositories when they need them. Related-Bug: 1708493 Change-Id: I2ac5a9c463991e4668a3e7608831c1944377e85e --- jenkins/jobs/ansible-role-jobs.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/jenkins/jobs/ansible-role-jobs.yaml b/jenkins/jobs/ansible-role-jobs.yaml index 2f63bd114a..af886b9bdb 100644 --- a/jenkins/jobs/ansible-role-jobs.yaml +++ b/jenkins/jobs/ansible-role-jobs.yaml @@ -77,13 +77,20 @@ template-name: "{template-name}" - zuul-git-prep-upper-constraints - shell: | - # EPEL must be enabled because some deps from bindep.txt are - # otherwise not available + # NOTE(mhayden): The CentOS CI image has many repositories enabled by + # default that can cause package conflicts. We must disable all of + # them here and only enable base, updates, and epel. if [[ -e /usr/bin/yum ]] && [[ -x /usr/bin/yum-config-manager ]]; then + sudo yum-config-manager --disable \* + sudo yum-config-manager --enable base sudo yum-config-manager --enable epel + sudo yum-config-manager --enable updates fi - install-distro-packages - shell: | + # NOTE(mhayden): EPEL is no longer required after installing distro + # packages with bindep. Individual roles may re-enable EPEL if they + # need it for their package installation tasks. if [[ -e /usr/bin/yum ]] && [[ -x /usr/bin/yum-config-manager ]]; then sudo yum-config-manager --disable epel fi