Bug 52956 - During upgrade to UCS 5.0: ImportError: No module named misc
During upgrade to UCS 5.0: ImportError: No module named misc
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 4.4-8-errata
Assigned To: Philipp Hahn
Florian Best
: interim-8
Depends on: 52063
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-19 11:51 CET by Florian Best
Modified: 2021-05-19 18:01 CEST (History)
2 users (show)

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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-03-19 11:51:02 CET
univention.misc has been removed in Bug #52063.

LISTENER    ( ERROR   ) : import of filename=/usr/lib/univention-directory-listener/system/ldap_server.py failed
Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/ldap_server.py", line 39, in <module>
    import univention.misc
ImportError: No module named misc

We need to add a dependency in the listener for the new univention-python version.
Comment 1 Florian Best univentionstaff 2021-03-19 11:59:57 CET
No changelog required, interim version.

univention-directory-listener (14.0.5-2)
4ef37cdfc807 | Bug #52956: fix dependency on python-univention
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2021-03-25 18:07:51 CET
Looks good to me - no traceback/problem found so far
→ VERIFIED
Comment 4 Philipp Hahn univentionstaff 2021-05-14 11:57:41 CEST
`univention.misc` was removed from `python-univention` by 14ab7349dc1e0d190d8ef0320bfe95d73c5b24f6 via Bug #52063
- During the upgrade the new version of `python-univention` is installed
- UDL is restarted
- the *old* `listener/ldap_server.py` tries to import `univention.misc`

management/univention-directory-listener/listener/ldap_server.py
> 39 import univention.misc

This import statement in UCS-4.4-8 is unnecessary as no functionality from that module is used. That line was removed for UCS-5 with e419beddedeee0eddecfc99e0dba15daa389aa35.

The change to UCS-5.0-0 4ef37cdfc807 is wrong:
- the broken version is already installed by 4.4-x
- `python-univention (>= 13)` makes this worse as this pulls in the version where `univention.misc` is removed

The correct fix is to
- fix UDL in 4.4-8 and remove line 39 there - cherry-pick e419beddedeee0eddecfc99e0dba15daa389aa35
- optionally revert 14ab7349dc1e0d190d8ef0320bfe95d73c5b24f6

Alternative:
- Add `Breaks: univention-directory-listener (<< 14.0.0-3)` to `python-univention` to force an upgrade of UDL brefore the upgrade of u-python
Comment 5 Philipp Hahn univentionstaff 2021-05-14 13:16:31 CEST
[4.4-8] 6c7f2bfe29 Bug #52063 UDL: remove use of univention.misc
 management/univention-directory-listener/debian/changelog        | 6 ++++++
 management/univention-directory-listener/listener/ldap_server.py | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

Package: univention-directory-listener
Version: 13.0.3-3A~4.4.0.202105141206
Branch: ucs_4.4-0-errata4.4-8
Scope: errata4.4-8

[4.4-8] a7ff048d8a Bug #52956: univention-directory-listener 13.0.3-3A~4.4.0.202105141206
 doc/errata/staging/univention-directory-listener.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 6 Florian Best univentionstaff 2021-05-15 19:22:25 CEST
OK: functionality not used
OK: traceback disappeared during upgrade
OK: YAML