Bug 52403 - remove misleading traceback when creating OUs through UMC
remove misleading traceback when creating OUs through UMC
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v8-errata
Assigned To: Daniel Tröder
Tobias Wenzel
:
Depends on:
Blocks: 52449
  Show dependency treegraph
 
Reported: 2020-11-20 12:42 CET by Daniel Tröder
Modified: 2021-02-10 09:27 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.006
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 Daniel Tröder univentionstaff 2020-11-20 12:42:24 CET
When creating school object (OUs) through the UMC "Schulen" module, a lot of UDM errors are logged to /v/l/u/management-console-module-schoolwizards.log:

------------------------------------------------------------------
20.11.20 12:39:56.675  MODULE      ( PROCESS ) : Creating Container(name='ucsschool', school='', dn='cn=ucsschool,cn=groups,dc=uni,dc=dtr', old_dn=None)
20.11.20 12:39:56.677  ADMIN       ( ERROR   ) : Creating 'cn=ucsschool,cn=groups,dc=uni,dc=dtr' failed: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1254, in _create
    self.lo.add(self.dn, al, serverctrls=serverctrls, response=response)
  File "/usr/lib/python2.7/dist-packages/univention/admin/uldap.py", line 857, in add
    raise univention.admin.uexceptions.objectExists(dn)
objectExists: cn=ucsschool,cn=groups,dc=uni,dc=dtr
------------------------------------------------------------------

Those tracebacks can be avoided, so the user doesn't get confused and real errors are easier to spot.
Comment 1 Daniel Tröder univentionstaff 2020-11-20 12:45:18 CET
A code line was added to ucs-school-lib/python/models/group.py that checks if a container exists, before trying to create it. That prevents the UDM error message.

Branch: dtroeder/52403_remove_traceback_when_creating_ou 4d17b5d08
Commit: Bug #52403: don't try to create already existing containers
Comment 2 Tobias Wenzel univentionstaff 2020-11-30 09:42:41 CET
QA → All OK → Please build and merge

Code looks good.
Before fix:

  File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1254, in _create
    self.lo.add(self.dn, al, serverctrls=serverctrls, response=response)
  File "/usr/lib/python2.7/dist-packages/univention/admin/uldap.py", line 857, in add
    raise univention.admin.uexceptions.objectExists(dn)
objectExists: cn=ouadmins,cn=groups,dc=wenzel-univention,dc=intranet


After fix → no traceback.
Comment 3 Daniel Tröder univentionstaff 2020-11-30 10:08:18 CET
Merged and built.

[4.4] 5f429d84a Bug #52403: don't try to create already existing containers
[4.4] cea08ca81 Bug #52403: Merge branch 'dtroeder/52403_remove_traceback_when_creating_ou' into 4.4
[4.4] e4ce5e9f3 Bug #52403: changelog and advisory
[4.4] 16b81a4a6 Bug #52403: advisory update

ucs-school-lib (12.2.3)
Comment 4 Tobias Wenzel univentionstaff 2020-11-30 12:50:36 CET
QA → All OK → VERIFY

changelog OK
yaml & version OK
no merge conflicts OK
Comment 5 Ole Schwiegert univentionstaff 2021-02-10 09:27:41 CET
Errata updates for UCS@school 4.4 v8 have been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v8-de.html

If this error occurs again, please clone this bug.