Bug 653883

Summary: Fails to attach USB device having a 8 or 9 in address
Product: [Fedora] Fedora Reporter: Enrico Scholz <rh-bugzilla>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: ajschult784, berrange, clalance, crobinso, dap78, itamar, jforbes, kas, mgrac, rwahl, veillard, virt-maint, wheeee
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.8.3-4.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-12 22:55:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Enrico Scholz 2010-11-16 11:26:37 UTC
Description of problem:

There seems to be (again) an octal conversion problem when reading usb device addresses. When trying to attach the USB devices below, the '27' one works while '28' causes the "doesn't take value '028'" error:


<hostdev mode='subsystem' type='usb'>
        <source>
                <address bus='2' device='27'/>
        </source>
</hostdev>
Device attached successfully

---

<hostdev mode='subsystem' type='usb'>
        <source>
                <address bus='2' device='28'/>
        </source>
</hostdev>
error: Failed to attach device from /tmp/virsh-attach.0IBtsE
error: operation failed: adding usb-host,hostbus=002,hostaddr=028,id=hostdev7 device failed: Property 'usb-host.hostaddr' doesn't take value '028'


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

libvirt-0.8.3-2.fc14.x86_64
qemu-0.13.0-1.fc14.x86_64


How reproducible:

100%

Comment 1 Ronald Wahl 2010-12-01 19:10:33 UTC
I can second this. But even when no 8 or 9 is in the usb address the device seem not to appear in the VM (but the VM starts). At least I can't see my TomTom navi anymore in my WinXP VM. This used to work under F13.

Comment 2 Ronald Wahl 2010-12-01 19:42:12 UTC
It looks like (not entirely sure) that it works when the device address is smaller than 8. So it might be related to the number parsing issue.

Comment 3 Cole Robinson 2010-12-01 22:50:15 UTC
This is fixed upstream, should be a simple backport:

http://libvirt.org/git/?p=libvirt.git;a=commit;h=fab5a25c0373c77213ff4ed463f9e1db76dac80a

Comment 4 Ronald Wahl 2010-12-04 03:45:15 UTC
Cole, are you sure the URL to the fix is right? The description is:
  "OpenVZ: drop fd leackage
   Drop unused (and unclosed) errfd and close outfd on exit. Otherwise polling
   the running domains with virt-manager let's us quickly run out of fds."

Comment 5 Cole Robinson 2010-12-06 14:16:34 UTC
Sorry, this is the correct commit:

http://libvirt.org/git/?p=libvirt.git;a=commit;h=8efebd1761700a0cc32736829aead7807cc7865d

Comment 6 Ronald Wahl 2010-12-06 20:44:14 UTC
Ok, that commit looks better. Thanks.
So please can someone rebuild libvirt with that fix applied? Thanks!

Comment 7 Jan "Yenya" Kasprzak 2011-01-14 13:54:59 UTC
Anything new wrt. this bug? Please rebuild the package with fix mentioned in comment #5. Thanks!

Comment 8 Jan "Yenya" Kasprzak 2011-01-14 17:12:40 UTC
I have downloaded libvirt-0.8.7-1.fc15.src.rpm from Koji, rebuilt it for F14, installed, and the error message is gone - I can start the guest without problem. So mere rebuilding 0.8.7-1 for F14 in Koji and pushing it as an update would fix the problem.

I am however not sure about the USB device itself: what I am trying to do is to upgrade firmware in my Samsung Galaxy S phone using Win7 and the Kies application from Samsung, and it still cannot see the phone connected over USB.

Comment 9 Fedora Update System 2011-03-04 13:15:37 UTC
Package libvirt-0.8.3-4.fc14:
* should fix your issue,
* was pushed to the Fedora 14 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-0.8.3-4.fc14'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/libvirt-0.8.3-4.fc14
then log in and leave karma (feedback).

Comment 10 Daniel Veillard 2011-03-04 13:17:20 UTC
libvirt-0.8.3-4.fc14 has been build and is in Testing with the fix,

Daniel

Comment 11 Fedora Update System 2011-03-05 02:37:51 UTC
libvirt-0.8.3-4.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libvirt'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/libvirt-0.8.3-4.fc14

Comment 12 Fedora Update System 2011-03-12 22:55:35 UTC
libvirt-0.8.3-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.