95ea96
From a24178a743e7a90ca80702207345a398bf8074ad Mon Sep 17 00:00:00 2001
2737e7
From: Christian Heimes <cheimes@redhat.com>
2737e7
Date: Fri, 29 Jun 2018 11:08:45 +0200
2737e7
Subject: [PATCH] Catch ACIError instead of invalid credentials
2737e7
2737e7
ipaldap's LDAPClient client turns INVALID_CREDENTIAL error into
2737e7
ACIError. Catch the ACIError and wait until the user has been
2737e7
replicated.
2737e7
2737e7
Apparently no manual or automated test ran into the timeout during
2737e7
testing.
2737e7
2737e7
Fixes: Fixes: https://pagure.io/freeipa/issue/7593
2737e7
Signed-off-by: Christian Heimes <cheimes@redhat.com>
2737e7
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2737e7
---
2737e7
 ipaserver/install/dogtaginstance.py | 3 ++-
2737e7
 1 file changed, 2 insertions(+), 1 deletion(-)
2737e7
2737e7
diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py
95ea96
index 5b2c30f8a1b7e932ce1cca3ca38f5962a3d54266..437029315cb6774ce9057baafda27cdb68454b49 100644
2737e7
--- a/ipaserver/install/dogtaginstance.py
2737e7
+++ b/ipaserver/install/dogtaginstance.py
95ea96
@@ -471,7 +471,8 @@ class DogtagInstance(service.Service):
2737e7
             time.sleep(1)
2737e7
             try:
2737e7
                 master_conn.simple_bind(self.admin_dn, self.admin_password)
2737e7
-            except ldap.INVALID_CREDENTIALS:
2737e7
+            except errors.ACIError:
2737e7
+                # user not replicated yet
2737e7
                 pass
2737e7
             else:
95ea96
                 logger.debug("Successfully logged in as %s", self.admin_dn)
2737e7
-- 
2737e7
2.17.1
2737e7