From 22fd6f020940b5b2a1258f8e0e6058c95f7a1ba5 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Sep 14 2016 12:57:07 +0000 Subject: Start named during configuration upgrade. Some upgrade steps require bind running, to be succesfull. Upgrader makes sure that bind starts. https://fedorahosted.org/freeipa/ticket/6205 Reviewed-By: Martin Babinsky --- diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py index aec84dc..19ea8ca 100644 --- a/ipaserver/install/server/upgrade.py +++ b/ipaserver/install/server/upgrade.py @@ -1706,6 +1706,15 @@ def upgrade_configuration(): cleanup_kdc(fstore) cleanup_adtrust(fstore) setup_firefox_extension(fstore) + + bind = bindinstance.BindInstance(fstore) + if bind.is_configured() and not bind.is_running(): + # some upgrade steps may require bind running + bind_started = True + bind.start() + else: + bind_started = False + add_ca_dns_records() # Any of the following functions returns True iff the named.conf file @@ -1737,6 +1746,9 @@ def upgrade_configuration(): except ipautil.CalledProcessError as e: root_logger.error("Failed to restart %s: %s", bind.service_name, e) + if bind_started: + bind.stop() + custodia = custodiainstance.CustodiaInstance(api.env.host, api.env.realm) custodia.upgrade_instance()