Hello,

DNS: Fix upgrade - master to forward zone transformation

This happens when upgrading from IPA <= 4.0 to versions 4.3+.

DNS caching might cause false positive in code which replaces master zone
with forward zone. This will effectivelly delete the master zone
without adding a replacement forward zone.

Solution is to use skip_overlap_check option for dnsforwardzone_add command
so zone existence check is skipped and the upgrade can proceed.

https://fedorahosted.org/freeipa/ticket/5851

-- 
Petr^2 Spacek
From 74e595729273a7d47c1a7285764137acdbddc4a9 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Tue, 26 Apr 2016 20:09:19 +0200
Subject: [PATCH] DNS: Fix upgrade - master to forward zone transformation

This happens when upgrading from IPA <= 4.0 to versions 4.3+.

DNS caching might cause false positive in code which replaces master zone
with forward zone. This will effectivelly delete the master zone
without adding a replacement forward zone.

Solution is to use skip_overlap_check option for dnsforwardzone_add command
so zone existence check is skipped and the upgrade can proceed.

https://fedorahosted.org/freeipa/ticket/5851
---
 ipaserver/install/plugins/dns.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ipaserver/install/plugins/dns.py b/ipaserver/install/plugins/dns.py
index cec626e39a05c8f7b17476479490ec57f540dd73..5043c10880179b696084ee362a5f53c4bf7e104c 100644
--- a/ipaserver/install/plugins/dns.py
+++ b/ipaserver/install/plugins/dns.py
@@ -339,7 +339,9 @@ class update_master_to_dnsforwardzones(DNSUpdater):
                 try:
                     kw = {
                         'idnsforwarders': zone.get('idnsforwarders', []),
-                        'idnsforwardpolicy': zone.get('idnsforwardpolicy', [u'first'])[0]
+                        'idnsforwardpolicy': zone.get('idnsforwardpolicy',
+                                                      [u'first'])[0],
+                        'skip_overlap_check': True,
                     }
                     self.api.Command['dnsforwardzone_add'](zone['idnsname'][0], **kw)
                 except Exception as e:
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to