403b09
From 42c09751aedf6289f983d4238ae1ff3b44b5f572 Mon Sep 17 00:00:00 2001
403b09
From: Petr Spacek <pspacek@redhat.com>
403b09
Date: Mon, 25 Jul 2016 15:54:43 +0200
403b09
Subject: [PATCH] replica-install: Fix --domain
403b09
403b09
Replica installation must not check existence of --domain - the domain
403b09
must (logically) exist.
403b09
403b09
https://fedorahosted.org/freeipa/ticket/6130
403b09
403b09
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
403b09
---
403b09
 ipaserver/install/server/common.py  |  5 -----
403b09
 ipaserver/install/server/install.py | 14 +++++++++++---
403b09
 2 files changed, 11 insertions(+), 8 deletions(-)
403b09
403b09
diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py
403b09
index 45fb2dc17976a08acab16783584524721411fb4e..e6093d15cd1067a83ed89945c4a9c983c66ec06f 100644
403b09
--- a/ipaserver/install/server/common.py
403b09
+++ b/ipaserver/install/server/common.py
403b09
@@ -284,11 +284,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite):
403b09
     @domain_name.validator
403b09
     def domain_name(self, value):
403b09
         validate_domain_name(value)
403b09
-        if (self.setup_dns and
403b09
-                not self.dns.allow_zone_overlap):  # pylint: disable=no-member
403b09
-            print("Checking DNS domain %s, please wait ..." % value)
403b09
-            check_zone_overlap(value, False)
403b09
-
403b09
 
403b09
     dm_password = Knob(
403b09
         str, None,
403b09
diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
403b09
index c0c676b870b481696ae75742c7bf88074b0ecf9c..65f9318201e648b30a3c13626e807ac6f3a9416d 100644
403b09
--- a/ipaserver/install/server/install.py
403b09
+++ b/ipaserver/install/server/install.py
403b09
@@ -17,6 +17,7 @@ import six
403b09
 
403b09
 from ipapython import certmonger, ipaldap, ipautil, sysrestore
403b09
 from ipapython.dn import DN
403b09
+from ipapython.dnsutil import check_zone_overlap
403b09
 from ipapython.install import core
403b09
 from ipapython.install.common import step
403b09
 from ipapython.install.core import Knob
403b09
@@ -1199,13 +1200,20 @@ class ServerCA(BaseServerCA):
403b09
 
403b09
 
403b09
 class Server(BaseServer):
403b09
-    realm_name = Knob(BaseServer.realm_name)
403b09
-    domain_name = Knob(BaseServer.domain_name)
403b09
-
403b09
     setup_ca = None
403b09
     setup_kra = None
403b09
     setup_dns = Knob(BaseServer.setup_dns)
403b09
 
403b09
+    realm_name = Knob(BaseServer.realm_name)
403b09
+    domain_name = Knob(BaseServer.domain_name)
403b09
+
403b09
+    @domain_name.validator
403b09
+    def domain_name(self, value):
403b09
+        if (self.setup_dns and
403b09
+                not self.dns.allow_zone_overlap):  # pylint: disable=no-member
403b09
+            print("Checking DNS domain %s, please wait ..." % value)
403b09
+            check_zone_overlap(value, False)
403b09
+
403b09
     dm_password = Knob(
403b09
         BaseServer.dm_password,
403b09
         description="Directory Manager password",
403b09
-- 
403b09
2.7.4
403b09