Bug 32671 - appcenter/app create fails on i386
appcenter/app create fails on i386
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Felix Botner
Stefan Gohmann
: interim-3
Depends on:
Blocks: 32414
  Show dependency treegraph
 
Reported: 2013-09-24 10:23 CEST by Stefan Gohmann
Modified: 2013-11-19 06:42 CET (History)
1 user (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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2013-09-24 10:23:14 CEST
In tests the following command fails on i386:

root@master181:~# udm appcenter/app create --set name=test --set id=test --set version=test
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 222, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 394, in doit
    out=_doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 657, in _doit
    input[name].append(value)
AttributeError: 'str' object has no attribute 'append'
root@master181:~#

The problem seems to be the line "superordinate='settings/cn'", because the following code iterates over both modules (settings/cn and appcenter/app):
  for mod, (properties,options) in information.items():

In settings/cn the attribute 'name' is single value, in appcenter/app the attribute 'name' is multi value.
Comment 1 Felix Botner univentionstaff 2013-10-17 17:27:01 CEST
module_information() in admincli/admin.py saved the properties for the module and identifier properties for all superordinate modules in a dict. This datastructure is used to check if an argument is a valid property and to get the type of the property (multivalue). But if a this data structure contains information about multiple modules (the module and its superordinate module) it could happen that the types for the properties get mixed up.

I can't see any reason to save properties from the superordinate module in module_information because we want to create a new module object, not a new object of the superordinate module. 

-> module_information() only save properties of the module, not the superordinate modules
Comment 2 Stefan Gohmann univentionstaff 2013-10-30 14:29:35 CET
Code: OK
Test: OK
Changelog: OK
Comment 3 Stefan Gohmann univentionstaff 2013-11-19 06:42:56 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".