to enable debugging of such errors.

E.g.: https://fedorahosted.org/freeipa/ticket/5741
--
Petr Vobornik
From 956f5171a3b51544103672feaffef752ee94dc42 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Thu, 24 Mar 2016 15:24:23 +0100
Subject: [PATCH] replicainstall: log ACI and LDAP errors in promotion check

to enable debugging of such errors.

E.g.: https://fedorahosted.org/freeipa/ticket/5741
---
 ipaserver/install/server/replicainstall.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
index 495baefac8d3cc791006dd7cb8719a308aa06c00..1586d8fe8eb899052bd506831eb507c627c827b7 100644
--- a/ipaserver/install/server/replicainstall.py
+++ b/ipaserver/install/server/replicainstall.py
@@ -1255,9 +1255,11 @@ def promote_check(installer):
                 config.host_name, not installer.interactive,
                 False, options.ip_addresses)
 
-    except errors.ACIError:
+    except errors.ACIError as e:
+        root_logger.debug(e)
         sys.exit("\nInsufficient privileges to promote the server.")
-    except errors.LDAPError:
+    except errors.LDAPError as e:
+        root_logger.debug(e)
         sys.exit("\nUnable to connect to LDAP server %s" %
                  config.master_host_name)
     finally:
-- 
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

Reply via email to