Bug 32409 - UDM module settings/udm_module
UDM module settings/udm_module
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Arvid Requate
Stefan Gohmann
: interim-3
: 33007 (view as bug list)
Depends on: 32410
Blocks: 32407 32418 32420 32821
  Show dependency treegraph
 
Reported: 2013-08-28 14:32 CEST by Arvid Requate
Modified: 2013-11-19 06:41 CET (History)
4 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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2013-08-28 14:32:48 CEST
A new UDM module udm/module is required for Bug 32407 and Bug 32408.
Comment 1 Arvid Requate univentionstaff 2013-09-05 22:29:36 CEST
The module is implemented as settings/udm_module.
Changelog committed.
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2013-09-27 12:20:39 CEST
OK: changelog entry
FAIL: the module accepts all types of UCS versions:

root@master80:~# udm settings/udm_syntax create --set name=FOO4 --set filename=FOO2.py --set data='QlpoORdyRThQkAAAAAA=' --set package=FOO --set packageversion=1.0.0-0 --set ucsversionstart=DING --set ucsversionend=FOOBAR
Object created: cn=FOO4,dc=nstx,dc=local

OK: changes to the object are only allowed if the old package version is 
    smaller/equal to the new package version (if the version is modified)
OK: renaming of objects
OK: name, filename, data, package, packageversion, appid
Comment 3 Arvid Requate univentionstaff 2013-10-08 11:11:22 CEST
Fixed by using UCS_Version from univention.updater.tools.
Comment 4 Philipp Hahn univentionstaff 2013-10-08 13:39:59 CEST
(In reply to Arvid Requate from comment #3)
> Fixed by using UCS_Version from univention.updater.tools.

Missing / circular dependency:

Package: univention-updater
Depends: python-univention-lib

$ grep -n import.*UCS_Ver univention-lib/python/*
univention-lib/python/ldap_extension.py:12:from univention.updater import UCS_Version
Comment 5 Arvid Requate univentionstaff 2013-10-08 14:55:46 CEST
Circular dependency fixed by copying the UCS_Version definition to python-univention-lib. Bug 32821 was crated to cleanup the code.
Comment 6 Moritz Muehlenhoff univentionstaff 2013-10-11 10:15:43 CEST
This currently breaks the UMC:

univention-lib/python/umc_module.py imports the Python module "magic", but no dependency on python-magic is declared.
Comment 7 Stefan Gohmann univentionstaff 2013-10-11 21:40:57 CEST
(In reply to Moritz Muehlenhoff from comment #6)
> This currently breaks the UMC:
> 
> univention-lib/python/umc_module.py imports the Python module "magic", but
> no dependency on python-magic is declared.

I've added the dependency because this breaks all my tests (r45009).

@Arvid, feel free to re-change.
Comment 8 Arvid Requate univentionstaff 2013-10-14 18:43:59 CEST
Ok, needed to fix a couple of the new UDM syntaxes to be mappable by UMC-module/udm/syntax.
Comment 9 Arvid Requate univentionstaff 2013-10-29 14:50:44 CET
Added a workaround for an import error in syntax.py due to delayed pysupport call during update.
Comment 10 Stefan Gohmann univentionstaff 2013-10-31 14:33:38 CET
I got the following error during the 3.2 upgrade:

root@master501:~# /usr/share/univention-directory-manager-tools/univention-cli-server
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 42, in <module>
    import univention.admincli.adduser
  File "/usr/lib/pymodules/python2.6/univention/admincli/adduser.py", line 39, in <module>
    import univention.admin.config
  File "/usr/lib/pymodules/python2.6/univention/admin/config.py", line 33, in <module>
    import univention.admin.modules
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 44, in <module>
    import univention.admin.syntax
  File "/usr/lib/pymodules/python2.6/univention/admin/syntax.py", line 448, in <module>
    from univention.lib.umc_module import get_mime_type, get_mime_description, image_mime_type_of_buffer
ImportError: No module named umc_module
Comment 11 Stefan Gohmann univentionstaff 2013-10-31 16:34:12 CET
*** Bug 33007 has been marked as a duplicate of this bug. ***
Comment 12 Arvid Requate univentionstaff 2013-10-31 18:46:58 CET
* Added the same workaround as before (try:/except ImportError: pass) in python-udm

* Added a missing dependency of python-umc on python-udm

* Added versioned dependency of python-udm on
  (univention-ldap-server | univention-server-member | univention-basesystem)
  I checked the update of a Master and a Memberserver.

* While I was at it I generalized the versioned dependency of
  shell-univention-lib on python-univention-lib (= ${binary:Version})
Comment 13 Stefan Gohmann univentionstaff 2013-11-01 07:13:38 CET
OK, the tests were successful.
Comment 14 Stefan Gohmann univentionstaff 2013-11-19 06:41: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".