diff --git a/README.md b/README.md index 56b2e41ef..d3307397b 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,6 @@ Then edit `ans.txt` as appropriate e.g. - Edit the IP address to anywhere you want to install a piece of OpenStack on another server - Edit the 3 network interfaces to whatever makes sense in your setup -you'll need to use a icehouse repository for example for RHEL - - $ CONFIG_REPO=http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/ - $ packstack --answer-file=ans.txt ### Option 3 (prompts for configuration options) diff --git a/docs/packstack.rst b/docs/packstack.rst index 7b479b735..0acff915c 100755 --- a/docs/packstack.rst +++ b/docs/packstack.rst @@ -184,9 +184,6 @@ Global unsupported options Server Prepare Configs ----------------------- -**CONFIG_USE_EPEL** - Specify 'y' to enable the EPEL repository (Extra Packages for Enterprise Linux). ['y', 'n'] - **CONFIG_REPO** Comma-separated list of URLs for any additional yum repositories, to use for installation. diff --git a/packstack/plugins/prescript_000.py b/packstack/plugins/prescript_000.py index ee56879de..294cd73f4 100755 --- a/packstack/plugins/prescript_000.py +++ b/packstack/plugins/prescript_000.py @@ -579,18 +579,6 @@ def initConfig(controller): ], "SERVERPREPARE": [ - {"CMD_OPTION": "use-epel", - "PROMPT": "To subscribe each server to EPEL enter \"y\"", - "OPTION_LIST": ["y", "n"], - "VALIDATORS": [validators.validate_options], - "DEFAULT_VALUE": "n", - "MASK_INPUT": False, - "LOOSE_VALIDATION": True, - "CONF_NAME": "CONFIG_USE_EPEL", - "USE_DEFAULT": False, - "NEED_CONFIRM": False, - "CONDITION": False}, - {"CMD_OPTION": "additional-repo", "PROMPT": ("Enter a comma separated list of URLs to any " "additional yum repositories to install"), @@ -1134,70 +1122,6 @@ def run_rhsm_reg(host, username, password, optional=False, proxy_server=None, server.execute(mask_list=[password]) -def manage_epel(host, config): - """ - Installs and/or enables EPEL repo if it is required or disables it if it - is not required. - """ - relevant = ('redhat', 'centos', 'scientific') - if detect_os_and_version(host)[0].lower() not in relevant: - return - - # yum's $releasever can be non numeric on RHEL, so interpolate here - releasever = detect_os_and_version(host)[1].split('.')[0] - mirrors = ('https://mirrors.fedoraproject.org/metalink?repo=epel-%s&' - 'arch=$basearch' % releasever) - server = utils.ScriptRunner(host) - if config['CONFIG_USE_EPEL'] == 'y': - server.append('REPOFILE=$(mktemp)') - server.append('cat /etc/yum.conf > $REPOFILE') - server.append("echo -e '[packstack-epel]\nname=packstack-epel\n" - "enabled=1\nmirrorlist=%(mirrors)s' >> $REPOFILE" - % locals()) - server.append('( rpm -q --whatprovides epel-release ||' - ' yum install -y --nogpg -c $REPOFILE epel-release ) ' - '|| true') - server.append('rm -rf $REPOFILE') - try: - server.execute() - except exceptions.ScriptRuntimeError as ex: - msg = 'Failed to set EPEL repo on host %s:\n%s' % (host, ex) - raise exceptions.ScriptRuntimeError(msg) - - # if there's an epel repo explicitly enables or disables it - # according to: CONFIG_USE_EPEL - if config['CONFIG_USE_EPEL'] == 'y': - cmd = 'enable' - enabled = '(1|True)' - else: - cmd = 'disable' - enabled = '(0|False)' - - server.clear() - server.append('rpm -q yum-utils || yum -y install yum-utils') - server.append('yum-config-manager --%(cmd)s epel' % locals()) - rc, out = server.execute() - - # yum-config-manager returns 0 always, but returns current setup - # if succeeds - match = re.search('enabled\s*\=\s*%(enabled)s' % locals(), out) - if match: - return - msg = 'Failed to set EPEL repo on host %s:\n' - if cmd == 'enable': - # fail in case user wants to have EPEL enabled - msg += ('RPM file seems to be installed, but appropriate repo file is ' - 'probably missing in /etc/yum.repos.d/') - raise exceptions.ScriptRuntimeError(msg % host) - else: - # just warn in case disabling failed which might happen when EPEL repo - # is not installed at all - msg += 'This is OK in case you don\'t want EPEL installed and enabled.' - # TO-DO: fill logger name when logging will be refactored. - logger = logging.getLogger() - logger.warning(msg % host) - - def manage_centos_release_openstack(host, config): """ Installs and enables CentOS OpenStack release package if installed locally. @@ -1456,8 +1380,6 @@ def server_prep(config, messages): manage_centos_release_openstack(hostname, config) # enable RDO if it is installed locally manage_rdo(hostname, config) - # enable or disable EPEL according to configuration - manage_epel(hostname, config) # Add yum repositories if configured CONFIG_REPO = config["CONFIG_REPO"].strip() diff --git a/releasenotes/notes/remove-epel-support-3732f53a2e45d64c.yaml b/releasenotes/notes/remove-epel-support-3732f53a2e45d64c.yaml new file mode 100644 index 000000000..16da66bcb --- /dev/null +++ b/releasenotes/notes/remove-epel-support-3732f53a2e45d64c.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - Support to enable the EPEL repository has been removed. + It is known to cause conflicts with packages provided + with RDO, and it is no longer needed. diff --git a/tests/installer/test_run_setup.py b/tests/installer/test_run_setup.py index 7f4efff3f..3e6ae7712 100644 --- a/tests/installer/test_run_setup.py +++ b/tests/installer/test_run_setup.py @@ -102,7 +102,7 @@ class CommandLineTestCase(PackstackTestCaseMixin, TestCase): sys.argv = ['packstack', '--debug', '--ssh-public-key=%s' % dummy_public_key, '--install-hosts=127.0.0.1', '--os-swift-install=y', - '--nagios-install=y', '--use-epel=y', '--ssl-cacert-selfsign=y', + '--nagios-install=y', '--ssl-cacert-selfsign=y', '--ssl-cert-dir=%s' % os.path.expanduser('~/')] # There is no puppet logfile to validate, so replace diff --git a/tests/test_plugin_prescript.py b/tests/test_plugin_prescript.py index e9c374d25..ffd08a4a1 100644 --- a/tests/test_plugin_prescript.py +++ b/tests/test_plugin_prescript.py @@ -32,7 +32,6 @@ class OSPluginUtilsTestCase(PackstackTestCaseMixin, TestCase): password = "dasd|'asda%>