From 8a8558637946d7dac1d85642baaf9ba7c1be98f8 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Apr 07 2017 16:53:15 +0000 Subject: httpinstance: avoid httpd restart during certificate request httpd is restarted by certmonger in the restart_httpd script after the httpd certificate is saved if it was previously running. The restart will fail because httpd is not properly configured at this point. Stop httpd at the beginning of httpd install to avoid the restart. https://pagure.io/freeipa/issue/6757 Reviewed-By: Martin Babinsky --- diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py index 079ea92..d7cd776 100644 --- a/ipaserver/install/httpinstance.py +++ b/ipaserver/install/httpinstance.py @@ -160,6 +160,7 @@ class HTTPInstance(service.Service): self.ca_is_configured = ca_is_configured self.promote = promote + self.step("stopping httpd", self.__stop) self.step("setting mod_nss port to 443", self.__set_mod_nss_port) self.step("setting mod_nss cipher suite", self.set_mod_nss_cipher_suite) @@ -185,15 +186,15 @@ class HTTPInstance(service.Service): self.step("create KDC proxy user", create_kdcproxy_user) self.step("create KDC proxy config", self.create_kdcproxy_conf) self.step("enable KDC proxy", self.enable_kdcproxy) - self.step("restarting httpd", self.__start) + self.step("starting httpd", self.start) self.step("configuring httpd to start on boot", self.__enable) self.step("enabling oddjobd", self.enable_and_start_oddjobd) self.start_creation() - def __start(self): + def __stop(self): self.backup_state("running", self.is_running()) - self.restart() + self.stop() def __enable(self): self.backup_state("enabled", self.is_enabled())