|
|
ac7d03 |
From 19738b56604f50e3806b220e74ac4a5ab52f71a4 Mon Sep 17 00:00:00 2001
|
|
|
ac7d03 |
From: Jan Cholasta <jcholast@redhat.com>
|
|
|
ac7d03 |
Date: Fri, 7 Apr 2017 07:40:41 +0200
|
|
|
ac7d03 |
Subject: [PATCH] httpinstance: avoid httpd restart during certificate request
|
|
|
ac7d03 |
|
|
|
ac7d03 |
httpd is restarted by certmonger in the restart_httpd script after the
|
|
|
ac7d03 |
httpd certificate is saved if it was previously running. The restart will
|
|
|
ac7d03 |
fail because httpd is not properly configured at this point.
|
|
|
ac7d03 |
|
|
|
ac7d03 |
Stop httpd at the beginning of httpd install to avoid the restart.
|
|
|
ac7d03 |
|
|
|
ac7d03 |
https://pagure.io/freeipa/issue/6757
|
|
|
ac7d03 |
|
|
|
ac7d03 |
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
|
|
|
ac7d03 |
---
|
|
|
ac7d03 |
ipaserver/install/httpinstance.py | 7 ++++---
|
|
|
ac7d03 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
ac7d03 |
|
|
|
ac7d03 |
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
|
|
|
ac7d03 |
index 079ea92606cc53f98beca1759a7e24db64bfd3f4..d7cd776ab9831b5408797ae41b7c7fbb10707b18 100644
|
|
|
ac7d03 |
--- a/ipaserver/install/httpinstance.py
|
|
|
ac7d03 |
+++ b/ipaserver/install/httpinstance.py
|
|
|
ac7d03 |
@@ -160,6 +160,7 @@ class HTTPInstance(service.Service):
|
|
|
ac7d03 |
self.ca_is_configured = ca_is_configured
|
|
|
ac7d03 |
self.promote = promote
|
|
|
ac7d03 |
|
|
|
ac7d03 |
+ self.step("stopping httpd", self.__stop)
|
|
|
ac7d03 |
self.step("setting mod_nss port to 443", self.__set_mod_nss_port)
|
|
|
ac7d03 |
self.step("setting mod_nss cipher suite",
|
|
|
ac7d03 |
self.set_mod_nss_cipher_suite)
|
|
|
ac7d03 |
@@ -185,15 +186,15 @@ class HTTPInstance(service.Service):
|
|
|
ac7d03 |
self.step("create KDC proxy user", create_kdcproxy_user)
|
|
|
ac7d03 |
self.step("create KDC proxy config", self.create_kdcproxy_conf)
|
|
|
ac7d03 |
self.step("enable KDC proxy", self.enable_kdcproxy)
|
|
|
ac7d03 |
- self.step("restarting httpd", self.__start)
|
|
|
ac7d03 |
+ self.step("starting httpd", self.start)
|
|
|
ac7d03 |
self.step("configuring httpd to start on boot", self.__enable)
|
|
|
ac7d03 |
self.step("enabling oddjobd", self.enable_and_start_oddjobd)
|
|
|
ac7d03 |
|
|
|
ac7d03 |
self.start_creation()
|
|
|
ac7d03 |
|
|
|
ac7d03 |
- def __start(self):
|
|
|
ac7d03 |
+ def __stop(self):
|
|
|
ac7d03 |
self.backup_state("running", self.is_running())
|
|
|
ac7d03 |
- self.restart()
|
|
|
ac7d03 |
+ self.stop()
|
|
|
ac7d03 |
|
|
|
ac7d03 |
def __enable(self):
|
|
|
ac7d03 |
self.backup_state("enabled", self.is_enabled())
|
|
|
ac7d03 |
--
|
|
|
ac7d03 |
2.9.3
|
|
|
ac7d03 |
|