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 1531470 - virtio char devices should select an available virtio-serial address while hotplug and skip unavailable ones
Summary: virtio char devices should select an available virtio-serial address while ho...
Keywords:
Status: CLOSED DUPLICATE of bug 1447505
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Jing Qi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-05 08:48 UTC by yalzhang@redhat.com
Modified: 2018-06-08 09:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-08 09:03:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yalzhang@redhat.com 2018-01-05 08:48:33 UTC
Description of problem:
virtio char devices should select an available virtio-serial address while hotplug and skip unavailable ones

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

How reproducible:
100%

Steps to Reproduce:
1. prepare the xml for virtio channel and virtio console
# cat channel.xml 
<channel type='pty'> 
<target type='virtio'/>
</channel>

# cat console.xml
<console type='pty'>
      <target type='virtio'/>
    </console>

2. start a guest with below char devices:
# virsh start pc
# virsh dumpxml pc
...
<controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
...
<serial type='pty'>
      <source path='/dev/pts/1'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-78-pc/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel1'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
...

3. do hotplug for virtio console for 2 times
# virsh attach-device pc console.xml
Device attached successfully

# virsh attach-device pc console.xml
Device attached successfully

# virsh dumpxml pc
...
 <console type='pty'>
      <source path='/dev/pts/3'/>
      <target type='virtio' port='1'/>
      <alias name='console1'/>
    </console>
    <console type='pty'>
      <source path='/dev/pts/4'/>
      <target type='virtio' port='2'/>
      <alias name='console2'/>
    </console>
...

4. then do hotplug for the virtio channel
# virsh attach-device pc channel.xml 
error: Failed to attach device from channel.xml
error: internal error: unable to execute QEMU command 'device_add': virtio-serial-bus: A port already exists at id 3

Actual results:
In step 4, the hotplug failed as auto generated virtio-serial address is unavailable. It seems that in step 3, the 2nd virtio console will occupied the virtio-serial address(only attach one virtio console will not trigger this issue). Same issue in https://bugzilla.redhat.com/show_bug.cgi?id=1531466#c2

Expected results:
hotplug virtio channel should skip the unavailable virtio-serial address

Additional info:
current virtio console do not generate the virtio-console address, refer to "Bug 1447505 - Support virtio console devices generating virtio-serial address"

Comment 2 Ján Tomko 2018-06-08 09:03:03 UTC

*** This bug has been marked as a duplicate of bug 1447505 ***


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