Bug 1647740
| Summary: | RFE: Enhanced Python error reporting [rhel-7.6.z] | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Oneata Mircea Teodor <toneata> |
| Component: | nbdkit | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.6 | CC: | jherrman, juzhou, mtessun, mxie, mzhan, rjones, tzheng, xiaodwan, zili |
| Target Milestone: | rc | Keywords: | FutureFeature, ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | nbdkit-1.2.6-1.el7_6.2 | Doc Type: | Enhancement |
| Doc Text: |
The Python plug-in for the nbdkit tool suite has been enhanced to print full stack traces when errors occur in Python scripts. As a result, certain error messages that can be generated when converting a virtual machine to Red Hat Virtualization using the virt-v2v utility now provide significantly more information.
|
Story Points: | --- |
| Clone Of: | 1613946 | Environment: | |
| Last Closed: | 2018-11-27 01:19:19 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1613946 | ||
| Bug Blocks: | |||
|
Description
Oneata Mircea Teodor
2018-11-08 09:30:18 UTC
Reproduce the bug with builds:
nbdkit-1.2.6-1.el7_6.1.x86_64
nbdkit-plugin-python2-1.2.6-1.el7_6.1.x86_64
nbdkit-plugin-python-common-1.2.6-1.el7_6.1.x86_64
Reproduce steps:
1.Create a file called 'test.py' containing:
$ cat test.py
def function():
raise RuntimeError("error")
def config(key, value):
function()
def open(readonly):
raise RuntimeError("open")
def get_size(h):
raise RuntimeError("get_size")
def pread(h, count, offset):
raise RuntimeError("pread")
2.Run command:
$ nbdkit -fv python2 ./test.py foo=bar
nbdkit: debug: TLS disabled: could not load TLS certificates
nbdkit: debug: registering plugin /usr/lib64/nbdkit/plugins/nbdkit-python2-plugin.so
nbdkit: debug: registered plugin /usr/lib64/nbdkit/plugins/nbdkit-python2-plugin.so (name python)
nbdkit: debug: python: load
nbdkit: debug: python: config key=script, value=./test.py
nbdkit: debug: python: config key=foo, value=bar
nbdkit: error: ./test.py: config: error: error
Verify the bug with latest builds:
nbdkit-1.2.6-1.el7_6.2.x86_64
nbdkit-plugin-python2-1.2.6-1.el7_6.2.x86_64
nbdkit-plugin-python-common-1.2.6-1.el7_6.2.x86_64
Steps:
1.Execute the command of reproduce step2 again
$ nbdkit -fv python2 ./test.py foo=bar
nbdkit: debug: TLS disabled: could not load TLS certificates
nbdkit: debug: registering plugin /usr/lib64/nbdkit/plugins/nbdkit-python2-plugin.so
nbdkit: debug: registered plugin /usr/lib64/nbdkit/plugins/nbdkit-python2-plugin.so (name python)
nbdkit: debug: python: load
nbdkit: debug: python: config key=script, value=./test.py
nbdkit: debug: python: config key=foo, value=bar
nbdkit: error: ./test.py: config: error: ['Traceback (most recent call last):\n', ' File "./test.py", line 4, in config\n function()\n', ' File "./test.py", line 2, in function\n raise RuntimeError("error")\n', 'RuntimeError: error\n']
Result:
After updating nbdkit, we can get full traceback when a Python call fails, so move the bug from ON_QA to VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3658 |