pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0233-Less-confusing-message-for-PKINIT-configuration-duri.patch

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