Bug 29632 - "ucr search" liefert keine ldap/forced-Werte zurück
"ucr search" liefert keine ldap/forced-Werte zurück
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Philipp Hahn
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-07 11:53 CET by Sönke Schwardt-Krummrich
Modified: 2013-05-30 10:28 CEST (History)
7 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:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2012-12-07 11:53:37 CET
Werden UCR-Variablen über LDAP-Richtlinien oder via --force gesetzt, wird der aktuelle gültige (LDAP-/Forced-)Wert nicht via "ucr search" zurückgegeben. Stattdessen wird immer der Wert aus dem normal-Layer zurückgegeben.

# ucr set testvar=normal
Create testvar
# ucr get testvar; ucr search testvar
normal
testvar: normal
# ucr set --ldap-policy testvar=ldap
Create testvar
# ucr get testvar; ucr search testvar
ldap
testvar: normal
# ucr set --force testvar=forced
Create testvar
# ucr get testvar; ucr search testvar
forced
testvar: normal
#
Comment 1 Philipp Hahn univentionstaff 2012-12-07 12:33:49 CET
Bug in branches/ucs-3.1/ucs/base/univention-config-registry/python/univention/config_registry/backend.py

	def _merge(self, getscope=False):
		for reg in range(ConfigRegistry.MAX):
...
			for key, value in registry.items():
				if key not in merge:
						merge[key] = ...

Früher stand dort
		for reg in (ConfigRegistry.FORCED, ConfigRegistry.SCHEDULE, ConfigRegistry.LDAP, ConfigRegistry.NORMAL, ConfigRegistry.CUSTOM):

Derzeit wird statt dessen folgene Reihenfolge verwendet:
	NORMAL, LDAP, SCHEDULE, FORCED, CUSTOM, MAX = range(6)

diff --git a/branches/ucs-3.1/ucs/base/univention-config-registry/python/univention/config_registry/backend.py b/branches/ucs-3.1/ucs/base/univention-config-registry/python/univention/config_registry/backend.py
index 35a4ffd..4fbc4c9 100644
--- a/branches/ucs-3.1/ucs/base/univention-config-registry/python/univention/config_registry/backend.py
+++ b/branches/ucs-3.1/ucs/base/univention-config-registry/python/univention/config_registry/backend.py
@@ -189,7 +189,11 @@ class ConfigRegistry(dict):
 	def _merge(self, getscope=False):
 		"""Merge sub registry."""
 		merge = {}
-		for reg in range(ConfigRegistry.MAX):
+		for reg in (ConfigRegistry.FORCED,
+				ConfigRegistry.SCHEDULE,
+				ConfigRegistry.LDAP,
+				ConfigRegistry.NORMAL,
+				ConfigRegistry.CUSTOM):
 			registry = self._registry[reg]
 			if not isinstance(registry, _ConfigRegistry):
 				continue
Comment 2 Markus Dählmann 2013-03-28 13:48:40 CET
Mir ist dieses Problem soeben auch in unserer UCS 3.1 Produktiv-Umgebung aufgefallen.
Comment 3 Ingo Steuwer univentionstaff 2013-04-17 17:26:40 CEST
Wurde von einem weiteren Kunden beobachtet.
Comment 4 Tim Petersen univentionstaff 2013-05-22 12:50:31 CEST
Erneut aufgefallen.
Comment 5 Tim Petersen univentionstaff 2013-05-22 13:48:12 CEST
Gleiches Verhalten bei ucr dump und ucr shell.
Comment 6 Stefan Gohmann univentionstaff 2013-05-22 13:53:00 CEST
(In reply to comment #5)
> Gleiches Verhalten bei ucr dump und ucr shell.

UCR shell ist kritisch, da das in den Skripten verwendet wird.
Comment 7 Philipp Hahn univentionstaff 2013-05-24 11:51:25 CEST
errata3.1-1:
  univention-config-registry svn40790
  8.0.7-3.426.201305241137
  2013-05-24-univention-config-registry.yaml svn40792

ucs3.1-2:
  univention-config-registry svn40790
  8.0.8-2.425.201305241137
  changelog-3.1-2.tex svn40792
  http://jenkins.knut.univention.de:8080/job/UCS-3.1-2%20Release%20Notes/1232/artifact/changelog/release-notes-3.1-2.pdf

  ucs-test svn40790
  branches/ucs-3.1/ucs-3.1-2/test/ucs-test/tests/03_ucr/50layer-priority
Comment 8 Felix Botner univentionstaff 2013-05-27 13:29:21 CEST
OK - errata3.1-1
OK - yaml

OK - ucs3.1-2
OK - changelog

OK - ucs-test
Comment 9 Moritz Muehlenhoff univentionstaff 2013-05-30 10:28:04 CEST
http://errata.univention.de/ucs/3.1/116.html