Bug 1058720 - Unable to complete install: ''virStream' object has no attribute 'upload''
Summary: Unable to complete install: ''virStream' object has no attribute 'upload''
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-28 12:25 UTC by Michal Privoznik
Modified: 2014-01-28 15:02 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-28 15:02:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Michal Privoznik 2014-01-28 12:25:11 UTC
Description of problem:

When trying to install a guest throught virt-manager I see this error:

Unable to complete install: ''virStream' object has no attribute 'upload''

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 91, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1948, in do_install
    guest.start_install(meter=meter)
  File "/usr/share/virt-manager/virtinst/guest.py", line 371, in start_install
    self._prepare_install(meter, dry)
  File "/usr/share/virt-manager/virtinst/guest.py", line 264, in _prepare_install
    util.make_scratchdir(self.conn, self.type))
  File "/usr/share/virt-manager/virtinst/installer.py", line 199, in prepare
    self._prepare(guest, meter, scratchdir)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 438, in _prepare
    self._prepare_kernel_url(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 362, in _prepare_kernel_url
    fetcher.meter, kernel, initrd)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 289, in _upload_media
    kvol = _upload_file(conn, meter, pool, kernel)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 133, in _upload_file
    stream.upload(vol, offset, length, flags)
AttributeError: 'virStream' object has no attribute 'upload'


Version-Release number of selected component (if applicable):
both libvirt-python and virt-manager are running current git HEAD:

v1.2.1-rc2-1-gea9339c  for libvirt-python
v0.10.0-712-gffda1e8  for virt-manager

How reproducible:


Steps to Reproduce:
1. install a new guest via HTTP
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Daniel Berrangé 2014-01-28 12:33:51 UTC
This is actually a virt-manager bug. The 'upload' method is against the virStorageVol object instance, not the virStream instance. Due to a bug in the python code generator we had accidentally copied the 'upload' method to virStream class too, and this bug was fixed, thus removing this bogus duplicated methods. virt-manager needs to use  vol.upload(stream....) not stream.upload(vol....)

Comment 2 Cole Robinson 2014-01-28 15:02:31 UTC
Fixed upstream now


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