RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1166452 - Report better error message for reordered companion controllers
Summary: Report better error message for reordered companion controllers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-21 01:59 UTC by Hu Jianwei
Modified: 2016-11-03 18:11 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:11:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Hu Jianwei 2014-11-21 01:59:19 UTC
Description of problem:
Reorder right positions for companion controllers in domain xml

Version-Release number of selected component (if applicable):
libvirt-1.2.8-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
Edit domain xml, put "ich9-ehci1" usb controller to a new position, for example, at the bottom of <device>, after a "ich9-uhci" controller at least.
[root@ibm-x3850x5-01 ~]# virsh dumpxml r7| grep "controller type='usb'"
    <controller type='usb' index='0' model='ich9-uhci1'>
    <controller type='usb' index='0' model='ich9-uhci2'>
    <controller type='usb' index='0' model='ich9-ehci1'>

[root@ibm-x3850x5-01 ~]# virsh start r7
error: Failed to start domain r7
error: internal error: early end of file from monitor: possible problem:
2014-11-19T08:46:31.330359Z qemu-kvm: -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5: Parameter 'masterbus' expects an USB masterbus
2014-11-19T08:46:31.330477Z qemu-kvm: -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5: Device initialization failed.
2014-11-19T08:46:31.330496Z qemu-kvm: -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5: Device 'ich9-usb-uhci1' could not be initialized


Actual results:
As shown above steps, failed to start doamin due to generate a wrong qemu command line.

-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=3,bus=pci.0,addr=0x5.0x1 -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7

Expected results:
The "ich9-ehci" controller should stand in front of all "ich9-uhci" controllers.

like:
[root@ibm-x3850x5-01 ~]# virsh dumpxml r7| grep "controller type='usb'"
    <controller type='usb' index='0' model='ich9-ehci1'>    
    <controller type='usb' index='0' model='ich9-uhci1'>
    <controller type='usb' index='0' model='ich9-uhci2'>
    
Additional info:

Comment 2 Jiri Denemark 2014-11-21 08:47:28 UTC
I don't think we should try to reorder the controllers. However, we should probably try to check if master is already known when we encounter a companion and report a better error message.

Comment 5 Pavel Hrdina 2015-07-15 13:27:54 UTC
Moving to RHEL-7.3, it's not a critical bug.

Comment 7 Pavel Hrdina 2015-11-11 14:39:54 UTC
Upstream commit:

commit fc03eb53c0bf3f654b3c0a10e349d87eb2f511e6
Author: Pavel Hrdina <phrdina>
Date:   Wed Nov 11 15:20:15 2015 +0100

    domain-conf: reorder usb controllers so the master is first
    
    USB controllers can share the same 'index' which indicates, that there
    is some sort of master-companion relationship.  Reorder the controllers
    in XML in to place the master controller before its companions.  This is
    required by QEMU to not fail with error message:
    
    error: internal error: process exited while connecting to monitor:
    2015-10-26T16:25:17.630265Z qemu-system-x86_64:
    -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6:
    USB bus 'usb.0' not found
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1166452
    
    Signed-off-by: Pavel Hrdina <phrdina>

Comment 9 Shanzhi Yu 2016-02-24 08:09:22 UTC
verify this bug with libvirt-1.3.1-1.el7.x86_64

1. prepare a guest xml with usb as below

# cat r7.xml |grep usb
    <controller type='usb' index='0' model='ich9-uhci1'/>
    <controller type='usb' index='0' model='ich9-uhci2'/>
    <controller type='usb' index='0' model='ich9-ehci1'/>

2. create guest with above xml
# virsh create r7.xml 
Domain r7 created from r7.xml

3. check guest live xml and qemu cmd line

# virsh dumpxml r7|grep usb
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
# ps aux|grep usb
qemu     30600  166  7.9 1559216 304936 ?      Sl   16:05   1:09 /usr/libexec/qemu-kvm -name r7 -S -machine pc-i440fx-rhel7.2.0,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 8,sockets=8,cores=1,threads=1 -uuid 78b51f58-b5ea-4aa6-b971-3e89f68dfad5 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-r7/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1

Comment 11 errata-xmlrpc 2016-11-03 18:11:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html


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