Bug 48982

Summary: KeyError: 'rocketchatActivated'
Product: UCS Reporter: Florian Best <best>
Component: UMC (Generic)Assignee: Dirk Wiesenthal <wiesenthal>
Status: CLOSED FIXED QA Contact: Florian Best <best>
Severity: normal    
Priority: P5 CC: wiesenthal
Version: UCS 4.4   
Target Milestone: UCS 4.4-0-errata   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=52169
https://forge.univention.org/bugzilla/show_bug.cgi?id=52708
What kind of report is it?: Bug Report What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.086 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:
Bug Depends on:    
Bug Blocks: 56976    

Description Florian Best univentionstaff 2019-03-13 13:53:34 CET
Version: 4.4-0 errata5 (Blumenthal)

Remark: Nach Update auf 4.4 mit Errata Level 5

Traceback(a36cbecfb5798e553c59e0dc1b16fadb): 
Interner Server-Fehler in "udm/get (users/user)".
Request: udm/get (users/user)

  File "%PY2.7%/notifier/threads.py", line 78, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 531, in _get
    for opt in module.get_options(udm_object=obj):
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 1092, in get_options
    obj_options.extend(AppAttributes.options_for_obj(obj))
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 282, in options_for_obj
    if obj[option_def['attribute_name']] == option_def['boolean_values'][0]:
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 466, in __getitem__
    elif key not in self.__no_default and self.descriptions[key].editable:
KeyError: 'rocketchatActivated'
Comment 1 Florian Best univentionstaff 2019-03-13 14:56:43 CET
Remark:

Rocketchat WAR installiert, auf dem DC-Master.
ich hatte das aber per univention-app remove rocketchat wieder gelöscht.

Gibt es oder gab es da Probleme?
Comment 2 Dirk Wiesenthal univentionstaff 2019-03-14 13:53:26 CET

*** This bug has been marked as a duplicate of bug 48895 ***
Comment 3 Florian Best univentionstaff 2019-03-15 18:30:22 CET
(In reply to Dirk Wiesenthal from comment #2)
> 
> *** This bug has been marked as a duplicate of bug 48895 ***

I could trigger this again:
Open a user object in users module, move the extended attribute into the ldap base (or remove them or whatever), save the user object. Boom:

Interner Server-Fehler in "udm/get (users/user)".
Request: udm/get (users/user)

  File "%PY2.7%/notifier/threads.py", line 78, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 532, in _get
    for opt in module.get_options(udm_object=obj):
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 976, in get_options
    obj_options.extend(AppAttributes.options_for_obj(obj))
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 165, in options_for_obj
    if obj[option_def['attribute_name']] == option_def['boolean_values'][0]:
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 466, in __getitem__
    elif key not in self.__no_default and self.descriptions[key].editable:
KeyError: u'nextcloudEnabled'
Comment 4 Dirk Wiesenthal univentionstaff 2019-03-19 16:33:12 CET
Fixed in
  univention-appcenter 8.0.11-5A~4.4.0.201903191629

I could only reproduce this when moving the container out of cn=custom attributes. In this case they are not considered by UDM, so they should not be found by the listener.

I assume this holds for extended_options as well.
Comment 5 Dirk Wiesenthal univentionstaff 2019-03-19 16:33:43 CET
(In reply to Dirk Wiesenthal from comment #4)
> I could only reproduce this when moving the container out of ...

"moving the attribute", not the container
Comment 6 Florian Best univentionstaff 2019-03-20 12:26:06 CET
OK: works
Comment 7 Arvid Requate univentionstaff 2019-03-27 13:29:31 CET
<http://errata.software-univention.de/ucs/4.4/29.html>