Bug 37560 - KeyError: 'reinstalltext' when saving DC slave
KeyError: 'reinstalltext' when saving DC slave
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Computers
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Florian Best
Drees Dormann
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-19 08:50 CET by Florian Best
Modified: 2015-02-24 08:24 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
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:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments
reinstalltext.patch (6.29 KB, patch)
2015-02-06 11:26 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 2015-01-19 08:50:00 CET
4.0-0 errata31 (Walle)

Traceback:
Die Ausführung des Kommandos udm/put ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py",
line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line
408, in _thread
    module.modify(properties)
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line
159, in _decorated
    return func(*args, **kwargs)
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line
139, in wrapper_func
    ret = func(*args, **kwargs)
  File
"/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line
531, in modify
    obj.modify()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 364, in
modify
    return self._modify(modify_childs,ignore_license=ignore_license)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 823, in
_modify
    ml=self._ldap_modlist()
  File
"/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/domaincontroller_slave.py",
line 604, in _ldap_modlist
    ml=univention.admin.handlers.simpleComputer._ldap_modlist( self )
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2292, in
_ldap_modlist
    ml = ml + super( simpleComputer, self )._ldap_modlist( )
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 659, in
_ldap_modlist
    diff_ml = self.diff()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 127, in
diff
    if self.descriptions[key].multivalue:
KeyError: 'reinstalltext'
Comment 1 Tim Petersen univentionstaff 2015-02-03 14:45:35 CET
This currently breaks server-password-change at least at one internal system -> metod
Comment 2 Tim Petersen univentionstaff 2015-02-04 12:10:41 CET
Reported 2015020421000252
Comment 3 Florian Best univentionstaff 2015-02-04 12:21:23 CET
"ändern wir den Rechner 'Groupware' z.B. im Attribut "Bescheibung" in der UMC-Weboberfläche"

computers/domaincontroller_slave which exists in LDAP
The full ldif is at the mentioned ticket.
Comment 4 Florian Best univentionstaff 2015-02-05 11:02:54 CET
This was introduced by Bug #35537 in svn r54938. The 'reinstalltext' property has been removed. It still exists in the layout and in the mapping.
Comment 5 Florian Best univentionstaff 2015-02-05 11:07:30 CET
It can be reproduced by adding the LDAP attribute "univentionServerInstallationText" to a computer object and modifying it then.
Comment 6 Tim Petersen univentionstaff 2015-02-05 12:50:26 CET
From my point of view this is more serious as "error handling" indicates - it's a regression and it prevents basic features like server password change (and quite certainly more) to work. What about a rejoin? Will it fail because the object is not editable?
Comment 7 Florian Best univentionstaff 2015-02-06 11:26:34 CET
Created attachment 6649 [details]
reinstalltext.patch

Attached a patch which can be applied with the following command:
patch -d /usr/share/pyshared/univention/admin/ -p7 -i /root/reinstalltext.patch
Comment 8 Florian Best univentionstaff 2015-02-10 16:30:46 CET
Fixed by applying the patch.
Fix: svn r57943
YAML: 2015-02-10-univention-directory-manager-modules.yaml
Comment 9 Florian Best univentionstaff 2015-02-11 10:07:01 CET
Drees, could you do the QA for this?
Please reproduce with the following computer types:
computers/domaincontroller_backup
computers/domaincontroller_master
computers/domaincontroller_slave
computers/memberserver

To reproduce you can set the LDAP attribute of the computers using ldapvi:
e.g. install ldapvi on your system and execute the command there:
eval "$(ucr shell)"; ldapvi --discover --host localhost:7389 -D "uid=Administrator,cn=users,$ldap_base" -w univention
Then add to the specific objects:
univentionServerInstallationText: foobar

Having this should cause the above traceback when trying to modify the object via UMC / CLI.
Comment 10 Drees Dormann univentionstaff 2015-02-11 13:39:39 CET
Tested for following object types:

computers/domaincontroller_backup
computers/domaincontroller_master
computers/domaincontroller_slave
computers/memberserver

Traceback could be reproduced without patch. After patch was applied the error didn't occur anymore.

Yaml OK
Comment 11 Moritz Muehlenhoff univentionstaff 2015-02-24 08:24:29 CET
http://errata.univention.de/ucs/4.0/89.html