Bug 4816 - tl-ldap-certalias backtrace using python-ldap version 2.4
Summary: tl-ldap-certalias backtrace using python-ldap version 2.4
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Smart card (show other bugs)
Version: 4.1.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.4.0
Assignee: Karl Mikaelsson
URL:
Keywords: hean01_tester, relnotes
Depends on:
Blocks:
 
Reported: 2013-09-30 11:36 CEST by Henrik Andersson
Modified: 2015-03-31 12:17 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Henrik Andersson cendio 2013-09-30 11:36:08 CEST
Running tl-ldap-certalias on my Fedora 19 gives following traceback:

Traceback (most recent call last):
  File "/opt/thinlinc/sbin/tl-ldap-certalias", line 1323, in <module>
    ret = main()
  File "/opt/thinlinc/sbin/tl-ldap-certalias", line 860, in main
    for user in usersearch:
  File "/opt/thinlinc/modules/thinlinc/tl_ldap_iterator.py", line 123, in __iter__
    for II1i1IiiIIi11 in self . results ( ) :
  File "/opt/thinlinc/modules/thinlinc/tl_ldap_iterator.py", line 135, in results
    for oo000OO00Oo in self . search_paged ( ) :
  File "/opt/thinlinc/modules/thinlinc/tl_ldap_iterator.py", line 78, in search_paged
    oOoO = SimplePagedResultsControl ( ldap . LDAP_CONTROL_PAGE_OID ,
AttributeError: 'module' object has no attribute 'LDAP_CONTROL_PAGE_OID'

The paged result API has changed from python-ldap 2.3 to 2.4.
Comment 4 Karl Mikaelsson cendio 2014-10-30 14:41:01 CET
A possible workaround is to change self . pagesize = 1000 from 1000 to 0 in tl_ldap_iterator.py. This will disable paged querys altogether. Note that when using this approach, LDAP result size limits may cause the returned data to be incomplete.
Comment 6 Karl Mikaelsson cendio 2014-11-03 12:52:52 CET
Reassigning to --- for discussion.

A note to the future tester: make sure the LDAP query you test with returns more than self.pagesize results.
Comment 7 Karl Mikaelsson cendio 2014-11-10 13:21:28 CET
Fixed in r29576.

Tester should make sure that the code works with LDAP queries with:

 - number of results exceeding pagesize
 - number of results smaller than pagesize
 - python-ldap < 2.4
 - python-ldap >= 2.4
Comment 8 Henrik Andersson cendio 2015-03-31 09:57:03 CEST
>  - number of results exceeding pagesize
>  - number of results smaller than pagesize
>  - python-ldap >= 2.4

Tested using ThinLinc build 4703 against demo LDAP server on a system with python-ldap 2.4.17.

Query goes through 21192 users nicly and with a special filter resulting with one entry works perfectly.
Comment 9 Henrik Andersson cendio 2015-03-31 12:17:21 CEST
> 
>  - number of results exceeding pagesize
>  - number of results smaller than pagesize
>  - python-ldap < 2.4

Tested using ThinLinc build 4709 against demo LDAP server on a system with
python-ldap 2.3.10 (RHEL 6).

Using tl-ldap-certalias, the query goes through 21193 users nicely and with a special filter resulting with one entry works perfectly.

Verified that there was a new demo account between the tests of python-ldap versions.

Note You need to log in before you can comment on or make changes to this bug.