pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

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

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