Univention Bugzilla – Full Text Bug Listing |
Summary: | ucr.load() fails: 'NoneType' object has no attribute 'lower' | ||
---|---|---|---|
Product: | UCS | Reporter: | Florian Best <best> |
Component: | UCR | Assignee: | Philipp Hahn <hahn> |
Status: | CLOSED FIXED | QA Contact: | Florian Best <best> |
Severity: | normal | ||
Priority: | P5 | CC: | hahn |
Version: | UCS 4.0 | Keywords: | interim-1 |
Target Milestone: | UCS 4.2 | Flags: | best:
Patch_Available+
|
Hardware: | Other | ||
OS: | Linux | ||
What kind of report is it?: | Bug Report | What type of bug is this?: | 3: Simply Wrong: The implementation doesn't match the docu |
Who will be affected by this bug?: | 3: Will affect average number of installed domains | How will those affected feel about the bug?: | 2: A Pain – users won’t like this once they notice it |
User Pain: | 0.103 | Enterprise Customer affected?: | |
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2016102421000359, 2016102921000181, 2016110321000566, 2016110321000851, 2016110421000742, 2016111121000489 | Bug group (optional): | Error handling, External feedback |
Max CVSS v3 score: | |||
Bug Depends on: | |||
Bug Blocks: | 42912 | ||
Attachments: | Improve multi-threaded access in UCR |
Description
Florian Best
2014-12-19 12:57:31 CET
The valueb must be set: debian/univention-config.postinst: univention-config-registry set 'ucr/encoding/strict?true' Please check /etc/univention/base.conf for corruption! Is univention-config fully configured: dpkg --configure univention-config Reported again, 4.0-1 errata162 (Walle) Die Ausführung des Kommandos udm/query dns/dns ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/modules/__init__.py", line 176, in _decorated return function(self, request, *args, **kwargs) File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 520, in _thread ucr.load() File "%PY2.7%/univention/config_registry/backend.py", line 106, in load strict = self.is_true('ucr/encoding/strict') File "%PY2.7%/univention/config_registry/backend.py", line 250, in is_true value = self.get(key).lower() # pylint: disable-msg=E1103 AttributeError: 'NoneType' object has no attribute 'lower' Reported again, 4.0-2 errata214 Reported again, 4.0-3 errata292 (Walle) (The same UMCP command) Die Ausführung des Kommandos udm/query dns/dns ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 207, in _decorated return function(self, request, *args, **kwargs) File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 532, in _thread ucr.load() File "%PY2.7%/univention/config_registry/backend.py", line 106, in load strict = self.is_true('ucr/encoding/strict') File "%PY2.7%/univention/config_registry/backend.py", line 250, in is_true value = self.get(key).lower() # pylint: disable-msg=E1103 AttributeError: 'NoneType' object has no attribute 'lower' Remark: Access subnet via DHCP module Version: 4.0-3 errata342 (Walle) Execution of command 'udm/query dhcp/dhcp' has failed: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 207, in _decorated return function(self, request, *args, **kwargs) File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 532, in _thread ucr.load() File "%PY2.7%/univention/config_registry/backend.py", line 106, in load strict = self.is_true('ucr/encoding/strict') File "%PY2.7%/univention/config_registry/backend.py", line 250, in is_true value = self.get(key).lower() # pylint: disable-msg=E1103 AttributeError: 'NoneType' object has no attribute 'lower' As the UCR "ucr/encoding/strict" is set very eraly, this looks like some serious base.conf corruption. But it is set in the postinst of univention-config. Maybe somethings goes wrong? Shouldn't we do: univention-config-registry set 'ucr/encoding/strict?true' || exit 1 ? Created attachment 7218 [details] Improve multi-threaded access in UCR I think is'a a multi-threading problem: > File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 532, in _thread UCR is *not* thread-safe; I can trigger the bug with the attached test_backend_threading.py. 1. UMC uses a global shared instance of ConfigRegistry: univention.management.console.config.ucr 2. there is a (small) time window in load() between the dict.clear() and the loading, where UCR is empty or might miss the required values The attached patch - improves is_true() and is_false() to better handle None - changes load() to not use dict.clear() Reported again, 3.2-8 errata410 (Borgfeld) Reported again, 4.1-2 errata183 (Vahr) Remark: error after enabling DHCP boot policy Reported again, 4.1-2 errata220 (Vahr) Reported again, 4.1-3 errata262 (Vahr) r72644 | Bug #37402 ucr: Make boolean handling more robust. r72646 | Bug #37402 ucr: Improve multi-threaded load Package: univention-config-registry Version: 12.0.0-2A~4.2.0.201609161507 Branch: ucs_4.2-0 r72658 | Bug #37402 ucr: Fix check for corrupted base.conf Fix amd64 build Package: univention-config-registry Version: 12.0.0-3A~4.2.0.201609170709 Branch: ucs_4.2-0 OK: Code review OK: tests OK: API-change, no functions use it like the following: >>> ucr.is_true('update/secure_apt', None) False >>> ucr.is_true('update/secure_apt', None, 'true') True OK: Changelog The change revealed wrong UCR usage in Bug #42527 comment 3. Reported again, 4.1-2 errata202 (Vahr) Reported again, Version: 4.1-3 errata318 (Vahr) Reported again, 4.0-3 errata398 (Walle) Reported again, 3.2-3 errata278 (Borgfeld) Reported again, 4.1-3 errata324 (Vahr) UCS 4.2 has been released: https://docs.software-univention.de/release-notes-4.2-0-en.html https://docs.software-univention.de/release-notes-4.2-0-de.html If this error occurs again, please use "Clone This Bug". |