-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33302/
-----------------------------------------------------------
Review request for Ambari, Robert Levas and Tom Beerbower.
Bugs: AMBARI-10513
https://issues.apache.org/jira/browse/AMBARI-10513
Repository: ambari
Description
-------
ambari-server setup-ldap was performed against QE AD server, which has more
than 2000 users.
[root@c6401 ~]# ambari-server sync-ldap --all
Using python /usr/bin/python2.6
Syncing with LDAP...
Enter Ambari Admin login: admin
Enter Ambari Admin password:
Syncing all.......ERROR: Exiting with exit code 1.
REASON: Caught exception running LDAP sync. [LDAP: error code 4 - Sizelimit
Exceeded]; nested exception is javax.naming.SizeLimitExceededException: [LDAP:
error code 4 - Sizelimit Exceeded]; remaining name
'CN=Users,DC=scl42,DC=hortonworks,DC=com'
Dilli Arumugam told me that Ranger (formerly known as XASecure) also hit a
similar issue: BUG-23578.
BUG-31217: Attempting to sync LDAP that contains > 1000 entities fails.
Problem: If your directory contains > 1000 users, attempts to sync-ldap users
and groups to Ambari will fail. There is a limit of 1000 to the number of
entities Ambari can process.
Solution:
The solution is to retrieve the results in batches by using result paging.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java
d1293cb
ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
09a2256
Diff: https://reviews.apache.org/r/33302/diff/
Testing
-------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main ....................................... SUCCESS [3.293s]
[INFO] Apache Ambari Project POM ......................... SUCCESS [0.043s]
[INFO] Ambari Web ........................................ SUCCESS [42.741s]
[INFO] Ambari Views ...................................... SUCCESS [3.783s]
[INFO] Ambari Admin View ................................. SUCCESS [12.679s]
[INFO] Ambari Metrics Common ............................. SUCCESS [1.661s]
[INFO] Ambari Server ..................................... SUCCESS [35:50.606s]
[INFO] Ambari Agent ...................................... SUCCESS [10.798s]
[INFO] Ambari Client ..................................... SUCCESS [0.041s]
[INFO] Ambari Python Client .............................. SUCCESS [0.246s]
[INFO] Ambari Groovy Client .............................. SUCCESS [10.219s]
[INFO] Ambari Shell ...................................... SUCCESS [0.056s]
[INFO] Ambari Python Shell ............................... SUCCESS [0.038s]
[INFO] Ambari Groovy Shell ............................... SUCCESS [6.721s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37:23.499s
[INFO] Finished at: Fri Apr 17 13:02:14 EEST 2015
[INFO] Final Memory: 68M/565M
[INFO] ------------------------------------------------------------------------
Thanks,
Emil Anca