Bug 1416112 - virt-v2v: Import from VMware, Xen and KVM failed with "OSError: [Errno 9] Bad file descriptor" (workaround: upgrade python-cpopen)
Summary: virt-v2v: Import from VMware, Xen and KVM failed with "OSError: [Errno 9] Bad...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: ---
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ovirt-4.1.0-beta
: 4.19.4
Assignee: Tomáš Golembiovský
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On: 1357593
Blocks: 1350465 1356767 1375563 1378340 1388596 1404400
TreeView+ depends on / blocked
 
Reported: 2017-01-24 15:48 UTC by Nisim Simsolo
Modified: 2017-02-15 15:02 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-02-15 15:02:22 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.1+
gklein: blocker+
mgoldboi: planning_ack+
tjelinek: devel_ack+
gklein: testing_ack+


Attachments (Terms of Use)
vdsm.log (319.27 KB, application/x-xz)
2017-01-24 15:52 UTC, Nisim Simsolo
no flags Details
engine.log (38.69 KB, application/x-xz)
2017-01-24 15:52 UTC, Nisim Simsolo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 71157 0 master MERGED spec: Bump requirement on python-cpopen 2017-01-26 11:53:26 UTC
oVirt gerrit 71249 0 ovirt-4.1 MERGED spec: Bump requirement on python-cpopen 2017-01-26 12:41:07 UTC

Description Nisim Simsolo 2017-01-24 15:48:33 UTC
Description of problem:
Trying to import from any external provider (VMware, Xen or KVM) failed with the next vdsm.log Traceback: 
2017-01-24 16:52:37,494 ERROR (v2v/11134c77) [root] Job u'11134c77-fc08-4b64-85db-70d822e87850' failed (v2v:795)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 790, in _run
    self._import()
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 807, in _import
    with self._command.execute() as self._proc:
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 637, in execute
    yield self._start_helper()
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 407, in _start_helper
    stderr=subprocess.STDOUT)
  File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1304, in _simple_exec_cmd
    stdin=stdin, stdout=stdout, stderr=stderr)
  File "/usr/lib64/python2.7/site-packages/cpopen/__init__.py", line 63, in __init__
    **kw)
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/site-packages/cpopen/__init__.py", line 82, in _execute_child_v276
    restore_sigpipe=restore_sigpipe
  File "/usr/lib64/python2.7/site-packages/cpopen/__init__.py", line 137, in _execute_child_v275
    os.close(fd)
OSError: [Errno 9] Bad file descriptor

Version-Release number of selected component (if applicable):
ovirt-engine-4.1.0.2-0.1.el7
libvirt-client-2.0.0-10.el7_3.4.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64
sanlock-3.4.0-1.el7.x86_64
vdsm-4.19.1-1.el7ev.x86_64

How reproducible:
Consistently

Steps to Reproduce:
1. Browse webadmin > VMs tab > import
2. Enter VMware details and start import
3. Try to import also from Xen and KVM providers.

Actual results:
Import failed.

Expected results:
Import should not fail

Additional info:
engine.log and vdsm.log attached.

Comment 1 Nisim Simsolo 2017-01-24 15:52:16 UTC
Created attachment 1243958 [details]
vdsm.log

Comment 2 Nisim Simsolo 2017-01-24 15:52:41 UTC
Created attachment 1243959 [details]
engine.log

Comment 3 Nisim Simsolo 2017-01-25 09:09:59 UTC
Issue is relevant also for vdsm-4.19.2-2.el7ev.x86_64

Comment 4 Tomas Jelinek 2017-01-25 09:54:26 UTC
python-cpopen dependency needs to be bumped.

In ovirt the workaround is to manually yum/dnf update the python-cpopen

Comment 5 Yaniv Kaul 2017-01-25 11:12:02 UTC
(In reply to Tomas Jelinek from comment #4)
> python-cpopen dependency needs to be bumped.
> 
> In ovirt the workaround is to manually yum/dnf update the python-cpopen

Nisim, can you confirm it works?

Comment 6 Nisim Simsolo 2017-01-25 12:30:08 UTC
Yes, latest python-cpopen (python-cpopen-1.5-3.el7.x86_64) is solving the issue.

Comment 7 Eyal Edri 2017-01-29 12:06:52 UTC
How is this an engine bug if the attached patches are from VDSM?
This would make us build engine instead of VDSM.

Comment 9 Eyal Edri 2017-01-29 16:21:00 UTC
How can this has TR 4.19.3 is the current VDSM tag with 4.19.3 doesn't have the attached patches?

Comment 10 Dan Kenigsberg 2017-01-30 07:35:25 UTC
it cannot, my bad.

Comment 11 Nisim Simsolo 2017-02-02 08:46:45 UTC
Verification build:
ovirt-engine-4.1.0.3-0.1.el7
libvirt-client-2.0.0-10.el7_3.4.x86_64
vdsm-4.19.4-1.el7ev.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64
sanlock-3.4.0-1.el7.x86_64
python-cpopen-1.5-1.el7ev.x86_64
rhevm-qe-infra-glance

Verified import from KVM (qemu+ssh and qemu+tcp), Xen and VMware.


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