Bug 50338 - listener failed loading of modules during upgrade(?!)
listener failed loading of modules during upgrade(?!)
Status: NEW
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-10 12:45 CEST by Florian Best
Modified: 2019-10-17 16:36 CEST (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:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
2019-10-10/AutotestUpgrade-s4connector-listener.log (1.72 MB, text/x-log)
2019-10-10 12:45 CEST, Florian Best
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-10-10 12:45:28 CEST
Created attachment 10201 [details]
2019-10-10/AutotestUpgrade-s4connector-listener.log

There are a lot of error happening during the upgrade when the listener (re)loads modules:

Today our daily jenkins tests contained the following tracebacks:

4 times:
Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/faillog.py", line 42, in <module>
    from univention.admin.handlers.users.user import unmapLocked
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 60, in <module>
    from univention.admindiary.client import write_event
 ImportError: No module named admindiary.client



2 times:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/admin/syntax.py", line 80, in import_syntax_files
    with open(fn, 'r') as fd:
 IOError: [Errno 2] No such file or directory: '/usr/lib/pymodules/python2.7/univention/admin/syntax.d/mailinglist_name.py'



15 times:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/listener/api_adapter.py", line 158, in _handler
    self._module_handler.error_handler(dn, old, new, command, exc_type, exc_value, exc_traceback)
  File "/usr/lib/pymodules/python2.7/univention/listener/api_adapter.py", line 155, in _handler
    self._module_handler.create(dn, new)
  File "/usr/lib/univention-directory-listener/system/app_attributes.py", line 194, in create
    self._write_json_without_some_debug_output()
  File "/usr/lib/univention-directory-listener/system/app_attributes.py", line 66, in _write_json_without_some_debug_output
    self._write_json()
  File "/usr/lib/univention-directory-listener/system/app_attributes.py", line 79, in _write_json
    app_objs = search_objects('appcenter/app', self.lo, self.po)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/udm.py", line 120, in search_objects
    module = _get_module(_module, _lo, _pos)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/udm.py", line 66, in _get_module
    _update_modules()
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/udm.py", line 62, in _update_modules
    udm_modules.update()
  File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 121, in update
    os.path.walk(dir, _walk, p)
  File "/usr/lib/python2.7/posixpath.py", line 239, in walk
    walk(name, func, arg)
  File "/usr/lib/python2.7/posixpath.py", line 231, in walk
    func(arg, top, names)
  File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 106, in _walk
    m = __import__(mod, globals(), locals(), name)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/__init__.py", line 46, in <module>
    os.path.walk(path, __walk, path)
  File "/usr/lib/python2.7/posixpath.py", line 231, in walk
    func(arg, top, names)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/__init__.py", line 42, in __walk
    computers.append(__import__(file_[: -3], globals(), locals(), ['']))
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/linux.py", line 38, in <module>
    from univention.admin.handlers.computers.__base import ComputerObject
 ImportError: No module named __base


15 times:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/listener/api_adapter.py", line 155, in _handler
    self._module_handler.create(dn, new)
  File "/usr/lib/univention-directory-listener/system/app_attributes.py", line 194, in create
    self._write_json_without_some_debug_output()
  File "/usr/lib/univention-directory-listener/system/app_attributes.py", line 66, in _write_json_without_some_debug_output
    self._write_json()
  File "/usr/lib/univention-directory-listener/system/app_attributes.py", line 79, in _write_json
    app_objs = search_objects('appcenter/app', self.lo, self.po)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/udm.py", line 120, in search_objects
    module = _get_module(_module, _lo, _pos)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/udm.py", line 66, in _get_module
    _update_modules()
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/udm.py", line 62, in _update_modules
    udm_modules.update()
  File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 121, in update
    os.path.walk(dir, _walk, p)
  File "/usr/lib/python2.7/posixpath.py", line 239, in walk
    walk(name, func, arg)
  File "/usr/lib/python2.7/posixpath.py", line 231, in walk
    func(arg, top, names)
  File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 106, in _walk
    m = __import__(mod, globals(), locals(), name)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/__init__.py", line 46, in <module>
    os.path.walk(path, __walk, path)
  File "/usr/lib/python2.7/posixpath.py", line 231, in walk
    func(arg, top, names)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/__init__.py", line 42, in __walk
    computers.append(__import__(file_[: -3], globals(), locals(), ['']))
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/linux.py", line 38, in <module>
    from univention.admin.handlers.computers.__base import ComputerObject
 ImportError: No module named __base


Attached is the full listener.log.
I hope this is fixed when we fully migrated to dh_python.
Comment 1 Florian Best univentionstaff 2019-10-17 10:24:00 CEST
Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/faillog.py", line 42, in <module>
    from univention.admin.handlers.users.user import unmapLocked
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 53, in <module>
    import univention.admin.handlers.groups.group
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/groups/group.py", line 1010, in <module>
    identify = object.identify
 AttributeError: type object 'object' has no attribute 'identify'