Bug 1778029

Summary: RuntimeError: direct upload to host not supported
Product: Red Hat Enterprise Linux 7 Reporter: Xiaodai Wang <xiaodwan>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED WONTFIX QA Contact: mxie <mxie>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.8CC: jsuchane, juzhou, knoel, mxie, mzhan, nsoffer, ptoscano, rjones, tgolembi, tyan, tzheng, zili
Target Milestone: rcKeywords: Automation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1778031 (view as bug list) Environment:
Last Closed: 2020-04-21 11:12:01 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:    
Bug Blocks: 1778031    
Attachments:
Description Flags
ovirt log none

Description Xiaodai Wang 2019-11-29 04:19:30 UTC
Description of problem:
RuntimeError: direct upload to host not supported

Version-Release number of selected component (if applicable):
libvirt-4.5.0-28.el7.x86_64
qemu-kvm-rhev-2.12.0-38.el7.x86_64
libguestfs-1.40.2-8.el7.x86_64
virt-v2v-1.40.2-8.el7.x86_64
nbdkit-1.8.0-3.el7.x86_64
nbdkit-1.8.0-3.el7.x86_64
nbdkit-plugin-vddk-1.8.0-3.el7.x86_64
nbdkit-plugin-python2-1.8.0-3.el7.x86_64
nbdkit-plugin-python-common-1.8.0-3.el7.x86_64

ovirt:
ovirt-engine-4.3.6.5-0.1.el7.noarch
ovirt-imageio-proxy-1.5.2-0.el7ev.noarch

ovirt node:
vdsm-4.30.33-1.el7ev.x86_64
ovirt-imageio-daemon-1.5.2-0.el7ev.noarch

How reproducible:
Hardly reproduce.

Steps to Reproduce:
The problem occurs when doing rhv-upload by v2v and '-oo rhv-direct' must be given.

e.x.
virt-v2v  -i ova  -ic qemu:///system -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt /home/ova-images/esx-rhel6-ova.tar -on ova_vm_wxq -oc https://xxxx/ovirt-engine/api -op /tmp/rhv_upload_passwd_file -oo rhv-cafile=/tmp/rhv_upload_ca.pem -oo rhv-cluster=NFS -oo rhv-direct 

Actual results:
libguestfs: trace: disk_has_backing_file = 1qemu-img 'convert' '-p' '-n' '-f' 'qcow2' '-O' 'raw' '/var/tmp/v2vovl62e909.qcow2' 'json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.Yo89gB/nbdkit0.sock", "file.export": "/" }'nbdkit: debug: accepted connectionnbdkit: python[1]: debug: newstyle negotiation: flags: global 0x3nbdkit: python[1]: debug: newstyle negotiation: client flags: 0x3nbdkit: python[1]: debug: newstyle negotiation: NBD_OPT_GO: client requested export '/' (ignored)nbdkit: python[1]: debug: python: open readonly=0disk.id = 'a806db7c-3d12-4c05-a782-606b4e555e98'cannot read /etc/vdsm/vdsm.id, using any host: [Errno 2] No such file or directory: '/etc/vdsm/vdsm.id'transfer.id = 'd5d227d2-0120-4fea-9af2-12b65e879096'nbdkit: python[1]: error: /var/tmp/v2v.uUtxcu/rhv-upload-plugin.py: open: error: ['Traceback (most recent call last):
', '  File "/var/tmp/v2v.uUtxcu/rhv-upload-plugin.py", line 227, in open
    raise RuntimeError("direct upload to host not supported, "
', 'RuntimeError: direct upload to host not supported, requires ovirt-engine >= 4.2 and only works when virt-v2v is run within the oVirt/RHV environment, eg. on an oVirt node.
']qemu-img: Could not open 'json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.Yo89gB/nbdkit0.sock", "file.export": "/" }': Failed to read option reply: Unexpected end-of-file before all bytes were readvirt-v2v: error: qemu-img command failed, see earlier errorsrm -rf '/var/tmp/ova.qkrqDn'rm -rf '/var/tmp/v2v.TgrfFV'rm -rf '/var/tmp/v2v.uUtxcu'rm -rf '/var/tmp/v2v.X7bQJ2'rm -rf '/var/tmp/rhvupload.Yo89gB'rm -rf '/var/tmp/null.3m4uO9'libguestfs: trace: closelibguestfs: closing guestfs handle 0x55cb9e38d0f0 (state 0)nbdkit: debug: python: unload

Expected results:
v2v should run successfully.

Additional info:
https://www.redhat.com/archives/libguestfs/2019-November/msg00319.html

Comment 2 Richard W.M. Jones 2019-11-29 08:07:42 UTC
Fixed by Nir yesterday in:
https://www.redhat.com/archives/libguestfs/2019-November/msg00319.html

Comment 3 Richard W.M. Jones 2019-11-29 08:08:46 UTC
I'm dev-acking this bug, although I don't know if we're going to be fixing
much in RHEL 7.8.

Comment 4 Nir Soffer 2019-11-29 14:55:46 UTC
(In reply to Xiaodai Wang from comment #0)
> Expected results:
> v2v should run successfully.

virt-v2v depends on RHV; if RHV fail to start a transfer virt-v2v
must fail. The expected result is clear error in virt-v2v that will
make it easy to debug the failure.

We need RHV logs showing this image transfer.

Comment 5 Xiaodai Wang 2019-11-30 08:40:03 UTC
Created attachment 1640810 [details]
ovirt log

Comment 17 Richard W.M. Jones 2020-04-21 11:12:01 UTC
Closing per comment 16.  This is fixed in RHEL AV 8.2.