Univention Bugzilla – Bug 53424
ucr commit fails in Module: symlink_portal
Last modified: 2021-10-06 16:48:52 CEST
On a freshly ugraded UCS (from 4.4-8 to 5.0) : running: univention-portal add-default --update ucr commit ends with: Module: symlink_portal Traceback (most recent call last): File "/usr/sbin/ucr", line 67, in <module> ub.main(convertToUtf8(sys.argv[1:])) File "/usr/lib/python3/dist-packages/univention/config_registry/frontend.py", line 824, in main result = handler_func(args, cmd_opts) File "/usr/lib/python3/dist-packages/univention/config_registry/frontend.py", line 307, in handler_commit handlers.commit(ucr, args) File "/usr/lib/python3/dist-packages/univention/config_registry/handler.py", line 1131, in commit self.call_handler(ucr, handler) File "/usr/lib/python3/dist-packages/univention/config_registry/handler.py", line 1150, in call_handler handler((ucr, values)) File "/usr/lib/python3/dist-packages/univention/config_registry/handler.py", line 635, in __call__ run_module(self.module, 'generate', ucr, changed) File "/usr/lib/python3/dist-packages/univention/config_registry/handler.py", line 222, in run_module arg2meth[arg](module)(ucr, changes) File "/etc/univention/templates/modules/symlink_portal.py", line 41, in handler old, new = changes['portal/paths'] ValueError: too many values to unpack (expected 2) ucr get portal/paths /univention/portal/, /univention/umc/ Portal inly shows Univention Blog once logged in as domain admin.
Can confirm, happens to us too.
Same here, both on a system updated from 4.4-8 to 5.0 and on a freshly installed 5.0 as well. The latter is on errata 65.
Same on freshly installed 5.0 servers (5.0-0-Errata109)
This can be triggered by just calling > ucr commit For UCS 5.0 3c8d090c10d16acbb8fcdf3ebc52f8b1f8b453f7 changed the API for handler() to be more consistent (Bug #30127), but in case of "ucr commit" `handler()` is still called with `Dict[str, str]` instead of `Dict[str, Tuple[str, str]]`. This is the real bug which needs to be fixed: Always call `handler(UCR, Dict[str, Tuple[str, str]])` The documentation on <http://docs.software-univention.de/developer-reference-5.0.html#ucr:module> still does not match the implementation. [5.0-0] 8e196da0f4 test[ucr] Delay Autoload.AWAYS test base/univention-config-registry/tests/test_ucr.py | 3 +++ 1 file changed, 3 insertions(+) [5.0-0] 4d4debce12 refactor[ucr] Rewrite as list comprehension base/univention-config-registry/python/univention/config_registry/handler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) [5.0-0] dd11f6480d fix[ucr] Always call handler() with 2-tuple dict base/univention-config-registry/python/univention/config_registry/handler.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) [5.0-0] 3493450e2e refactor[ucr]: Use Python module function name base/univention-config-registry/python/univention/config_registry/handler.py | 13 ++++--------- base/univention-config-registry/tests/test_handler.py | 14 +++++++------- 2 files changed, 11 insertions(+), 16 deletions(-) [5.0-0] 71a0644f00 style[ucr] Separate lookup from call base/univention-config-registry/python/univention/config_registry/handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) [5.0-0] 1443d4bbbe fix[ucr] Always call handler() with 2-tuple dict base/univention-config-registry/debian/changelog | 6 ++++++ doc/errata/staging/univention-config-registry.yaml | 12 ++++++++++++ 2 files changed, 18 insertions(+) Package: univention-config-registry Version: 15.0.7-10A~5.0.0.202110032201 Branch: ucs_5.0-0 Scope: errata5.0-0 [5.0-0] fcdbadb33a Bug #53424: univention-config-registry 15.0.7-10A~5.0.0.202110032201 doc/errata/staging/univention-config-registry.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) QA: git diff 5e46c1cc9b..fcdbadb33a <https://git.knut.univention.de/univention/ucs/-/compare/5e46c1cc...fcdbadb33a?from_project_id=3>
Problem not reproducible: OK Code review: OK Cleanups/refactorings: OK Automated tests:OK Verified
<https://errata.software-univention.de/#/?erratum=5.0x110>