Univention Bugzilla – Bug 44394
UnboundLocalError: local variable 'guessed_domain' referenced before assignment
Last modified: 2017-06-19 15:04:52 CEST
Version: 4.1-4 errata324 (Vahr) Traceback(a90e0c857791708c14bfa0477f32506d): Execution of command 'setup/validate wizard' has failed: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 283, in execute function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response result = _multi_response(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/setup/__init__.py", line 515, in validate guessed_domain = guess_domain(obj) File "%PY2.7%/univention/management/console/modules/setup/__init__.py", line 502, in guess_domain if guessed_domain: UnboundLocalError: local variable 'guessed_domain' referenced before assignment
Created attachment 8800 [details] Patch
It's reproducible with the following curl request: curl -i http://Administrator:univention@localhost/univention/command/setup/validate -H 'X-Requested-With: xmlhttprequest' -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"options": {"values": {"ad/member": true, "nameserver1":"127.0.0.1", "domainname": "school.local", "hostname": "master60", "ad/address":"1.2.3.4"}}, "flavor": "wizard"}' I happens only in a scenario where you select to join a Active directory domain and enter a e.g. not reachable IP address. univention-system-setup (10.0.10-19): r79938 | Bug #44394: don't crash at validation if joining into a AD domain and the AD server is not reachable univention-system-setup.yaml: r79941 | YAML Bug #44035 Bug #44394 Bug #43273
I got no traceback when doing the curl-request with the fix anymore. -> Verified. Note: To reproduce the behavior I also had to remove /var/univention-join/joined before executing the curl request.
<http://errata.software-univention.de/ucs/4.2/50.html>