From 1f1c7156564e7d7c2183e54811c69bc74ff21a98 Mon Sep 17 00:00:00 2001
From: Martin Basti <mbasti@redhat.com>
Date: Wed, 7 Jan 2015 13:21:04 +0100
Subject: [PATCH] Fix zone find during forwardzone upgrade
https://fedorahosted.org/freeipa/ticket/4818
Reviewed-By: Petr Spacek <pspacek@redhat.com>
---
ipaserver/install/plugins/dns.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ipaserver/install/plugins/dns.py b/ipaserver/install/plugins/dns.py
index ea4aec9741e4714cacdb677bd850730462623fa7..aa7bf5f0bbc0db6f10f047f390246cfbfda32b73 100644
--- a/ipaserver/install/plugins/dns.py
+++ b/ipaserver/install/plugins/dns.py
@@ -198,12 +198,16 @@ class update_master_to_dnsforwardzones(PostUpdate):
# fwzones exist, do not execute upgrade again
return (False, False, [])
+ zones = []
try:
# raw values are required to store into ldif
zones = api.Command.dnszone_find(all=True,
raw=True,
sizelimit=0)['result']
except errors.NotFound:
+ pass
+
+ if not zones:
self.log.info('No DNS zone to update found')
return (False, False, [])
--
2.1.0