replicainstall: log ACI and LDAP errors in promotion check

to enable debugging of such errors.

E.g.: https://fedorahosted.org/freeipa/ticket/5741

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Petr Vobornik authored and Martin Basti committed 2016-10-26 18:32:06 +02:00
1 parent b6a3c9dc74
commit d0c17b4d9a
1 file changed
+3
@@ -14,6 +14,7 @@ import os
import shutil
import socket
import tempfile
import traceback
import six
@@ -1315,8 +1316,10 @@ def promote_check(installer):
broadcast_ip_address_warning(config.ips)
except errors.ACIError:
root_logger.debug(traceback.format_exc())
raise ScriptError("\nInsufficient privileges to promote the server.")
except errors.LDAPError:
root_logger.debug(traceback.format_exc())
raise ScriptError("\nUnable to connect to LDAP server %s" %
config.master_host_name)
finally: