areguera / rpms / ipa

Forked from rpms/ipa 5 years ago
Clone

Blame SOURCES/0063-Catch-ACIError-instead-of-invalid-credentials.patch

2737e7
From 699104cf8b8d0ec2570b3801e86c6a358343527a 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
2737e7
index 960b8cc7ce495bf5ca359f72b46aa0d43ccec5c3..1f9742b287f58ed117aba627ad85ac3ced4b2645 100644
2737e7
--- a/ipaserver/install/dogtaginstance.py
2737e7
+++ b/ipaserver/install/dogtaginstance.py
2737e7
@@ -468,7 +468,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:
2737e7
                 self.log.debug("Successfully logged in as %s", self.admin_dn)
2737e7
-- 
2737e7
2.17.1
2737e7