From c3139a1dadf879b2fae70c315dcf3d9e8b886b32 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 27 Jan 2016 11:51:23 +1100 Subject: [PATCH] Don't exclude python-setuptools The centos-minimal dib build is failing as it tries to cache some packages that have dependencies on python-setuptools. Since I556b2cec249ef46e09ffca3cd75521e0beeb7779 we have been installing a yum.conf that has an "excludes" for this package. We have not noticed this on the existing dib builds because they have python-setuptools already installed in the base-image as part of the cloud-init install. So this satisfies the dependency; however on the minimal builds the package is not there, and the exclude means the packages dependencies that can not be satisfied and the build stops. The original code has since been removed. I think the problem of some parts of the packaged setuptools conflicting was probably due to the large version delta between whatever was in CentOS6 to a current pip install. Clearly the issue doesn't exist with pip installing over the Centos7 version (because it's working now), but for an abundance of caution let's pre-install the packaged version, clear it out, then install from pip. Change-Id: I35408717dc340271dea3d857bc19ea1590e84361 --- install_puppet.sh | 17 ++++++++++++ modules/openstack_project/files/yum.conf | 27 ------------------- .../openstack_project/manifests/template.pp | 8 ------ 3 files changed, 17 insertions(+), 35 deletions(-) delete mode 100644 modules/openstack_project/files/yum.conf diff --git a/install_puppet.sh b/install_puppet.sh index 4510cfa048..e210c018e1 100755 --- a/install_puppet.sh +++ b/install_puppet.sh @@ -216,6 +216,23 @@ function setup_pip { python get-pip.py -c <(echo 'pip<8') rm get-pip.py + + # we are about to overwrite setuptools, but some packages we + # install later might depend on the python-setuptools package. To + # avoid later conflicts, and because distro packages don't include + # enough info for pip to certain it can fully uninstall the old + # package, for saftey we clear it out by hand (this seems to have + # been a problem with very old to new updates, e.g. centos6 to + # current-era, but less so for smaller jumps). There is a bit of + # chicken-and-egg problem with pip in that it requires setuptools + # for some operations, such as wheel creation. But just + # installing setuptools shouldn't require setuptools itself, so we + # are safe for this small section. + if is_rhel7 || is_fedora; then + yum install -y python-setuptools + rm -rf /usr/lib/python2.7/site-packages/setuptools* + fi + pip install -U setuptools } diff --git a/modules/openstack_project/files/yum.conf b/modules/openstack_project/files/yum.conf deleted file mode 100644 index 822efdd65c..0000000000 --- a/modules/openstack_project/files/yum.conf +++ /dev/null @@ -1,27 +0,0 @@ -[main] -cachedir=/var/cache/yum/$basearch/$releasever -keepcache=0 -debuglevel=2 -logfile=/var/log/yum.log -exactarch=1 -obsoletes=1 -gpgcheck=1 -plugins=1 -installonly_limit=5 -bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum -distroverpkg=centos-release -exclude=python-setuptools - -# This is the default, if you make this bigger yum won't see if the metadata -# is newer on the remote and so you'll "gain" the bandwidth of not having to -# download the new metadata and "pay" for it by yum not having correct -# information. -# It is esp. important, to have correct metadata, for distributions like -# Fedora which don't keep old packages around. If you don't like this checking -# interupting your command line usage, it's much better to have something -# manually check the metadata once an hour (yum-updatesd will do this). -# metadata_expire=90m - -# PUT YOUR REPOS HERE OR IN separate files named file.repo -# in /etc/yum.repos.d - diff --git a/modules/openstack_project/manifests/template.pp b/modules/openstack_project/manifests/template.pp index bba0f5f1a9..dc12d04da9 100644 --- a/modules/openstack_project/manifests/template.pp +++ b/modules/openstack_project/manifests/template.pp @@ -420,14 +420,6 @@ class openstack_project::template ( replace => true, } - file { '/etc/yum.conf': - ensure => present, - owner => 'root', - group => 'root', - mode => '0444', - source => 'puppet:///modules/openstack_project/yum.conf', - replace => true, - } } $puppet_version = $pin_puppet