mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Move httpd restart to DNS installation
Web service needs restarting after bindinstance is created to pick up changes done to /etc/resolv.conf. This change should be included anytime DNS is installed therefore it makes sense to move it to the common code. https://fedorahosted.org/freeipa/ticket/6392 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
parent
87c3c1abec
commit
bde1d82ebe
@ -26,14 +26,12 @@ import sys
|
|||||||
|
|
||||||
from optparse import SUPPRESS_HELP
|
from optparse import SUPPRESS_HELP
|
||||||
|
|
||||||
from ipaserver.install import bindinstance, httpinstance
|
from ipaserver.install import bindinstance
|
||||||
from ipaserver.install import installutils
|
from ipaserver.install import installutils
|
||||||
from ipaserver.install import service
|
|
||||||
from ipapython import version
|
from ipapython import version
|
||||||
from ipalib import api
|
from ipalib import api
|
||||||
from ipaplatform.paths import paths
|
from ipaplatform.paths import paths
|
||||||
from ipapython import ipautil
|
from ipapython import ipautil
|
||||||
from ipapython import sysrestore
|
|
||||||
from ipapython.config import IPAOptionParser
|
from ipapython.config import IPAOptionParser
|
||||||
from ipapython.ipa_log_manager import standard_logging_setup, root_logger
|
from ipapython.ipa_log_manager import standard_logging_setup, root_logger
|
||||||
|
|
||||||
@ -147,13 +145,6 @@ def main():
|
|||||||
dns_installer.install_check(True, api, False, options, hostname=api.env.host)
|
dns_installer.install_check(True, api, False, options, hostname=api.env.host)
|
||||||
dns_installer.install(True, False, options)
|
dns_installer.install(True, False, options)
|
||||||
|
|
||||||
# Restart http instance to make sure that python-dns has the right resolver
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=800368
|
|
||||||
fstore = sysrestore.FileStore(paths.SYSRESTORE)
|
|
||||||
http = httpinstance.HTTPInstance(fstore)
|
|
||||||
service.print_msg("Restarting the web server")
|
|
||||||
http.restart()
|
|
||||||
|
|
||||||
# execute ipactl to refresh services status
|
# execute ipactl to refresh services status
|
||||||
ipautil.run(['ipactl', 'start', '--ignore-service-failures'],
|
ipautil.run(['ipactl', 'start', '--ignore-service-failures'],
|
||||||
raiseonerr=False)
|
raiseonerr=False)
|
||||||
|
@ -322,6 +322,8 @@ def install(standalone, replica, options, api=api):
|
|||||||
print("")
|
print("")
|
||||||
|
|
||||||
bind.create_instance()
|
bind.create_instance()
|
||||||
|
print("Restarting the web server to pick up resolv.conf changes")
|
||||||
|
services.knownservices.httpd.restart(capture_output=True)
|
||||||
|
|
||||||
# on dnssec master this must be installed last
|
# on dnssec master this must be installed last
|
||||||
dnskeysyncd = dnskeysyncinstance.DNSKeySyncInstance(fstore)
|
dnskeysyncd = dnskeysyncinstance.DNSKeySyncInstance(fstore)
|
||||||
|
@ -868,10 +868,6 @@ def install(installer):
|
|||||||
no_dnssec_validation=options.no_dnssec_validation)
|
no_dnssec_validation=options.no_dnssec_validation)
|
||||||
bind.create_file_with_system_records()
|
bind.create_file_with_system_records()
|
||||||
|
|
||||||
# Restart httpd to pick up the new IPA configuration
|
|
||||||
service.print_msg("Restarting the web server")
|
|
||||||
http.restart()
|
|
||||||
|
|
||||||
# Set the admin user kerberos password
|
# Set the admin user kerberos password
|
||||||
ds.change_admin_password(admin_password)
|
ds.change_admin_password(admin_password)
|
||||||
|
|
||||||
|
@ -943,10 +943,6 @@ def install(installer):
|
|||||||
else:
|
else:
|
||||||
api.Command.dns_update_system_records()
|
api.Command.dns_update_system_records()
|
||||||
|
|
||||||
# Restart httpd to pick up the new IPA configuration
|
|
||||||
service.print_msg("Restarting the web server")
|
|
||||||
http.restart()
|
|
||||||
|
|
||||||
# Call client install script
|
# Call client install script
|
||||||
service.print_msg("Configuring client side components")
|
service.print_msg("Configuring client side components")
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user