From f0e09c42b76f229486e5dea097cd2b6602999943 Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Dec 07 2016 11:30:38 +0000 Subject: 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 --- diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index 89a280a..e24249a 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -1144,6 +1144,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)