Univention Bugzilla – Full Text Bug Listing |
Summary: | Improve error handling of setup scripts: write traceback to frontend | ||
---|---|---|---|
Product: | UCS | Reporter: | Florian Best <best> |
Component: | UMC - Setup wizard | Assignee: | Florian Best <best> |
Status: | CLOSED FIXED | QA Contact: | Jürn Brodersen <brodersen> |
Severity: | normal | ||
Priority: | P5 | ||
Version: | UCS 4.1 | ||
Target Milestone: | UCS 4.2-1-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=44483 https://forge.univention.org/bugzilla/show_bug.cgi?id=43745 |
||
What kind of report is it?: | Bug Report | What type of bug is this?: | 6: Setup Problem: Issue for the setup process |
Who will be affected by this bug?: | 2: Will only affect a few installed domains | How will those affected feel about the bug?: | 4: A User would return the product |
User Pain: | 0.274 | Enterprise Customer affected?: | |
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2016112921000044, 2017070621000254 | Bug group (optional): | Error handling, External feedback, Troubleshooting |
Max CVSS v3 score: |
Description
Florian Best
2016-12-09 17:58:35 CET
The problem here is the error handling in SetupScript: » » except Exception as e: » » » self.error(str(e)) This writes an empty string as error message to the progress. We don't know which exception it was. The original error comes from usr/lib/univention-system-setup/scripts/90_postjoin/10admember. Instead we should write the traceback into the progress, so that this is sent for all unhandled exceptions. All other setup scripts already handle exceptions well, so that no additional tracebacks would occur. If they need to pass a error string message to the frontend they can (and already do) call "self.error(message); return False" in inner_run(). Bug #43277 comment 2 also happens due to this. univention-system-setup (10.0.10-37): r82080 | Bug #43152: improve error handling of SetupScript by sending tracebacks to the frontend. univention-system-setup.yaml: r82081 | YAML Bug #43152 *** Bug 45016 has been marked as a duplicate of this bug. *** Looks good to me :) What I tested: cd /usr/share/pyshared/univention/management/console/modules/setup/ python -c "from setup_script import SetupScript; foo = SetupScript(); foo.run()" > /tmp/test.log Content of /tmp/test.log: """ __ERR__:Traceback (most recent call last): File "setup_script.py", line 310, in run success = self.inner_run() File "setup_script.py", line 334, in inner_run raise NotImplementedError('Define your own inner_run() method, please.') NotImplementedError: Define your own inner_run() method, please. Traceback (most recent call last): File "setup_script.py", line 310, in run success = self.inner_run() File "setup_script.py", line 334, in inner_run raise NotImplementedError('Define your own inner_run() method, please.') NotImplementedError: Define your own inner_run() method, please. """ -> OK YAML -> OK |