Univention Bugzilla – Bug 43550
UMC AppCenter uses univention.uldap instead of univention.admin.uldap
Last modified: 2017-02-16 11:29:13 CET
Affected/Broken since: Bug #43423 because UDM now finds the superordinate for the app automatically and then some consistency checks are done. In svn r61838, r62115 one sees that the appcenter passes the wrong class since a long time. But why? Version: 4.1-4 errata396 (Vahr) Remark: install kopano webapp Execution of command 'appcenter/invoke_dry_run' has failed: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 281, in execute function(self, request) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 341, in invoke_dry_run self.invoke(request) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 129, in _deferred return func(self, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 656, in _decorated return function(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 190, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 515, in invoke forbidden, warnings = application.check_invokation(function, self.package_manager) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 1244, in check_invokation return _check(True), _check(False) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 1240, in _check reason = method(**kwargs) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 1169, in must_have_no_unmet_dependencies app = app.to_dict(package_manager, domainwide_managed=True) File "%PY2.7%/univention/management/console/modules/decorators.py", line 648, in wrapper return func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 1009, in to_dict res['installations'] = self.get_installations(hosts) File "%PY2.7%/univention/management/console/ldap.py", line 141, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 961, in get_installations app_objs = appcenter_udm_module.lookup(None, lo, None, base=self.ldap_container) File "%PY2.7%/univention/admin/handlers/appcenter/app.py", line 391, in lookup res.append(object(co, lo, None, dn, attributes=attrs)) File "%PY2.7%/univention/admin/handlers/appcenter/app.py", line 362, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes) File "%PY2.7%/univention/admin/handlers/__init__.py", line 592, in __init__ self._validate_superordinate() File "%PY2.7%/univention/admin/handlers/__init__.py", line 622, in _validate_superordinate if self.dn and not self._ensure_dn_in_subtree(self.superordinate.dn, self.lo.parentDn(self.dn)): File "%PY2.7%/univention/admin/handlers/__init__.py", line 627, in _ensure_dn_in_subtree if self.lo.lo.compare_dn(dn, parent): File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 136, in __getattr__ self.__class__.__name__,repr(name) AttributeError: ReconnectLDAPObject has no attribute 'compare_dn'
Created attachment 8427 [details] patch
@Dirk: why was univention.uldap used?
I can reproduce this on a fresh UCS 4.1-4e396
Quick workaround: sed -i "/^superordinate = 'settings/cn'/d' /usr/share/pyshared/univention/admin/handlers/appcenter/app.py
(In reply to Florian Best from comment #2) > @Dirk: why was univention.uldap used? Because it worked. This code is as old as the App Center. We had one opportunity when adding the new umc.ldap.machine_connection but did not do the transition.
(In reply to Dirk Wiesenthal from comment #5) > (In reply to Florian Best from comment #2) > > @Dirk: why was univention.uldap used? > > Because it worked. This code is as old as the App Center. We had one > opportunity when adding the new umc.ldap.machine_connection but did not do > the transition. If you say so, I will apply the patch. I thought it has something to do with the exception or license handling. univention-appcenter (5.0.23-53): r76708 | Bug #43550: use univention.admin.uldap instead of univention.uldap univention-appcenter.yaml: r76710 | YAML Bug #43550
univention-appcenter (5.0.23-54): r76711 | Bug #43550: adapt error handling in case cn=apps,cn=univention does not exists
4.1: OK 4.2: OK YAML: OK
Increasing to a setup problem because the basic App installation is defined as part of the setup.
<http://errata.software-univention.de/ucs/4.1/397.html>