ccffd0
From 20bb855a57080145d0d5555294381c890ef605bb Mon Sep 17 00:00:00 2001
ccffd0
From: Antonio Torres <antorres@redhat.com>
ccffd0
Date: Tue, 16 Feb 2021 16:53:24 +0100
ccffd0
Subject: [PATCH] ipaserver: don't ignore zonemgr option on install
ccffd0
ccffd0
Fix zonemgr option in ipaserver install being
ccffd0
ignored because of an incorrect condition.
ccffd0
ccffd0
Fixes: https://pagure.io/freeipa/issue/8718
ccffd0
Signed-off-by: Antonio Torres <antorres@redhat.com>
ccffd0
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
ccffd0
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
ccffd0
---
ccffd0
 ipaserver/install/bindinstance.py | 4 ++--
ccffd0
 1 file changed, 2 insertions(+), 2 deletions(-)
ccffd0
ccffd0
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
ccffd0
index 3b446ce76..19941cd00 100644
ccffd0
--- a/ipaserver/install/bindinstance.py
ccffd0
+++ b/ipaserver/install/bindinstance.py
ccffd0
@@ -355,7 +355,7 @@ def add_zone(name, zonemgr=None, dns_backup=None, ns_hostname=None,
ccffd0
         else:
ccffd0
             update_policy = get_dns_forward_zone_update_policy(api.env.realm)
ccffd0
 
ccffd0
-    if zonemgr is None:
ccffd0
+    if not zonemgr:
ccffd0
         zonemgr = 'hostmaster.%s' % name
ccffd0
 
ccffd0
     if ns_hostname:
ccffd0
@@ -682,7 +682,7 @@ class BindInstance(service.Service):
ccffd0
         self.forward_policy = forward_policy
ccffd0
         self.reverse_zones = reverse_zones
ccffd0
 
ccffd0
-        if zonemgr is not None:
ccffd0
+        if not zonemgr:
ccffd0
             self.zonemgr = 'hostmaster.%s' % normalize_zone(self.domain)
ccffd0
         else:
ccffd0
             self.zonemgr = normalize_zonemgr(zonemgr)
ccffd0
-- 
ccffd0
2.29.2
ccffd0
ccffd0
From 82043e1fd052618608d3b7786473a632478795ee Mon Sep 17 00:00:00 2001
ccffd0
From: Antonio Torres <antorres@redhat.com>
ccffd0
Date: Tue, 16 Feb 2021 18:24:26 +0100
ccffd0
Subject: [PATCH] ipatests: check that zonemgr is set correctly during server
ccffd0
 install
ccffd0
ccffd0
Add test to check that zonemgr is correctly
ccffd0
set when installing IPA server.
ccffd0
ccffd0
Related: https://pagure.io/freeipa/issue/8718
ccffd0
Signed-off-by: Antonio Torres <antorres@redhat.com>
ccffd0
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
ccffd0
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
ccffd0
---
ccffd0
 ipatests/test_integration/test_installation.py | 7 +++++++
ccffd0
 1 file changed, 7 insertions(+)
ccffd0
ccffd0
diff --git a/ipatests/test_integration/test_installation.py b/ipatests/test_integration/test_installation.py
ccffd0
index 6e8af024c..18c5bd243 100644
ccffd0
--- a/ipatests/test_integration/test_installation.py
ccffd0
+++ b/ipatests/test_integration/test_installation.py
ccffd0
@@ -1171,6 +1171,13 @@ class TestInstallMasterDNS(IntegrationTest):
ccffd0
             extra_args=['--zonemgr', 'me@example.org'],
ccffd0
         )
ccffd0
 
ccffd0
+        tasks.kinit_admin(self.master)
ccffd0
+        result = self.master.run_command(
ccffd0
+            ['ipa', 'dnszone-show', self.master.domain.name]
ccffd0
+        ).stdout_text
ccffd0
+
ccffd0
+        assert "Administrator e-mail address: me.example.org" in result
ccffd0
+
ccffd0
     def test_server_install_lock_bind_recursion(self):
ccffd0
         """Test if server installer lock Bind9 recursion
ccffd0
 
ccffd0
-- 
ccffd0
2.29.2
ccffd0