hotplugging USB device by vendor/product fails: Path '/dev/bus/usb/000/000' is not accessible

Bug #1264465 reported by Jhonny Oliveira
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Unassigned
Saucy
Won't Fix
Medium
Unassigned

Bug Description

Further details and explanation on this bug can be found here:
https://bugzilla.redhat.com/show_bug.cgi?id=1016511

[IMPACT]
usb devices cannot be hotplugged using vendor/product.

[TEST CASE]
(Taken from comment #3)

Try to attach a usb device as follows (using a nexus 4 as an example):

cat > /root/nexus4.xml << EOF
<hostdev mode='subsystem' type='usb' managed='yes'>
  <source>
    <vendor id='0x18d1'/>
    <product id='0x4ee0'/>
  </source>
</hostdev>
EOF

virsh attach-device lava-worker-2 /root/nexus4.xml

[REGRESSION POTENTIAL]
This fix consists of three patches cherrypicked - and backported -
from upstream. There is a chance of regression. However the change
is entirely to usb hotplug code.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Could you confirm whether this is fixed by the new 1.2.0 in trusty? Or if you're not running trusty, please tell us which version you hit the bug on, thanks.

Changed in libvirt (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Jhonny Oliveira (jhonny-oliveira) wrote :

With the VM powered on I get the same error:

unable to set user and group to '116:126' on '/dev/bus/usb/000/000': No such file or directory

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1168, in add_device
    self.vm.attach_device(self._dev)
  File "/usr/share/virt-manager/virtManager/domain.py", line 841, in attach_device
    self._backend.attachDevice(devxml)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 417, in attachDevice
    if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self)
libvirtError: unable to set user and group to '116:126' on '/dev/bus/usb/000/000': No such file or directory

However, with the VM powered off it works.

Just one note, I don't remember if I did shutdown the VM with the previous packages in order to reproduce the same behavior.

Revision history for this message
Tyler Baker (tyler-baker) wrote :

I am seeing the same thing on 13.10:

root@compute01:/dev/bus/usb# cat /root/nexus4.xml
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x18d1'/>
        <product id='0x4ee0'/>
      </source>
    </hostdev>

root@compute01:/dev/bus/usb# virsh attach-device lava-worker-2 /root/nexus4.xml
error: Failed to attach device from /root/nexus4.xml
error: Path '/dev/bus/usb/000/000' is not accessible: No such file or directory

root@compute01:/dev/bus/usb# libvirtd --version
libvirtd (libvirt) 1.1.1

the only way I've been able to get this to work is:

mkdir /dev/bus/usb/000/000
ln -s /dev/bus/usb/001/008 /dev/bus/usb/000

Changed in libvirt (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1264465] Re: hotplugging USB device by vendor/product fails: Path '/dev/bus/usb/000/000' is not accessible

Thanks for the information. Marking medium importance per the
guidelines since there is a workaround.

 status: confirmed
 importance: medium

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Can anyone confirm whether this is fixed in trusty?

Per the referenced redhat bug, it should be fixed as of the commit: http://www.redhat.com/archives/libvir-list/2013-December/msg00338.html

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

As far as I can see, the proposed patch was rejected, and a new one has not yet been submitted upstream.

Revision history for this message
Stanimir Mladenov (stanimir-mladenov) wrote :

The workaround that Tyler Baker pointed, didn't work for me.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This should be fixed in the libvirt 1.2.2 which is now in 14.04. Please let us know if you find it does not.

The patch at https://bugs.launchpad.net/bugs/1264465 should be SRU-able to saucy. Please post here which releases you would like us to try to port the fix to.

Changed in libvirt (Ubuntu):
status: Confirmed → Fix Released
description: updated
Changed in libvirt (Ubuntu Saucy):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jhonny, or anyone else affected,

Accepted libvirt into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/libvirt/1.1.1-0ubuntu8.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Saucy):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Gah, badly applied patch. Fixing it now and re-uploading.

Revision history for this message
Jhonny Oliveira (jhonny-oliveira) wrote : Re: [Bug 1264465] Re: hotplugging USB device by vendor/product fails: Path '/dev/bus/usb/000/000' is not accessible

Were are the built packages to test?!

Best regards,
Jhonny Oliveira

On Thu, Mar 27, 2014 at 10:48 PM, Serge Hallyn
<email address hidden>wrote:

> Gah, badly applied patch. Fixing it now and re-uploading.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1264465
>
> Title:
> hotplugging USB device by vendor/product fails: Path
> '/dev/bus/usb/000/000' is not accessible
>
> Status in "libvirt" package in Ubuntu:
> Fix Released
> Status in "libvirt" source package in Saucy:
> Fix Committed
>
> Bug description:
> Further details and explanation on this bug can be found here:
> https://bugzilla.redhat.com/show_bug.cgi?id=1016511
>
> [IMPACT]
> usb devices cannot be hotplugged using vendor/product.
>
> [TEST CASE]
> (Taken from comment #3)
>
> Try to attach a usb device as follows (using a nexus 4 as an example):
>
> cat > /root/nexus4.xml << EOF
> <hostdev mode='subsystem' type='usb' managed='yes'>
> <source>
> <vendor id='0x18d1'/>
> <product id='0x4ee0'/>
> </source>
> </hostdev>
> EOF
>
> virsh attach-device lava-worker-2 /root/nexus4.xml
>
> [REGRESSION POTENTIAL]
> This fix consists of three patches cherrypicked - and backported -
> from upstream. There is a chance of regression. However the change
> is entirely to usb hotplug code.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1264465/+subscriptions
>

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Quoting Jhonny Oliveira (<email address hidden>):
> Were are the built packages to test?!

When they are accepted they will be available in the saucy-proposed
pocket as version 1.1.1-0ubuntu8.9

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jhonny, or anyone else affected,

Accepted libvirt into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/libvirt/1.1.1-0ubuntu8.9 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Jhonny Oliveira (jhonny-oliveira) wrote :

No luck, same problem with the VM powered on.

Path '/dev/bus/usb/000/000' is not accessible: No such file or directory

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1168, in add_device
    self.vm.attach_device(self._dev)
  File "/usr/share/virt-manager/virtManager/domain.py", line 841, in attach_device
    self._backend.attachDevice(devxml)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 419, in attachDevice
    if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self)
libvirtError: Path '/dev/bus/usb/000/000' is not accessible: No such file or directory

Revision history for this message
Brian Murray (brian-murray) wrote :

The package in -proposed fixing this particular bug was superceded by one without the fix, so I'll change SRU stuff on this bug.

tags: removed: verification-needed
Changed in libvirt (Ubuntu Saucy):
status: Fix Committed → Triaged
Revision history for this message
Jhonny Oliveira (jhonny-oliveira) wrote :

I have moved on to a more recent version, 1.0.1 from GetDeb and this specific bug is no longer present in there.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

saucy has seen the end of its life and is no longer receiving any updates. Marking the saucy task for this ticket as "Won't Fix".

Changed in libvirt (Ubuntu Saucy):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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