On Tue, 20 Jan 2015, Martin Basti wrote:
It was hard to debug issue with client, when for several issues was raised only one error.


Patch attached.

--
Martin Basti


From 11d154d0df7cc208c168a69d05e232ac253a210b Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Tue, 20 Jan 2015 17:30:51 +0100
Subject: [PATCH] Add debug messages into client autodetection

Is hard to debug what the problem with REALM is without debug messages.
---
ipa-client/ipaclient/ipadiscovery.py | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/ipa-client/ipaclient/ipadiscovery.py 
b/ipa-client/ipaclient/ipadiscovery.py
index 
0d574825aa493a8d565afe30077b74aec03924a3..5e316837de7f10c1797198f881f58546e0ed3f43
 100644
--- a/ipa-client/ipaclient/ipadiscovery.py
+++ b/ipa-client/ipaclient/ipadiscovery.py
@@ -390,10 +390,15 @@ class IPADiscovery(object):
                    if trealm == r:
                        return [0, thost, trealm]
                # must match or something is very wrong
+                root_logger.debug("Realm %s does not match any realm in LDAP "
+                                  "database", trealm)
                return [REALM_NOT_FOUND]
            else:
                if len(lrealms) != 1:
                    #which one? we can't attach to a multi-realm server without 
DNS working
+                    root_logger.debug("Multiple realms found, cannot decide "
+                                      "which realm is the right without "
+                                      "working DNS")
                    return [REALM_NOT_FOUND]
                else:
                    return [0, thost, lrealms[0]]
ACK

--
/ Alexander Bokovoy

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to