Bug 43314 - Make ucs-test python-psutil 2.1 (UCS 4.2) compatible
Make ucs-test python-psutil 2.1 (UCS 4.2) compatible
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: Framework
unspecified
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Florian Best
Stefan Gohmann
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-07 13:15 CET by Stefan Gohmann
Modified: 2017-04-04 18:28 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2017-01-07 13:15:22 CET
See also Jenkins tests:
 http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/SambaVersion=s4,Systemrolle=master/5/testReport/01_base/01_ignore_synced_clients_in_license_count/test/


[2017-01-06 09:02:42.336193] Cleanup after exception: <type 'exceptions.TypeError'> object of type 'instancemethod' has no len()
[2017-01-06 09:02:42.336269] Performing UCSTestUDM cleanup...
[2017-01-06 09:02:42.336331] UCSTestUDM cleanup done
(2017-01-06 09:02:42.343723) Traceback (most recent call last):
(2017-01-06 09:02:42.343772)   File "01_ignore_synced_clients_in_license_count", line 33, in <module>
(2017-01-06 09:02:42.343848)     udm.stop_cli_server()
(2017-01-06 09:02:42.343895)   File "/usr/lib/pymodules/python2.7/univention/testing/udm.py", line 422, in stop_cli_server
(2017-01-06 09:02:42.346102)     if len(proc.cmdline) >= 2 and proc.cmdline[0].startswith('/usr/bin/python') and proc.cmdline[1] == self.PATH_UDM_CLI_SERVER:
(2017-01-06 09:02:42.346221) TypeError: object of type 'instancemethod' has no len()
Comment 1 Stefan Gohmann univentionstaff 2017-01-07 13:20:41 CET
We have more cases like this:
root@master211:~# /usr/share/ucs-test/10_ldap/26reconnect_univention_ldapsearch -f
("Saving initial 'ldap/client/retry/count' UCR setting =", '10')
Setting ldap/client/retry/count

**********************************************************************************
Case 1: Stop and start slapd with 5 secs delay. Perform search. Retry count is 10.
**********************************************************************************
Failed to open /dev/tty: No such device or address
Traceback (most recent call last):
  File "26reconnect_univention_ldapsearch", line 201, in <module>
    main()
  File "26reconnect_univention_ldapsearch", line 189, in main
    restore_retry_count()
  File "26reconnect_univention_ldapsearch", line 33, in restore_retry_count
    stop_slapd()
  File "26reconnect_univention_ldapsearch", line 103, in stop_slapd
    if 'slapd' in proc.name:
TypeError: argument of type 'instancemethod' is not iterable
Starting 1 ucs-test at 2017-01-05 21:26:41 to /dev/null
Test the reconnect mechanism of univention-ldapsearch.................................................................................................. Test failed
root@master211:~#
Comment 2 Florian Best univentionstaff 2017-01-08 01:09:27 CET
ucs-test (7.0.6-40):
r75626 | Bug #43314: make ucs-test psutil 2.1 compatible
Comment 3 Stefan Gohmann univentionstaff 2017-01-29 18:59:19 CET
Please have a look here:

root@master090:~# /usr/share/ucs-test/10_ldap/26reconnect_univention_ldapsearch -f
("Saving initial 'ldap/client/retry/count' UCR setting =", '10')
Setting ldap/client/retry/count

**********************************************************************************
Case 1: Stop and start slapd with 5 secs delay. Perform search. Retry count is 10.
**********************************************************************************
Stopping ldap server(s): slapd ...done.

Performing 'univention-ldapsearch -s base dn -LLL'
Starting ldap server(s): slapd ...done.
Checking Schema ID: ...
univention-ldapsearch STDERR:
ldap_start_tls: Can't contact LDAP server (-1)
ldap_start_tls: Can't contact LDAP server (-1)
ldap_start_tls: Can't contact LDAP server (-1)
ldap_start_tls: Can't contact LDAP server (-1)
ldap_start_tls: Can't contact LDAP server (-1)

univention-ldapsearch STDOUT:
dn: dc=autotest090,dc=local
Stopping ldap server(s): slapd ...done.

The 'slapd' is still running, waiting...
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
Failed to search schema
invoke-rc.d: initscript slapd, action "start" failed.
slapd terminated.
Restoring initial UCR 'ldap/client/retry/count' to 10
Setting ldap/client/retry/count
Starting ldap server(s): slapd ...done.
Checking Schema ID: ...done.
Traceback (most recent call last):
  File "26reconnect_univention_ldapsearch", line 201, in <module>
    main()
  File "26reconnect_univention_ldapsearch", line 156, in main
    wait_for_slapd_to_be_started()
  File "26reconnect_univention_ldapsearch", line 134, in wait_for_slapd_to_be_started
    if 'slapd' in proc.name:
TypeError: argument of type 'instancemethod' is not iterable
Starting 1 ucs-test at 2017-01-29 12:57:24 to /dev/null
Test the reconnect mechanism of univention-ldapsearch................................................................................................... Test failed
root@master090:~# dpkg -l | grep -i ucs-test
ii  ucs-test                                            7.0.10-7A~4.2.0.201701271832                   all          UCS test environment meta package
Comment 4 Florian Best univentionstaff 2017-01-30 10:30:52 CET
r76169 | Bug #43314: fix TypeError
Comment 5 Stefan Gohmann univentionstaff 2017-02-01 07:44:02 CET
(In reply to Florian Best from comment #4)
> r76169 | Bug #43314: fix TypeError

OK, looks good.
Comment 6 Stefan Gohmann univentionstaff 2017-04-04 18:28:14 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".