Bug 38665 - opening setup wizard fails due to ignored import errors
opening setup wizard fails due to ignored import errors
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC - Setup wizard
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-x
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-08 19:07 CEST by Florian Best
Modified: 2019-01-03 07:16 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.137
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
list of installed packages of the system (156.71 KB, text/plain)
2015-06-09 12:13 CEST, Ingo Steuwer
Details
apt sources used on the system (724 bytes, application/x-compressed-tar)
2015-06-09 12:14 CEST, Ingo Steuwer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-06-08 19:07:10 CEST
Die Ausführung des Kommandos setup/apps/query wizard ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 282, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 316, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 460, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 282, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/setup/__init__.py", line 710, in apps_query
    return util.get_apps(True)
  File "%PY2.7%/univention/management/console/modules/setup/util.py", line 696, in get_apps
    package_manager = PackageManager(
NameError: global name 'PackageManager' is not defined


Remark:
UCS-Einrichtungsassistent auf einem DC Slave geöffnet

Version:
4.0-2 errata205 (Walle)

The reason is the code """
 56 try:
 57 »   # execute imports in try/except block as during build test scripts are
 58 »   # triggered that refer to the netconf python submodules... and this
 59 »   # reference triggers the import below
 60 »   import dns.resolver
 61 »   import dns.reversename
 62 »   import dns.exception
 63 »   import univention.management.console.modules.appcenter.app_center as app_center
 64 »   from univention.lib.package_manager import PackageManager
 65 except ImportError as e:
 66 »   MODULE.warn('Ignoring import error: %s' % e)
"""
Comment 1 Florian Best univentionstaff 2015-06-09 11:21:28 CEST
I got the corresponding error log message:
"Ignoring import error: No module named appcenter.app"
Comment 2 Florian Best univentionstaff 2015-06-09 12:11:21 CEST
The system was updated from UCS 3.X to UCS 4.0. After this the module "Setup wizard" was shown (another bug), the traceback occurred when opening this module.
The system only used official package sources.

@Dirk
The "appcenter.app" module only exists in the 4.0 docker scope, right?
Comment 3 Ingo Steuwer univentionstaff 2015-06-09 12:13:53 CEST
Created attachment 6950 [details]
list of installed packages of the system
Comment 4 Ingo Steuwer univentionstaff 2015-06-09 12:14:15 CEST
Created attachment 6951 [details]
apt sources used on the system
Comment 5 Florian Best univentionstaff 2015-06-09 12:32:55 CEST
It could be this line which fails, not the docker thing:

management/univention-management-console-module-appcenter/umc/python/appcenter/app_center.py:import univention.admin.handlers.appcenter.app as appcenter_udm_module

This would mean that the register_ldap_extension failed.
Comment 6 Florian Best univentionstaff 2015-06-09 12:37:17 CEST
The system was a DC Slave. The failure should be fixed after "univention-run-join-scripts".
Comment 7 Florian Best univentionstaff 2015-06-09 12:57:44 CEST
From the discussion with Dirk we assume the following:
* the listener failed when doing registerLdapExtension so that the appcenter.app handler is not installed

* we should not import a handler module directly but use univention.admin.modules.get('appcenter/app') instead (because only then extended attributes are also evaluated). The check for None can be implemented then and a failure will only occur at runtime not on import time. As it is the system-setup module there will be no runtime error as that code is not used by system-setup.
Comment 8 Stefan Gohmann univentionstaff 2019-01-03 07:16:24 CET
This issue has been filled against UCS 4.0. The maintenance with bug and security fixes for UCS 4.0 has ended on 31st of May 2016.

Customers still on UCS 4.0 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.