failed to create vm with "libvirt.libvirtError: virStreamSend() failed"

Bug #1270588 reported by Nobuto Murata
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Libvirt Python
Fix Released
Undecided
libvirt-python (Ubuntu)
Fix Released
High
Robie Basak

Bug Description

failed to create vm.

$ uvt-kvm create foo
Warning: this CLI is experimental and may change.
Traceback (most recent call last):
  File "/usr/bin/uvt-kvm", line 597, in <module>
    main(sys.argv[1:])
  File "/usr/bin/uvt-kvm", line 593, in main
    args.func(parser, args)
  File "/usr/bin/uvt-kvm", line 436, in main_create
    unsafe_caching=args.unsafe_caching,
  File "/usr/bin/uvt-kvm", line 308, in create
    "%s-ds.qcow" % hostname, hostname, user_data_fobj)
  File "/usr/bin/uvt-kvm", line 164, in create_ds_volume
    new_volume_name, f, pool_name=POOL_NAME)
  File "/usr/lib/python2.7/dist-packages/uvtool/libvirt/__init__.py", line 67, in create_volume_from_fobj
    pool_name=pool_name
  File "/usr/lib/python2.7/dist-packages/uvtool/libvirt/__init__.py", line 96, in _create_volume_from_fobj_with_size
    stream.sendAll(handler, None)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4769, in sendAll
    ret = self.send(got)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4806, in send
    if ret == -1: raise libvirtError ('virStreamSend() failed')
libvirt.libvirtError: virStreamSend() failed

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: uvtool-libvirt 0~bzr66-0ubuntu1 [modified: usr/share/uvtool/libvirt/template.xml]
ProcVersionSignature: Ubuntu 3.13.0-4.19-generic 3.13.0-rc8
Uname: Linux 3.13.0-4-generic x86_64
ApportVersion: 2.13.1-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Jan 20 00:01:26 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-10-15 (96 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Beta amd64 (20131014)
PackageArchitecture: all
SourcePackage: uvtool
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :

After bisecting packages, it seems to be caused by upgrading python-libvirt from 1.2.0-2ubuntu1 to 1.2.1-0ubuntu1.

Revision history for this message
Robie Basak (racb) wrote :

Reproduced, thanks. This makes uvtool completely unusable.

Changed in uvtool (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Robie Basak (racb) wrote :

This is an upstream regression in libvirt-python.

affects: uvtool (Ubuntu) → libvirt-python (Ubuntu)
Changed in libvirt-python (Ubuntu):
assignee: nobody → Robie Basak (racb)
status: Triaged → In Progress
Revision history for this message
In , Robie (robie-redhat-bugs) wrote :

Created attachment 854371
Fix caller to match callee prototype

I don't see a libvirt-python component, so filing this under libvirt.

Description of problem:

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

git master: de8361627c4f3fa2a1f8dd164ef80c5f0a6a17f6

How reproducible:

100%

Steps to Reproduce:

0. Assuming you start with a volume pool defined called 'default' with no volumes defined in it.

1. virsh vol-create-as default foo 1048576 --format raw

2. In Python:

conn = libvirt.open('qemu:///system')
pool = libvirt_conn.storagePoolLookupByName('default')
vol = pool.storageVolLookupByName('foo')
stream = conn.newStream(0)
vol.upload(stream, 0, 1048576, 0)
stream.send('A' * 65536)

Actual results:

libvirt.libvirtError: virStreamSend() failed

Expected results:

Silent success.

Additional info:

Impact: stops the Python binding from being able to upload volumes to libvirt completely.

Regression caused by commit d40861. Patch attached.

Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
In , Daniel (daniel-redhat-bugs) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt-python - 1.2.1-0ubuntu2

---------------
libvirt-python (1.2.1-0ubuntu2) trusty; urgency=medium

  * d/p/virStream-send-regression: fix regression in send function
    (LP: #1270588).
 -- Robie Basak <email address hidden> Thu, 23 Jan 2014 13:05:33 +0000

Changed in libvirt-python (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
In , Daniel (daniel-redhat-bugs) wrote :

Changing component, since bz admins have created libvirt-python now

Changed in libvirt-python:
importance: Unknown → Undecided
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.