From 6067824be494745926204a7ba3709c3c0f054326 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 1 Oct 2015 11:41:39 +0200 Subject: [PATCH] install: fix ipa-server-install fail on missing --forwarder https://fedorahosted.org/freeipa/ticket/4517 Reviewed-By: Martin Basti --- ipaserver/install/server/common.py | 4 ---- ipaserver/install/server/install.py | 6 ++++++ ipaserver/install/server/replicainstall.py | 7 +++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py index 0648b40e5..3eb7279d2 100644 --- a/ipaserver/install/server/common.py +++ b/ipaserver/install/server/common.py @@ -401,10 +401,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite): raise RuntimeError( "You cannot specify a --forwarder option together with " "--no-forwarders") - elif not self.dns.forwarders and not self.dns.no_forwarders: - raise RuntimeError( - "You must specify at least one --forwarder option or " - "--no-forwarders option") elif self.dns.reverse_zones and self.dns.no_reverse: raise RuntimeError( "You cannot specify a --reverse-zone option together with " diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py index 4fe1ed9f2..32eef1cd7 100644 --- a/ipaserver/install/server/install.py +++ b/ipaserver/install/server/install.py @@ -1269,6 +1269,12 @@ class Server(BaseServer): raise RuntimeError( "In unattended mode you need to provide at least -r, -p " "and -a options") + if self.setup_dns: + #pylint: disable=no-member + if not self.dns.forwarders and not self.dns.no_forwarders: + raise RuntimeError( + "You must specify at least one --forwarder option or " + "--no-forwarders option") if self.idmax < self.idstart: raise RuntimeError( diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index 79bbcda59..3087091e4 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -741,6 +741,13 @@ class Replica(BaseServer): raise RuntimeError( "Replica file %s does not exist" % self.replica_file) + if self.setup_dns: + #pylint: disable=no-member + if not self.dns.forwarders and not self.dns.no_forwarders: + raise RuntimeError( + "You must specify at least one --forwarder option or " + "--no-forwarders option") + self.password = self.dm_password @step()