Univention Bugzilla – Bug 32542
modify after remove corrupts pickle file when moving to a non readable location
Last modified: 2016-08-03 06:05:00 CEST
Created attachment 5420 [details] Patch for s4-connector.py If moving a windows client from cn=computers,$ldap_base to cn=computers,cn=schoolou,$ldap_base every school slave which cannot read this schoolou creates the Group "Windows Hosts" in s4 instead. 5607 cn=windowskaputt,cn=computers,dc=schoolmulti-s4,dc=qa r 5608 cn=windowskaputt,cn=computers,ou=schule2,dc=schoolmulti-s4,dc=qa a 5609 cn=Windows Hosts,cn=groups,dc=schoolmulti-s4,dc=qa m #(normal membership update) The pickle file loads itself with 5607 as old_dn (because of the actiontype "r") - it expects the "a" action now, but never "sees" 5608 (selective replication in UCS@School). Instead it uses 5609 and the following happens in the connector: "move group from [cn=windowskaputt,cn=computers,dc=schoolmulti-s4,dc=qa] to [cn=Windows Hosts,cn=groups,dc=schoolmulti-s4,dc=qa]" The attached patch prevents this. This is totally untested for other operations and should only concrete the behaviour a bit more.
Created attachment 5421 [details] corrupt pickle file >>> import cPickle >>> x = cPickle.load(open('1378820790.898377','r')) >>> x[1] {'sambaGroupType': ['2'], 'hasSubordinates': ['FALSE'], 'entryCSN': ['20130910134630.637935Z#000000#000#000000'], 'cn': ['Windows Hosts'][.......] >>> x[2] {'sambaGroupType': ['2'], 'hasSubordinates': ['FALSE'], 'entryCSN': ['20130910134421.392475Z#000000#000#000000'], 'cn': ['Windows Hosts'][.......] >>> x[3] 'cn=asd,cn=computers,dc=schoolmulti-s4,dc=qa' pickle file attached
Just to make sure: The pickle file wasn't saved so this is a new reproduction where the windows client name was "asd" - just to make it more complicated ;)
The moved windows client will not be removed from the school which is no longer able to read the client. I split it into a new bug because it is not critical: Bug #32685. 3.2 Fixes: r44419 + r44444 3.2 Changelog: r44439 3.1 Fixes: r44418 + r44443 3.1 YAML: r44420
OK - errata3.1-1 OK - YAML OK - ucs3.2-0 OK - Changelog
I saw the following error in the listener.log while installing a new system: Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/s4-connector.py", line 141, in handler group_objects.append(ob) NameError: global name 'ob' is not defined UCS 3.2: r44666 UCS 3.1-1: r44667 YAML: r44668
07.10.13 09:58:17.884 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/s4-connector.py failed File "/usr/lib/univention-directory-listener/system/s4-connector.py", line 143 _dump_changes_to_file_and_check_file(directory, dn, new, old, old_dn) ^ SyntaxError: invalid syntax ====> group_objects.append((dn, new, old, old_dn)
fixed with r44802
OK
http://errata.univention.de/ucs/3.1/188.html