From 2d011b97c8a56d9eabae2ca3d88c30314e0adb58 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 cc0af2b..d1197d4 100644 --- a/ipaserver/install/server/upgrade.py +++ b/ipaserver/install/server/upgrade.py @@ -1653,6 +1653,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 @@ -1682,6 +1691,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()