Univention Bugzilla – Bug 50850
Provisioning App: Users: modify contextID
Last modified: 2020-03-06 13:00:09 CET
oxContext was 13, now changing to 12: root@m66:~# udm users/user modify --dn uid=test5,cn=users,dc=uni,dc=dtr --set oxContext=12 ==== /var/log/univention/listener_modules/ox-connector.log ==== 2020-02-24 17:07:03 INFO modify of uid=test5,cn=users,dc=uni,dc=dtr (id: 5e68b6f2-eb6a-1039-9892-396e91e2c316, file: /var/lib/univention-appcenter/listener//ox-connector/2020-02-24-17-07-03-770292.json) 2020-02-24 17:07:04 INFO conversion of uid=test5,cn=users,dc=uni,dc=dtr (id: 5e68b6f2-eb6a-1039-9892-396e91e2c316, file: /var/lib/univention-appcenter/apps/ox-connector/data/listener/2020-02-24-17-07-03-770292.json) 2020-02-24 17:07:04 INFO Running trigger 2020-02-24 17:07:06 INFO univention.ox.backend_base.SoapUser: Deleted user 'test5' (3). 2020-02-24 17:07:06 WARNING Error while processing /var/lib/univention-appcenter/apps/ox-connector/data/listener/2020-02-24-17-07-03-770292.json 2020-02-24 17:07:06 WARNING Traceback (most recent call last): 2020-02-24 17:07:06 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 909, in run_on_files 2020-02-24 17:07:06 WARNING f(obj) 2020-02-24 17:07:06 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 945, in run 2020-02-24 17:07:06 WARNING modify_user(obj) 2020-02-24 17:07:06 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 525, in modify_user 2020-02-24 17:07:06 WARNING return create_user(obj) 2020-02-24 17:07:06 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 496, in create_user 2020-02-24 17:07:06 WARNING if obj.attributes.get("isOxUser", "Not") == "Not": 2020-02-24 17:07:06 WARNING AttributeError: 'NoneType' object has no attribute 'get' 2020-02-24 17:07:11 INFO Running trigger 2020-02-24 17:07:12 INFO univention.ox.backend_base.SoapUser: Created user 'test5' in context 12 (5). 2020-02-24 17:07:13 INFO Success! Removing consumed files ================= The user was successfully deleted in context 13 and created in context 12, but: * fix traceback * creation in new context must happen 1st, an old when successful: deletion in old context ================= When using a non-existent context: the user is successfully deleted in old context but ofc not created in new context. That should not happen: ================= 2020-02-24 17:13:26 INFO modify of uid=test5,cn=users,dc=uni,dc=dtr (id: 5e68b6f2-eb6a-1039-9892-396e91e2c316, file: /var/lib/univention-appcenter/listener//ox-connector/2020-02-24-17-13-26-469508.json) 2020-02-24 17:13:28 INFO conversion of uid=test5,cn=users,dc=uni,dc=dtr (id: 5e68b6f2-eb6a-1039-9892-396e91e2c316, file: /var/lib/univention-appcenter/apps/ox-connector/data/listener/2020-02-24-17-13-26-469508.json) 2020-02-24 17:13:28 INFO Running trigger 2020-02-24 17:13:30 INFO univention.ox.backend_base.SoapUser: Deleted user 'test5' (5). 2020-02-24 17:13:30 WARNING Error while processing /var/lib/univention-appcenter/apps/ox-connector/data/listener/2020-02-24-17-13-26-469508.json 2020-02-24 17:13:30 WARNING Traceback (most recent call last): 2020-02-24 17:13:30 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 909, in run_on_files 2020-02-24 17:13:30 WARNING f(obj) 2020-02-24 17:13:30 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 945, in run 2020-02-24 17:13:30 WARNING modify_user(obj) 2020-02-24 17:13:30 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 525, in modify_user 2020-02-24 17:13:30 WARNING return create_user(obj) 2020-02-24 17:13:30 WARNING File "/tmp/univention-ox-connector.listener_trigger", line 496, in create_user 2020-02-24 17:13:30 WARNING if obj.attributes.get("isOxUser", "Not") == "Not": 2020-02-24 17:13:30 WARNING AttributeError: 'NoneType' object has no attribute 'get' 2020-02-24 17:13:35 INFO Running trigger 2020-02-24 17:13:36 WARNING Could not find admin password for context 55. Ignoring this task 2020-02-24 17:13:36 INFO Success! Removing consumed files
Especially, as it is then not possible to fix the user anymore (except by changing it using two existing contexts): ============================== root@m66:~# udm users/user modify --dn uid=test5,cn=users,dc=uni,dc=dtr --set oxContext=12 Object modified: uid=test5,cn=users,dc=uni,dc=dtr ============================== 2020-02-24 17:15:37 INFO modify of uid=test5,cn=users,dc=uni,dc=dtr (id: 5e68b6f2-eb6a-1039-9892-396e91e2c316, file: /var/lib/univention-appcenter/listener//ox-connector/2020-02-24-17-15-37-907950.json) 2020-02-24 17:15:41 INFO conversion of uid=test5,cn=users,dc=uni,dc=dtr (id: 5e68b6f2-eb6a-1039-9892-396e91e2c316, file: /var/lib/univention-appcenter/apps/ox-connector/data/listener/2020-02-24-17-15-37-907950.json) 2020-02-24 17:15:41 INFO Running trigger 2020-02-24 17:15:43 WARNING Could not find admin password for context 55. Ignoring this task 2020-02-24 17:15:43 INFO Success! Removing consumed files
Switched the order when changing context: first create, then delete.
*** Bug 50822 has been marked as a duplicate of this bug. ***
OK: order (1st create, 2nd delete) fixed OK: groups in old context purged if empty REOPEN: groups in new context not created/updated
Fixed in the latest version of the image.
OK: groups in new context are now created/updated