Univention Bugzilla – Bug 40728
ucr set doesn't set local variable if exists already in another UCR scope
Last modified: 2016-06-22 14:21:42 CEST
UCR variables which are set in LDAP aren't set in base.conf if they get set by a joinscript via variable?value syntax. This might cause problems in unjoinscripts when they get removed again but actually aren't removed. Should we change anything here? Reported in Ticket #2016020821000323. # ucr set --ldap-policy variable?wert Create variable # grep variable /etc/univention/base.conf # ucr get variable wert # ucr set variable?wert Not updating variable # ucr unset variable W: The config registry variable 'variable' does not exist
Part of the original feedback: Wenn die Variable also lokal nicht vorhanden ist, aber durch den LDAP-Scope bereits vorgegeben ist, wird sie auch lokal nicht gesetzt. Das könnte vielleicht in manchen Situationen zu Problemen führen, wenn der LDAP-Wert später wieder entfernt wird. I can't imagine a problem which might be caused by this.
(In reply to Florian Best from comment #1) > ... > I can't imagine a problem which might be caused by this. Wrong, c.f. Bug 41415 and Bug 40913 :) .
*** Bug 41415 has been marked as a duplicate of this bug. ***
*** Bug 40913 has been marked as a duplicate of this bug. ***
When this behavior is corrected, base/univention-system-activation/scripts/univention-system-activation needs to be adjusted slightly, e.g., as the dpkg-reconfigure call can be removed.
Please also add a test case for this behavior.
Created attachment 7757 [details] proposed patch Is it ok to use has_key() here? Or should I use '$key in ucr._registry[$scope]' directly? Alternatively I could add a scope keyword to the get() function.
Created attachment 7759 [details] test Test for conditional set
r70502: Make conditional "ucr set $key?$value" layer dependent Package: univention-config-registry Version: 11.0.0-4.498.201606211603 r70504: YAML Sorry if my description in the yaml file is to long.
*** Bug 41631 has been marked as a duplicate of this bug. ***
OK: aptitude install '?source-package(univention-config-registry)~i OK: zless /usr/share/doc/univention-config-registry/changelog.Debian.gz FIXED: univention-config-registry.yaml r70505 | Bug #40728 ucr: Fix YAML OK: errata-announce -V --only univention-config-registry.yaml OK: ucr set --force foo?forced # Create foo ucr set --schedule foo?schedule # Create foo ucr set --ldap-policy foo?ldap # Create foo ucr set foo?default # Create foo ucr get foo # forced ucr unset --force foo ucr get foo # schedule ucr unset --schedule foo ucr get foo # ldap ucr unset --ldap-policy foo ucr get foo # default ucr unset foo ucr get foo # OK: ucs-test -s ucr -E dangerous OK: /usr/share/ucs-test/03_ucr/53ucs_set_layer -vvvf r70507 | Bug #40728 test: Add 03/53ucs_set_layer Package: ucs-test Version: 6.0.33-73.1487.201606211721 Branch: ucs_4.1-0 Scope: errata4.1-2
<http://errata.software-univention.de/ucs/4.1/203.html>