Bug 1461633 - add extra hubs when cold/hot-plugging more USB devices
Summary: add extra hubs when cold/hot-plugging more USB devices
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: lijuan men
URL:
Whiteboard:
Depends On:
Blocks: 1473046
TreeView+ depends on / blocked
 
Reported: 2017-06-15 02:40 UTC by Pei Zhang
Modified: 2020-02-18 13:25 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-18 13:25:12 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Pei Zhang 2017-06-15 02:40:27 UTC
Description of problem:
libvirt should add extra hubs when cold/hot-pluging more USB devices 

Version-Release number of selected component (if applicable):
libvirt-3.2.0-10.el7.x86_64
qemu-kvm-rhev-2.9.0-10.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Define a guest without USB disks.

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     vm1                            shut off

# virsh domblklist vm1
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/r74.qcow2

# virsh dumpxml vm1 | grep usb -A 3
......
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
    </controller>
--
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='1'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='2'/>
    </redirdev>

2. Cold plug multiple USB disks 
# for i in {a..h}; do virsh attach-disk vm1 /var/lib/libvirt/images/usb/usb$i.img --targetbus usb sd$i --config; done 
Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

error: Failed to attach disk
error: internal error: No free USB ports

error: Failed to attach disk
error: internal error: No free USB ports
......

3. Trying to hotplug multiple USB disks, also hit this issue. 

Actual results:
As step2, libvirt will not add extra hub when no free ports

Expected results:
Add enough hubs when cold/hot pluging more usb devices

Comment 2 Jaroslav Suchanek 2020-02-18 13:25:12 UTC
This bug was closed deferred as a result of bug triage.

Please reopen if you disagree and provide justification why this bug should
get enough priority. Most important would be information about impact on
customer or layered product. Please indicate requested target release.


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