483b06
From ad0f85945daa0b0bfbddbcde992c5388c170518f Mon Sep 17 00:00:00 2001
483b06
From: Aleksei Slaikovskii <aslaikov@redhat.com>
483b06
Date: Wed, 18 Oct 2017 09:52:08 +0200
483b06
Subject: [PATCH] Less confusing message for PKINIT configuration during
483b06
 install
483b06
483b06
The message about an error during replica setup was causing the
483b06
users to think the installation gone wrong even though this was
483b06
an expected behavior when ipa-replica-install was ran without
483b06
--no-pkinit flag and CA somehow is not reachable which defines
483b06
that there is something wrong in a topology but does not lead
483b06
to failure of the replica's installation. So now installation
483b06
will not print error messages to stdout but rather will give a
483b06
recomendation to user and write the old error message to log
483b06
as a warning so it still will be easy to find if needed.
483b06
483b06
https://pagure.io/freeipa/issue/7179
483b06
483b06
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
483b06
---
483b06
 ipaserver/install/krbinstance.py | 13 +++++++++++--
483b06
 1 file changed, 11 insertions(+), 2 deletions(-)
483b06
483b06
diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py
483b06
index 6b51e65d1ec985bfc01f167aea3fe3ca11c7ec29..34fe46aa8ef297bf69eb74953c956ad9c3d30def 100644
483b06
--- a/ipaserver/install/krbinstance.py
483b06
+++ b/ipaserver/install/krbinstance.py
483b06
@@ -494,8 +494,17 @@ class KrbInstance(service.Service):
483b06
             self._install_pkinit_ca_bundle()
483b06
             self.pkinit_enable()
483b06
         except RuntimeError as e:
483b06
-            root_logger.error("PKINIT certificate request failed: %s", e)
483b06
-            root_logger.error("Failed to configure PKINIT")
483b06
+            root_logger.warning("PKINIT certificate request failed: %s", e)
483b06
+            root_logger.warning("Failed to configure PKINIT")
483b06
+
483b06
+            self.print_msg("Full PKINIT configuration did not succeed")
483b06
+            self.print_msg(
483b06
+                "The setup will only install bits "
483b06
+                "essential to the server functionality")
483b06
+            self.print_msg(
483b06
+                "You can enable PKINIT after the "
483b06
+                "setup completed using 'ipa-pkinit-manage'")
483b06
+
483b06
             self.stop_tracking_certs()
483b06
             self.issue_selfsigned_pkinit_certs()
483b06
 
483b06
-- 
483b06
2.13.5
483b06