From bb0ba39e25623c34d10a2bec7832a9d54a49998f Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Mon, 27 Oct 2014 15:36:41 +0100 Subject: [PATCH] Always enable EPEL repo when installing RDO The EPEL repository is a requirement for RDO installation. This requirement was previously handled by a downstream patch on the package changing the default value of CONFIG_USE_EPEL, but this is complex to maintain. This patch overrides the specified value of CONFIG_USE_EPEL when RDO is being installed, while respecting it for other distributions. Change-Id: I393128333abacc841bf32adcf104d4635f616539 --- docs/packstack.rst | 2 +- packstack/plugins/serverprep_001.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/packstack.rst b/docs/packstack.rst index 0bedacd2a..1fa1ec9d2 100644 --- a/docs/packstack.rst +++ b/docs/packstack.rst @@ -355,7 +355,7 @@ Server Prepare Configs ---------------------- **CONFIG_USE_EPEL** - Install OpenStack from EPEL. If set to "y" EPEL will be installed on each server ['y', 'n']. + Install OpenStack from EPEL. If set to "y" EPEL will be installed on each server ['y', 'n']. When installing RDO, this option will be overriden, as EPEL is a requirement for RDO. **CONFIG_REPO** A comma separated list of URLs to any additional yum repositories to install. diff --git a/packstack/plugins/serverprep_001.py b/packstack/plugins/serverprep_001.py index 86221d6ce..8345a98a2 100644 --- a/packstack/plugins/serverprep_001.py +++ b/packstack/plugins/serverprep_001.py @@ -565,6 +565,10 @@ def manage_rdo(host, config): except exceptions.ExecuteRuntimeError: # RDO repo is not installed, so we don't need to continue return + # We are installing RDO. EPEL is a requirement, so enable it, overriding + # any configured option + config['CONFIG_USE_EPEL'] = 'y' + match = re.match(r'^(?P\w+)\-(?P\d+\.[\d\w]+)\n', out) version, release = match.group('version'), match.group('release') rdo_url = ("http://rdo.fedorapeople.org/openstack/openstack-%(version)s/" @@ -653,10 +657,10 @@ def server_prep(config, messages): 'echo "no rhos-log-collector available"' % sos_rpms) server.execute() - # enable or disable EPEL according to configuration - manage_epel(hostname, config) # enable RDO if it is installed locally manage_rdo(hostname, config) + # enable or disable EPEL according to configuration + manage_epel(hostname, config) reponame = 'rhel-server-ost-6-4-rpms' server.clear()