Bug 1589776

Summary: virt-v2v subpackage should Require nbdkit and nbdkit-plugin-python2
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: mxie, mzhan, ptoscano, rjones, tzheng, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: libguestfs-1.38.2-7.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1608718 (view as bug list) Environment:
Last Closed: 2018-10-30 07:45:56 UTC Type: Bug
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: 1519486    
Bug Blocks:    

Description Richard W.M. Jones 2018-06-11 11:37:48 UTC
Description of problem:

The new ‘virt-v2v -o rhv-upload’ and ‘virt-v2v -it vddk’ features
added in RHEL 7.5 & 7.6 require nbdkit to function.

Previously we relied on either RHV Ansible scripts installing
the right dependencies or the user to install the dependencies
manually, but it makes sense to depend on nbdkit and the
nbdkit-plugin-python2 package so they are pulled in automatically.

‘-it vddk’ depends only on nbdkit.

‘-o rhv-upload’ depends on nbdkit and nbdkit-plugin-python2.
Although the latter package pulls in nbdkit, maybe we should mention
both.

These are not particularly large extra dependencies.  It will
pull in Python (which is definitely already installed as it's
needed by yum etc), python2-libs, nbdkit, libselinux and gnutls.

(‘-o rhv-upload’ also requires the Python oVirt SDK but we cannot
add that since it's not in RHEL).

Version-Release number of selected component (if applicable):

libguestfs 1.38

Comment 4 mxie@redhat.com 2018-07-16 10:25:28 UTC
Verify the bug with builds:
virt-v2v-1.38.2-7.el7.x86_64
libguestfs-1.38.2-7.el7.x86_64

Steps:
1.Prepare a rhel7.6 minimal system and configure correct repos in /etc/yum.repos.d/, related nbdkit packages would be installed during installing virt-v2v

# yum install virt-v2v
....
nbdkit                         x86_64 1.2.4-4.el7       libvirt_ci           56 k
nbdkit-plugin-python-common    x86_64 1.2.4-4.el7       libvirt_ci           19 k
nbdkit-plugin-python2          x86_64 1.2.4-4.el7       libvirt_ci           18 k
....

2.Check virt-v2v dependence status
#yum deplist virt-v2v
....
dependency: nbdkit
   provider: nbdkit.x86_64 1.2.4-4.el7
dependency: nbdkit-plugin-python2
   provider: nbdkit-plugin-python2.x86_64 1.2.4-4.el7
....



Result:
   Virt-v2v has depended on nbdkit and nbdkit-plugin-python2


Hi rjones,

   (1)As below shown,rhv-upload conversion will be failed without installing python-ovirt-engine-sdk4, but the error just said "No module named ovirtsdk4 ", customers may don't know what package is needed, do you think this error should be improved? Thanks!
....
# virt-v2v -ic vpx://vsphere.local%5cAdministrator.73.141/data/10.73.75.219/?no_verify=1  esx6.7-rhel7.5-x86_64 -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 -of raw --password-file /tmp/passwd -on t
Traceback (most recent call last):
  File "/var/tmp/rhvupload.hN4Zly/rhv-upload-plugin.py", line 32, in <module>
    import ovirtsdk4 as sdk
ImportError: No module named ovirtsdk4
nbdkit: error: /var/tmp/rhvupload.hN4Zly/rhv-upload-plugin.py: error running this script
virt-v2v: error: nbdkit Python plugin is not installed or not working.  It 
is required if you want to use ‘-o rhv-upload’.

See also "OUTPUT TO RHV" in the virt-v2v(1) manual.

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]
.....

Comment 5 Richard W.M. Jones 2018-07-17 11:11:32 UTC
We can't unfortunately depend on the ovirt SDK because the packages
for that are only available in the RHV Layered Product.  I guess
we might improve the error message to specify what precisely is needed.

The real solution is to move the oVirt SDK package into RHEL but
that's tricky for other reasons.

Comment 6 mxie@redhat.com 2018-07-17 13:58:49 UTC
Have filed bug1601943 to track "improve the error message", so move the bug from ON_QA to VERIFIED

Comment 8 errata-xmlrpc 2018-10-30 07:45:56 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/RHEA-2018:3021