Bug 43550 - UMC AppCenter uses univention.uldap instead of univention.admin.uldap
UMC AppCenter uses univention.uldap instead of univention.admin.uldap
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-4-errata
Assigned To: Florian Best
Dirk Wiesenthal
:
Depends on:
Blocks: 43556
  Show dependency treegraph
 
Reported: 2017-02-15 17:00 CET by Florian Best
Modified: 2017-02-16 11:29 CET (History)
3 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?: 4: Will affect most installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.411
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017021521000568, 2017021521000764, 2017021521000728
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments
patch (1.86 KB, patch)
2017-02-15 17:05 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-02-15 17:00:32 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'
Comment 1 Florian Best univentionstaff 2017-02-15 17:05:06 CET
Created attachment 8427 [details]
patch
Comment 2 Florian Best univentionstaff 2017-02-15 17:05:27 CET
@Dirk: why was univention.uldap used?
Comment 3 Erik Damrose univentionstaff 2017-02-15 17:11:49 CET
I can reproduce this on a fresh UCS 4.1-4e396
Comment 4 Florian Best univentionstaff 2017-02-15 17:35:27 CET
Quick workaround:
sed -i "/^superordinate = 'settings/cn'/d' /usr/share/pyshared/univention/admin/handlers/appcenter/app.py
Comment 5 Dirk Wiesenthal univentionstaff 2017-02-15 17:43:10 CET
(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.
Comment 6 Florian Best univentionstaff 2017-02-15 17:53:01 CET
(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
Comment 7 Florian Best univentionstaff 2017-02-15 18:01:12 CET
univention-appcenter (5.0.23-54):
r76711 | Bug #43550: adapt error handling in case cn=apps,cn=univention does not exists
Comment 8 Dirk Wiesenthal univentionstaff 2017-02-16 00:07:33 CET
4.1: OK
4.2: OK
YAML: OK
Comment 9 Stefan Gohmann univentionstaff 2017-02-16 06:46:26 CET
Increasing to a setup problem because the basic App installation is defined as part of the setup.
Comment 10 Janek Walkenhorst univentionstaff 2017-02-16 11:29:13 CET
<http://errata.software-univention.de/ucs/4.1/397.html>