Bug 49876 - ucs-test: disable_user_from_ucs() raises noObject when object is already removed
ucs-test: disable_user_from_ucs() raises noObject when object is already rem...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-2-errata
Assigned To: Florian Best
Arvid Requate
:
: 49883 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-19 19:43 CEST by Florian Best
Modified: 2019-11-06 14:40 CET (History)
0 users

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:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-07-19 19:43:54 CEST
attachment 10121 [details] (s4connector.log from a ucs-test run) contains 44 times:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 910, in __sync_file_from_ucs
    if ((old_dn and not self.sync_from_ucs(key, mapped_object, pre_mapped_ucs_dn, unicode(old_dn, 'utf8'), old, new)) or (not old_dn and not self.sync_from_ucs(key, mapped_object, pre_mapped_ucs_dn, old_dn, old, new))):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2608, in sync_from_ucs
    f(self, property_type, object)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 105, in disable_user_from_ucs
    return s4connector.disable_user_from_ucs(key, object)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2126, in disable_user_from_ucs
    ucs_admin_object = univention.admin.objects.get(self.modules[object_key], co='', lo=self.lo, position='', dn=object_ucs['dn'])
  File "/usr/lib/pymodules/python2.7/univention/admin/objects.py", line 111, in get
    raise univention.admin.uexceptions.noObject(dn)
noObject: uid=qk8nbh1u,cn=users,dc=AutoTest091,dc=local
noObject: uid=ot476imv9e,cn=users,dc=AutoTest091,dc=local
noObject: uid=dz6uwazo8i,cn=users,dc=AutoTest091,dc=local
noObject: uid=xhi9nif13m,cn=users,dc=AutoTest091,dc=local
noObject: uid=83cmbhm0,cn=users,dc=AutoTest091,dc=local
noObject: uid=ovexbgv9,cn=users,dc=AutoTest091,dc=local
noObject: uid=umc_test_user_chj2ol,cn=users,dc=AutoTest091,dc=local
noObject: uid=föxmbgg8,cn=users,dc=AutoTest091,dc=local
noObject: uid=ox1z7e6r6f,cn=users,dc=AutoTest091,dc=local
noObject: uid=dxkm8nz3dy,cn=users,dc=AutoTest091,dc=local
noObject: uid=tlm421bgqi,cn=users,dc=AutoTest091,dc=local
noObject: uid=hxjrbxaa,cn=users,dc=AutoTest091,dc=local
noObject: uid=ln1wmpkrux,cn=users,dc=AutoTest091,dc=local
noObject: uid=5y5ybe0q,cn=users,dc=AutoTest091,dc=local
noObject: uid=lfjrbdäp,cn=users,dc=AutoTest091,dc=local
noObject: uid=deäzbidk,cn=users,dc=AutoTest091,dc=local
noObject: uid=dgjebuto,cn=users,dc=AutoTest091,dc=local
noObject: uid=vex1belö,cn=users,dc=AutoTest091,dc=local
noObject: uid=d0tibjqt,cn=users,dc=AutoTest091,dc=local
noObject: uid=zmlxcoom6r,cn=users,dc=AutoTest091,dc=local
noObject: uid=6ulgbdwc,cn=users,dc=AutoTest091,dc=local
noObject: uid=pp22izko4n,cn=users,dc=AutoTest091,dc=local
noObject: uid=80xkbix9,cn=users,dc=AutoTest091,dc=local
noObject: uid=cwjxmyzlbw,cn=users,dc=AutoTest091,dc=local
noObject: uid=kw1objby,cn=users,dc=AutoTest091,dc=local
noObject: uid=qöhebf5g,cn=users,dc=AutoTest091,dc=local
noObject: uid=äuü0x8vj,cn=users,dc=AutoTest091,dc=local
noObject: uid=pfj9lwf5wy,cn=users,dc=AutoTest091,dc=local
noObject: uid=öfau7wü9,cn=users,dc=AutoTest091,dc=local
noObject: uid=umc_test_user_hsl28h,cn=users,dc=AutoTest091,dc=local
noObject: uid=ilsxbdhx,cn=users,dc=AutoTest091,dc=local
noObject: uid=62eäbfce,cn=users,dc=AutoTest091,dc=local
noObject: uid=ri7mbgöc,cn=users,dc=AutoTest091,dc=local
noObject: uid=eetyn1xafl,cn=users,dc=AutoTest091,dc=local
noObject: uid=umc_test_user_chj2ol_admin,cn=users,dc=AutoTest091,dc=local
noObject: uid=j9no2e9elx,cn=users,dc=AutoTest091,dc=local
noObject: uid=nz997ab9ah,cn=users,dc=AutoTest091,dc=local
noObject: uid=c2dx9lh8qf,cn=users,dc=AutoTest091,dc=local
noObject: uid=whp9wlj32r,cn=users,dc=AutoTest091,dc=local
noObject: uid=xzwvbfq0,cn=users,dc=AutoTest091,dc=local
noObject: uid=pvof8wo4ew,cn=users,dc=AutoTest091,dc=local
noObject: uid=jcm7iseavu,cn=users,dc=AutoTest091,dc=local


attachment 10121 [details] (s4connector.log from a ucs-test run) contains 90 times:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 910, in __sync_file_from_ucs
    if ((old_dn and not self.sync_from_ucs(key, mapped_object, pre_mapped_ucs_dn, unicode(old_dn, 'utf8'), old, new)) or (not old_dn and not self.sync_from_ucs(key, mapped_object, pre_mapped_ucs_dn, old_dn, old, new))):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2754, in sync_from_ucs
    f(self, property_type, object)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 105, in disable_user_from_ucs
    return s4connector.disable_user_from_ucs(key, object)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2126, in disable_user_from_ucs
    ucs_admin_object = univention.admin.objects.get(self.modules[object_key], co='', lo=self.lo, position='', dn=object_ucs['dn'])
  File "/usr/lib/pymodules/python2.7/univention/admin/objects.py", line 111, in get
    raise univention.admin.uexceptions.noObject(dn)
noObject: uid=ia16vk0qvv,cn=users,dc=AutoTest091,dc=local
noObject: uid=nhhmyia6wm,cn=users,dc=AutoTest091,dc=local
noObject: uid=dgjebuto,CN=Users,dc=AutoTest091,dc=local
noObject: uid=pfj9lwf5wy,CN=Users,dc=AutoTest091,dc=local
noObject: uid=kspq5kw7sy,cn=kw1d9ol0xd,dc=AutoTest091,dc=local
noObject: uid=e8r4eg9fjs,cn=users,dc=AutoTest091,dc=local
noObject: uid=jcm7iseavu,CN=Users,dc=AutoTest091,dc=local
noObject: uid=bh7m48wn9p,dc=AutoTest091,dc=local
noObject: uid=hm01tu13xc,cn=users,dc=AutoTest091,dc=local
noObject: uid=zmlxcoom6r,CN=Users,dc=AutoTest091,dc=local
noObject: uid=nz997ab9ah,CN=Users,dc=AutoTest091,dc=local
noObject: uid=c2dx9lh8qf,CN=Users,dc=AutoTest091,dc=local
noObject: uid=gn31cfrrae,dc=AutoTest091,dc=local
noObject: uid=hqukmf2b0r,cn=users,dc=AutoTest091,dc=local
noObject: uid=pp22izko4n,CN=Users,dc=AutoTest091,dc=local
noObject: uid=bs4w335yoi,cn=users,dc=AutoTest091,dc=local
noObject: uid=pvof8wo4ew,CN=Users,dc=AutoTest091,dc=local
noObject: uid=2amjm7än,cn=users,dc=AutoTest091,dc=local
noObject: uid=mtiofcpu0b,cn=users,dc=AutoTest091,dc=local
noObject: uid=fpuawvhl42,cn=ôke\\\+â:)êĝ,dc=AutoTest091,dc=local
noObject: uid=whp9wlj32r,CN=Users,dc=AutoTest091,dc=local
noObject: uid=ox1z7e6r6f,CN=Users,dc=AutoTest091,dc=local
noObject: uid=dz6uwazo8i,CN=Users,dc=AutoTest091,dc=local
noObject: uid=ks6valizgl,ou=vs8kokw7lq,dc=AutoTest091,dc=local
noObject: uid=umc_test_user_ftz6pq,cn=users,dc=AutoTest091,dc=local
noObject: uid=ayfr21vw,cn=users,dc=AutoTest091,dc=local
noObject: uid=umc_test_user_chj2ol,CN=Users,dc=AutoTest091,dc=local
noObject: uid=umc_test_user_chj2ol_admin,CN=Users,dc=AutoTest091,dc=local
noObject: uid=eju4073xse,cn=users,dc=AutoTest091,dc=local
noObject: uid=czspfws1on,cn=users,dc=AutoTest091,dc=local
noObject: uid=hxjrbxaa,CN=Users,dc=AutoTest091,dc=local
noObject: uid=ln1wmpkrux,CN=Users,dc=AutoTest091,dc=local
noObject: uid=Xprdhkm2sxk,cn=q5x151o5zv,cn=fo1fywuq3r,dc=AutoTest091,dc=local
noObject: uid=umc_test_user_pe6grv,cn=users,dc=AutoTest091,dc=local
noObject: uid=9l9zgwt0,cn=users,dc=AutoTest091,dc=local
noObject: uid=3enydf7i,cn=users,dc=AutoTest091,dc=local
noObject: uid=eetyn1xafl,CN=Users,dc=AutoTest091,dc=local
noObject: uid=az5jjfz4bn,cn=users,dc=AutoTest091,dc=local
noObject: uid=30tf3zrm,cn=users,dc=AutoTest091,dc=local
noObject: uid=dxkm8nz3dy,CN=Users,dc=AutoTest091,dc=local
noObject: uid=j9no2e9elx,CN=Users,dc=AutoTest091,dc=local
noObject: uid=ybspecrmun,cn=users,dc=AutoTest091,dc=local
noObject: uid=7e5ixae8pa,ou=ẑhuß#`\>ĵ ŝ,dc=AutoTest091,dc=local
noObject: uid=fxxkr8kyhd,cn=users,dc=AutoTest091,dc=local
noObject: uid=ot476imv9e,CN=Users,dc=AutoTest091,dc=local
noObject: uid=xhi9nif13m,CN=Users,dc=AutoTest091,dc=local
noObject: uid=zsunbd1j,cn=users,dc=AutoTest091,dc=local
noObject: uid=fcpn94xrmu,cn=users,dc=AutoTest091,dc=local
noObject: uid=oeneiyoxvm,cn=users,dc=AutoTest091,dc=local
noObject: uid=Xprdhkm2sxk,cn=q5x151o5zv,ou=temporary_move_container_1562854465.1,dc=AutoTest091,dc=local
noObject: uid=k7kb611uwx,cn=users,dc=AutoTest091,dc=local
noObject: uid=tlm421bgqi,CN=Users,dc=AutoTest091,dc=local
noObject: uid=umc_test_user_hsl28h,CN=Users,dc=AutoTest091,dc=local
noObject: uid=cigaju4enz,cn=users,dc=AutoTest091,dc=local
noObject: uid=nevn4y0z0y,cn=users,dc=AutoTest091,dc=local
noObject: uid=cwjxmyzlbw,CN=Users,dc=AutoTest091,dc=local
…

We should add simple error handling.
Comment 1 Florian Best univentionstaff 2019-09-25 13:57:44 CEST
*** Bug 49883 has been marked as a duplicate of this bug. ***
Comment 2 Florian Best univentionstaff 2019-09-26 15:29:25 CEST
Patch in git:fbest/49876-no-object-in-disable-user: simply ignore exception and log a warning.
It's the last post_con_modify_functions, so there are no follow up errors.
Comment 3 Florian Best univentionstaff 2019-10-07 10:09:09 CEST
Branch test succeeded, no traceback in connector-s4.log:
https://jenkins.knut.univention.de:8181/job/UCS-4.4/job/UCS-4.4-2/view/Product%20Tests/job/product-test-samba-s4-connector/7/
Comment 4 Florian Best univentionstaff 2019-10-10 15:30:16 CEST
Patch applied, ignoring not existing (already removed) objects.

univention-s4-connector (13.0.2-49)
ad67796e02ea | Bug #49876: ignore removed objects in disable_user_from_ucs()

univention-s4-connector.yaml
ad67796e02ea | Bug #49876: ignore removed objects in disable_user_from_ucs()
Comment 5 Arvid Requate univentionstaff 2019-10-10 22:14:51 CEST
Verified:
* Code review
* Advisory
Comment 6 Arvid Requate univentionstaff 2019-11-06 14:40:59 CET
<http://errata.software-univention.de/ucs/4.4/330.html>