On 24.11.2015 16:48, Jan Cholasta wrote:
On 24.11.2015 10:21, Martin Basti wrote:
https://fedorahosted.org/freeipa/ticket/5455
Patches attached.
+ def run(self):
+ self._run()
Wouldn't it be better to rename _run() to run() instead?
Updated patches attached.
From 0abe4e5ea6962c71546ee49a582edbfeead3d564 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Thu, 19 Nov 2015 15:40:20 +0100
Subject: [PATCH 1/2] ipa-ca-install: error when replica file is passed with
domain level > 0
with replica promotion (domain level > 0) there are no replica files,
thus adding replica file as parameter when domain level > 0 should be
disallowed.
https://fedorahosted.org/freeipa/ticket/5455
---
install/tools/ipa-ca-install | 2 ++
1 file changed, 2 insertions(+)
diff --git a/install/tools/ipa-ca-install b/install/tools/ipa-ca-install
index fafd5d091ee1dd72da8b3e3ee08506b38a96aceb..e7d9a16f20415540366713e90cb5355a6db757af 100755
--- a/install/tools/ipa-ca-install
+++ b/install/tools/ipa-ca-install
@@ -110,6 +110,8 @@ def install_replica(safe_options, options, filename):
domain_level = dsinstance.get_domain_level(api)
if domain_level > DOMAIN_LEVEL_0:
options.promote = True
+ if filename is not None:
+ sys.exit("No replica file is required")
else:
options.promote = False
if filename is None:
--
2.5.0
From 92d9d366bae719a25256d1494fa1ceacdb68e197 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Mon, 23 Nov 2015 13:38:11 +0100
Subject: [PATCH 2/2] KRA install: show installation message only if install
really started
Message that installation started/failed was shown even when
install_check fail (installation itself did not start).
This commit show messages only if installation started.
Enhacement for https://fedorahosted.org/freeipa/ticket/5455
---
ipaserver/install/ipa_kra_install.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/ipaserver/install/ipa_kra_install.py b/ipaserver/install/ipa_kra_install.py
index d8fbf580e53010f8d42b4f8d6464997055c2c13c..79b4ae899c6cc9915316d44f6d9e1d035d12ca60 100644
--- a/ipaserver/install/ipa_kra_install.py
+++ b/ipaserver/install/ipa_kra_install.py
@@ -152,7 +152,7 @@ class KRAInstaller(KRAInstall):
raise admintool.ScriptError(
"Directory Manager password required")
- def _run(self):
+ def run(self):
super(KRAInstaller, self).run()
if not cainstance.is_ca_installed_locally():
@@ -174,8 +174,6 @@ class KRAInstaller(KRAInstall):
raise RuntimeError("Too many parameters provided. "
"No replica file is required.")
- print(dedent(self.INSTALLER_START_MESSAGE))
-
self.options.dm_password = self.options.password
self.options.setup_ca = False
@@ -217,11 +215,10 @@ class KRAInstaller(KRAInstall):
except RuntimeError as e:
raise admintool.ScriptError(str(e))
- kra.install(api, config, self.options)
+ print(dedent(self.INSTALLER_START_MESSAGE))
- def run(self):
try:
- self._run()
+ kra.install(api, config, self.options)
except:
self.log.error(dedent(self.FAIL_MESSAGE))
raise
--
2.5.0
--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code