Bug 55174 - UCR prints wrong layer name
UCR prints wrong layer name
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Philipp Hahn
Julia Bremer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-09-06 10:03 CEST by Dirk Ahrnke
Modified: 2022-09-13 17:50 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): bitesize
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Ahrnke univentionstaff 2022-09-06 10:03:42 CEST
UCS 5.0-2 e481 (not only to be seen with UCS@S installed)

root@dn1:~# ucr search foo
foo: bar

root@dn1:~# grep foo /etc/univention/base*
/etc/univention/base-ldap.conf:foo: bar
root@dn1:~# udm policies/registry list --filter cn=01_test
cn=01_test
DN: cn=01_test,cn=policies,dc=training,dc=ucs
  ldapFilter: None
  name: 01_test
  registry: foo bar

root@dn1:~# ucr set foo=baz
Create foo
W: foo is overridden by scope "schedule"
root@dn1:~# grep foo /etc/univention/base*
/etc/univention/base.conf:foo: baz
/etc/univention/base.conf.bak:foo: baz
/etc/univention/base-ldap.conf:foo: bar
root@dn1:~# ucr unset foo
Unsetting foo
W: foo is still set in scope "schedule"
Comment 1 Philipp Hahn univentionstaff 2022-09-06 10:16:55 CEST
git:2363f423c47 for Bug #38938 modified univention.config_registry.backend.SCOPE and added `default` at the end, while it should be at the fronte because the layer has lowest priority:

198 »···DEFAULTS, NORMAL, LDAP, SCHEDULE, FORCED, CUSTOM = range(6)

--- base/univention-config-registry/python/univention/config_registry/backend.py
+++ base/univention-config-registry/python/univention/config_registry/backend.py
@ 89,-1 89,1 @
-SCOPE = ['normal', 'ldap', 'schedule', 'forced', 'custom', 'default']
+SCOPE = ['default', 'normal', 'ldap', 'schedule', 'forced', 'custom']
Comment 2 Philipp Hahn univentionstaff 2022-09-08 16:51:34 CEST
[5.0-2] fec3a95c65 fix[ucr]: printing wrong UCR layer names
 base/univention-config-registry/debian/changelog                             |  6 ++++++
 base/univention-config-registry/python/univention/config_registry/backend.py |  2 +-
 base/univention-config-registry/tests/test_backend.py                        | 13 +++++++++++++
 doc/errata/staging/univention-config-registry.yaml                           | 10 ++++++++++
 4 files changed, 30 insertions(+), 1 deletion(-)

Package: univention-config-registry
Version: 15.0.7-19A~5.0.0.202209081648
Branch: ucs_5.0-0
Scope: errata5.0-2

[5.0-2] 57eb8cfa39 Bug #55174: univention-config-registry 15.0.7-19A~5.0.0.202209081648
 doc/errata/staging/univention-config-registry.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Comment 3 Julia Bremer univentionstaff 2022-09-09 09:03:16 CEST
OK: Correct layer name printed
OK: Test
OK: Jenkins
OK: Yaml

Verified