Bug 1647740 - RFE: Enhanced Python error reporting [rhel-7.6.z]
Summary: RFE: Enhanced Python error reporting [rhel-7.6.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nbdkit
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1613946
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-08 09:30 UTC by Oneata Mircea Teodor
Modified: 2018-11-27 01:19 UTC (History)
9 users (show)

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.
Clone Of: 1613946
Environment:
Last Closed: 2018-11-27 01:19:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3658 0 None None None 2018-11-27 01:19:27 UTC

Description Oneata Mircea Teodor 2018-11-08 09:30:18 UTC
This bug has been copied from bug #1613946 and has been proposed to be backported to 7.6 z-stream (EUS).

Comment 3 mxie@redhat.com 2018-11-09 06:25:39 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

Comment 5 errata-xmlrpc 2018-11-27 01:19:19 UTC
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


Note You need to log in before you can comment on or make changes to this bug.