From 586fee293f42388510fa5436af19460bbe1fdec5 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Wed, 16 Mar 2016 09:04:42 +0100 Subject: Configure httpd service from installer instead of directly from RPM File httpd.service was created by RPM, what causes that httpd service may fail due IPA specific configuration even if IPA wasn't installed or was uninstalled (without erasing RPMs). With this patch httpd service is configured by httpd.d/ipa.conf during IPA installation and this config is removed by uninstaller, so no residual http configuration related to IPA should stay there. https://fedorahosted.org/freeipa/ticket/5681 Reviewed-By: Stanislav Laznicka --- ipaserver/install/httpinstance.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ipaserver/install/httpinstance.py') diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py index b0fbe6926..00f890175 100644 --- a/ipaserver/install/httpinstance.py +++ b/ipaserver/install/httpinstance.py @@ -225,6 +225,8 @@ class HTTPInstance(service.Service): [paths.KDESTROY, '-A'], runas=HTTPD_USER, raiseonerr=False, env={}) def __configure_http(self): + self.update_httpd_service_ipa_conf() + target_fname = paths.HTTPD_IPA_CONF http_txt = ipautil.template_file(ipautil.SHARE_DIR + "ipa.conf", self.sub_dict) self.fstore.backup_file(paths.HTTPD_IPA_CONF) @@ -479,6 +481,9 @@ class HTTPInstance(service.Service): except Exception as e: root_logger.critical("Unable to start oddjobd: {0}".format(str(e))) + def update_httpd_service_ipa_conf(self): + tasks.configure_httpd_service_ipa_conf() + def uninstall(self): if self.is_configured(): self.print_msg("Unconfiguring web server") @@ -533,6 +538,7 @@ class HTTPInstance(service.Service): installutils.remove_file(paths.HTTPD_IPA_PKI_PROXY_CONF) installutils.remove_file(paths.HTTPD_IPA_KDCPROXY_CONF_SYMLINK) installutils.remove_file(paths.HTTPD_IPA_KDCPROXY_CONF) + tasks.remove_httpd_service_ipa_conf() # Restore SELinux boolean states boolean_states = {name: self.restore_state(name) -- cgit