From b84a175ad6a8c2b25d6db388fa88e6441d97ae94 Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Tue, 6 Dec 2016 12:13:34 +0100 Subject: [PATCH] bindinstance: use data in named.conf to determine configuration status Instead of checking sysrestore status which leads to incorrect evaluation of DNS configuration status during 4.2 -> 4.4 upgrade, look into named.conf to see whther it was already modified by IPA installer. https://fedorahosted.org/freeipa/ticket/6503 Reviewed-By: Martin Basti --- ipaserver/install/bindinstance.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index 7538e145cbe37dfc21963d97dea0e835e3bd5072..a65b065fd654655ff034e277eb7e0ad49e4a418e 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -1170,6 +1170,13 @@ class BindInstance(service.Service): self.api.Command.dnsconfig_show.output_for_cli(textui, result, None, reverse=False) + def is_configured(self): + """ + Override the default logic querying StateFile for configuration status + and look whether named.conf was already modified by IPA installer. + """ + return named_conf_exists() + def uninstall(self): if self.is_configured(): self.print_msg("Unconfiguring %s" % self.service_name) -- 2.7.4