Description of problem: virt-v2v use nbdkit's Python plugin to write to RHV (bug 1557273). We do this to allow us to use the Python API to RHV. However when a Python call fails we don't always print the full stack trace. I added support for doing this to nbdkit today: https://github.com/libguestfs/nbdkit/commit/72c0d64a47db642cafa89884f2ee554bd0b8e822 and we should support this in RHEL 7 too. Version-Release number of selected component (if applicable): nbdkit-1.2.4-4.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. See comment below.
Reproducer: (1) Create a file called 'test.py' containing: 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 this command: $ nbdkit -fv python ./test.py foo=bar When the RFE has not been implemented you will see only this: nbdkit: error: ./test.py: config: error: error With the RFE implemented you will see a full traceback: 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']
*** Bug 1614187 has been marked as a duplicate of this bug. ***
Requesting exception for RHEL 7.6. It's a small change and easily tested, and it will greatly improve the logs/errors collected from customer machines deploying IMS 1.0.
Verify the bug with builds: nbdkit-plugin-python-common-1.8.0-1.el7.x86_64 nbdkit-plugin-python2-1.8.0-1.el7.x86_64 nbdkit-1.8.0-1.el7.x86_64 nbdkit-plugin-vddk-1.8.0-1.el7.x86_64 Steps: 1.Create a file called 'test.py' with below content: $ 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: ['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: nbdkit 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-2019:2015