Bug 1798175 - Regression: KVM Importing fails due to missing readinto function on the StreamAdapter
Summary: Regression: KVM Importing fails due to missing readinto function on the Strea...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.40.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.4.0
: 4.40.7
Assignee: Steven Rosenberg
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks: 1667488 1798425
TreeView+ depends on / blocked
 
Reported: 2020-02-04 18:12 UTC by Steven Rosenberg
Modified: 2020-06-23 15:51 UTC (History)
3 users (show)

Fixed In Version: vdsm-4.40.7
Clone Of:
Environment:
Last Closed: 2020-05-20 20:02:34 UTC
oVirt Team: Virt
Embargoed:
rbarry: ovirt-4.4?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 106757 0 master MERGED Core: Missing readinto function on StreamAdapter 2020-09-11 15:55:20 UTC

Internal Links: 1798425

Description Steven Rosenberg 2020-02-04 18:12:59 UTC
Description of problem: KVM import fails due to a change in the ovirt-imageio module that request the StreamAdapter object to have the readinto function [1].

This causes a failure in the kvm2ovirt log:

  
[    0.4] preparing for copy
[    0.4] Copying disk 1/1 to /rhev/data-center/mnt/vserver-spider.eng.lab.tlv.redhat.com:_pub_srosenbe_engine__44/b05445db-5f5b-4af1-b142-84fc00cecbd2/images/43995af1-88d6-48ee-a4f2-90857ebfc1a1/3950d906-6960-4b18-b7e7-1093fa07771b
    (0/100%)^M    (100/100%)^MTraceback (most recent call last):
  File "/usr/libexec/vdsm/kvm2ovirt", line 23, in <module>
    kvm2ovirt.main()
  File "/usr/lib/python3.6/site-packages/vdsm/kvm2ovirt.py", line 255, in main
    handle_volume(con, diskno, src, dst, options)
  File "/usr/lib/python3.6/site-packages/vdsm/kvm2ovirt.py", line 206, in handle_volume
    download_disk(sr, estimated_size, None, dst, options.bufsize)
  File "/usr/lib/python3.6/site-packages/vdsm/kvm2ovirt.py", line 151, in download_disk
    op.run()
  File "/usr/lib64/python3.6/site-packages/ovirt_imageio_common/ops.py", line 62, in run
    self._run()
  File "/usr/lib64/python3.6/site-packages/ovirt_imageio_common/ops.py", line 144, in _run
    self._receive_chunk(buf, count)
  File "/usr/lib64/python3.6/site-packages/ovirt_imageio_common/ops.py", line 158, in _receive_chunk
    n = self._src.readinto(view[read:])
AttributeError: 'StreamAdapter' object has no attribute 'readinto'


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


How reproducible:


Steps to Reproduce:
1. Within the Virtual Machine View of the engine, choose the more button and import.
2. Choose a KVM external import and choose next for both screens
3.

Actual results:

The Importing fails in the engine with the following error:

2020-02-04 18:27:40,503+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-73) [6ec92c94] EVENT_ID: IMPORTEXPORT_IMPORT_VM_FAILED(1,153), Failed to import Vm KVM_centos7.0_ISO to Data Center DC_44, Cluster Cluster_44

The vdsm fails with the following error:

2020-02-04 18:27:23,313+0200 ERROR (v2v/20ab7d6f) [root] Job '20ab7d6f-98e7-46ac-824c-97fe6a9306e3' failed (v2v:865)
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/vdsm/v2v.py", line 860, in _run
    self._import()
  File "/usr/lib/python3.6/site-packages/vdsm/v2v.py", line 885, in _import
    self._proc.returncode))
vdsm.v2v.V2VProcessError: Job '20ab7d6f-98e7-46ac-824c-97fe6a9306e3' process failed exit-code: 1

The actual error is in the kvm2ovirt import log.


Expected results:

The Import should succeed.


Additional info:


[1] https://github.com/oVirt/ovirt-imageio/blob/master/common/ovirt_imageio_common/ops.py#L158

Comment 1 meital avital 2020-04-16 13:03:01 UTC
Verified on version:
ovirt-engine-4.4.0-0.29.master.el8ev.noarch
vdsm-4.40.9-1.el8ev.x86_64
qemu-kvm-4.2.0-17.module+el8.2.0+6131+4e715f3b.x86_64
libvirt-daemon-6.0.0-16.module+el8.2.0+6131+4e715f3b.x86_64

verification scenario:
1. Within the Virtual Machine View of the engine, choose the more button and import.
2. Choose a KVM external import and choose next for both screens
3. Verify import succeed, run imported VM and verify VM is running.
4. Import the same KVM VM again, this time as a clone.
5. Verify import succeed, run imported VM and verify VM is running.

Comment 2 Sandro Bonazzola 2020-05-20 20:02:34 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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