Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1693283 - Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
Summary: Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in...
Keywords:
Status: POST
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nbdkit
Version: 7.7
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-27 13:11 UTC by zhoujunqin
Modified: 2019-03-27 19:47 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)
virt-v2v debug log (deleted)
2019-03-27 13:11 UTC, zhoujunqin
no flags Details

Description zhoujunqin 2019-03-27 13:11:10 UTC
Created attachment 1548576 [details]
virt-v2v debug log

Description of problem:
Useless info displays during virt-v2v conversion:
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored


Version-Release number of selected component (if applicable):
virt-v2v-1.40.2-2.el7.x86_64
libguestfs-1.40.2-2.el7.x86_64
libvirt-4.5.0-10.el7_6.6.x86_64
qemu-kvm-rhev-2.12.0-25.el7.x86_64
python-2.7.5-81.el7.x86_64
python-libs-2.7.5-81.el7.x86_64


How reproducible:
100*

Steps to Reproduce:
1. Convert a vm from esxi server to rhv by virt-v2v command.

# virt-v2v -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-debian9.6-x86_64-bug1481930  --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem  -oo rhv-direct=true -oo rhv-cluster=nfs -of raw 
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[   0.2] Opening the source -i libvirt -ic vpx://root@10.73.73.141/data/10.73.75.219/?no_verify=1 esx6.7-debian9.6-x86_64-bug1481930
[   2.5] Creating an overlay to protect the source from being modified
...

Actual results:
Info displays during conversion:
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored

Expected results:
Fix it.

Additional info:

Comment 2 Richard W.M. Jones 2019-03-27 13:50:20 UTC
FWIW there is nothing in virt-v2v which calls any function called dump_plugin.
I wonder if it's something to do with the oVirt SDK.

Comment 3 Tomáš Golembiovský 2019-03-27 14:23:38 UTC
Looks like nbdkit issue to me.

What is the version of nbdkit?

Comment 4 Tomáš Golembiovský 2019-03-27 14:28:36 UTC
Please include also version of the python plugin, i.e. nbdkit-plugin-python2 RPM

Comment 5 Richard W.M. Jones 2019-03-27 19:14:15 UTC
From the log the command which fails is:

nbdkit python '/var/tmp/v2v.dvwZLS/rhv-upload-plugin.py' --dump-plugin >/dev/null
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored

Comment 6 Richard W.M. Jones 2019-03-27 19:19:32 UTC
I'm able to reproduce this locally with:

nbdkit-1.8.0-1.el7.x86_64
nbdkit-plugin-python2-1.8.0-1.el7.x86_64
nbdkit-plugin-python-common-1.8.0-1.el7.x86_64
python-ovirt-engine-sdk4-4.3.0-2.20190315gitfd728f8.el7.x86_64

With the ./rhv-upload-plugin.py file copied from the rhel-7.7 branch of the virt-v2v
sources:

$ nbdkit python2 ./rhv-upload-plugin.py --dump-plugin >/dev/null
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored

Comment 7 Richard W.M. Jones 2019-03-27 19:33:11 UTC
A minimal reproducer for this:

----------- /tmp/plugin.py ---
import logging

def open(readonly):
    pass

def get_size(h):
    pass

def pread(h, count, offset):
    pass
------------------------------

$ nbdkit python /tmp/plugin.py --dump-plugin  >/dev/null
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored

Removing "import logging" makes the warning go away.

Comment 8 Richard W.M. Jones 2019-03-27 19:47:09 UTC
OK I see, it's just a warning caused by a left over Python error.  I fixed
it upstream:

https://github.com/libguestfs/nbdkit/commit/466b92be2fd0af2cf734ccc567c39c11586c7be3


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