From ab8cba61c08571e4cbce1246bcbf820d3e337506 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Nov 27 2015 15:14:06 +0000 Subject: ipa-kra-install: error when replica file is passed with domain level > 0 installing kra on promoted replica (domain level > 0) does not require replica file. https://fedorahosted.org/freeipa/ticket/5455 Reviewed-By: Martin Babinsky Reviewed-By: Jan Cholasta --- diff --git a/ipaserver/install/ipa_kra_install.py b/ipaserver/install/ipa_kra_install.py index 79b4ae8..643ad40 100644 --- a/ipaserver/install/ipa_kra_install.py +++ b/ipaserver/install/ipa_kra_install.py @@ -169,10 +169,10 @@ class KRAInstaller(KRAInstall): self.options.promote = True elif not self.args: raise RuntimeError("A replica file is required.") - else: - if self.args: - raise RuntimeError("Too many parameters provided. " - "No replica file is required.") + + if self.args and (not self.installing_replica or self.options.promote): + raise RuntimeError("Too many parameters provided. " + "No replica file is required.") self.options.dm_password = self.options.password self.options.setup_ca = False