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