Bug 53589 - schoolwizards/schools/remove: univention.admin.uexceptions.ldapError: Operation not allowed on non-leaf
schoolwizards/schools/remove: univention.admin.uexceptions.ldapError: Operati...
Status: RESOLVED WORKSFORME
Product: UCS@school
Classification: Unclassified
Component: UMC - Wizards
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v1
Assigned To: Ole Schwiegert
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-16 20:29 CEST by Christian Castens
Modified: 2021-11-16 09:47 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.183
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021071521000023
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Castens univentionstaff 2021-07-16 20:29:07 CEST
Version: 5.0-0 errata44

Error:
Interner Server-Fehler in "schoolwizards/schools/remove (schoolwizards/schools)".
Request: schoolwizards/schools/remove (schoolwizards/schools)

Traceback (most recent call last):
  File "%PY3%/univention/admin/uldap.py", line 870, in delete
    return self.lo.delete(dn)
  File "%PY3%/univention/uldap.py", line 208, in _decorated
    return func(self, *args, **kwargs)
  File "%PY3%/univention/uldap.py", line 888, in delete
    self.lo.delete_s(dn)
  File "%PY3%/ldap/ldapobject.py", line 558, in delete_s
    return self.delete_ext_s(dn,None,None)
  File "%PY3%/ldap/ldapobject.py", line 1247, in delete_ext_s
    return self._apply_method_s(SimpleLDAPObject.delete_ext_s,*args,**kwargs)
  File "%PY3%/ldap/ldapobject.py", line 1197, in _apply_method_s
    return func(self,*args,**kwargs)
  File "%PY3%/ldap/ldapobject.py", line 551, in delete_ext_s
    resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
  File "%PY3%/ldap/ldapobject.py", line 749, in result3
    resp_ctrl_classes=resp_ctrl_classes
  File "%PY3%/ldap/ldapobject.py", line 756, in result4
    ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
  File "%PY3%/ldap/ldapobject.py", line 329, in _ldap_call
    reraise(exc_type, exc_value, exc_traceback)
  File "%PY3%/ldap/compat.py", line 44, in reraise
    raise exc_value
  File "%PY3%/ldap/ldapobject.py", line 313, in _ldap_call
    result = func(*args,**kwargs)
ldap.NOT_ALLOWED_ON_NONLEAF: {'desc': 'Operation not allowed on non-leaf', 'info': 'subordinate objects must be deleted first'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "%PY3%/univention/management/console/base.py", line 344, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "%PY3%/six.py", line 693, in reraise
    raise value
  File "%PY3%/univention/management/console/base.py", line 247, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY3%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY3%/univention/management/console/modules/schoolwizards/__init__.py", line 242, in _decorated
    ret = func(self, request, *a, **kw)
  File "%PY3%/ucsschool/lib/school_umc_ldap_connection.py", line 154, in wrapper_func
    return func(*args, **kwargs)
  File "%PY3%/univention/management/console/modules/schoolwizards/__init__.py", line 421, in _delete_obj
    if obj.remove(ldap_user_write):
  File "%PY3%/ucsschool/lib/models/base.py", line 830, in remove
    success = self.remove_without_hooks(lo)
  File "%PY3%/ucsschool/lib/models/school.py", line 648, in remove_without_hooks
    success = super(School, self).remove_without_hooks(lo)
  File "%PY3%/ucsschool/lib/models/base.py", line 840, in remove_without_hooks
    udm_obj.remove(remove_childs=True)
  File "%PY3%/univention/admin/handlers/__init__.py", line 869, in remove
    return self._remove(remove_childs)
  File "%PY3%/univention/admin/handlers/__init__.py", line 1557, in _remove
    self.lo.delete(self.dn)
  File "%PY3%/univention/admin/uldap.py", line 881, in delete
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
univention.admin.uexceptions.ldapError: Operation not allowed on non-leaf: subordinate objects must be deleted first

Role: domaincontroller_master

Errno: a3a59c78b3e7e447accfa0bc231d96bf
Comment 1 Ole Schwiegert univentionstaff 2021-10-19 11:52:50 CEST
I could reproduce this error on 5.0 by just deleting my test school.
Comment 3 Ole Schwiegert univentionstaff 2021-11-16 09:47:43 CET
After two days of trying to reproduce the problem in UCS@school 5.0b I could not find any hint in my testing or the code. I have to set this to RESOLVED WORKSFORME

I would hope the problem might have been fixed during the development for the release.

If this problem occurs again we would need some more information (like ldap dump of the schools subtree, /var/log/univention/management-console-module-schoolwizards.log)

If you have a system where this is reproducible let us know!