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 1770725 - Target model ignored on <console>
Summary: Target model ignored on <console>
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.1
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: 8.0
Assignee: Andrea Bolognani
QA Contact: jiyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-11 09:09 UTC by smitterl
Modified: 2020-11-02 07:45 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-11 16:34:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description smitterl 2019-11-11 09:09:30 UTC
Description of problem:
Target model for <console> is ignored.


Version-Release number of selected component (if applicable):
libvirt-5.6.0-7.module+el8.1.1+4483+2f45aaa2.x86_64

How reproducible:
Always

Steps to Reproduce:
1. virsh edit x86_64 machine to only character device
<console type='pty'>
 <target port='0'>
  <model name='usb-serial'/>
 </target>
</console>
2. Save changes
3. virsh dumpxml

Actual results:
The model is ignored; generated xml is
<serial type='pty'>
 <target type='isa-serial' port='0'>
  <model name='isa-serial'/>
 </target>
</serial>
<console type='pty'>
 <target type='serial' port='0'/>
</console>


Expected results:
A) As documentation says "In each of these directives, the top-level element name (parallel, serial, console, channel) describes how the device is presented to the guest. The guest interface is configured by the target element." I expected the shown definition to be equivalent with 
<serial type='pty'>
 <target type='usb-serial' port='0'>
  <model name='usb-serial'/>
 </target>
</serial>
(doc https://libvirt.org/formatdomain.html#elementsConsole)
B) Alternatively, I'd expect a validation error when target/model is used on console (instead of serial).

Comment 2 Andrea Bolognani 2020-02-11 14:46:58 UTC
Unfortunately we can't really make this scenario work the way you'd
expect, so the best I can offer is a documentation update.

Patch posted upstream:

  https://www.redhat.com/archives/libvir-list/2020-February/msg00467.html

More information in the commit message.

Comment 3 Andrea Bolognani 2020-02-11 16:34:03 UTC
Merged upstream.

  commit c4a78d00f8d00ef4ab84c3110ffb6975ed680554
  Author: Andrea Bolognani <abologna>
  Date:   Tue Feb 11 15:37:05 2020 +0100

    docs: Improve documentation for <serial> and <console>

    Users expect to be able to configure the <console> element and see
    that configuration reflected into the <serial> element or at least
    sticking, however due to our crazy back-compat code that doesn't
    always happen.

    There's really not much we can do to make this kind of corner cases
    work as the user would expect, especially not without introducing
    additional complexity in a part of libvirt that already has more
    than a fair share of it; we can, however, improve the documentation
    so that it will nudge said users in the right direction.

    https://bugzilla.redhat.com/show_bug.cgi?id=1770725

    Signed-off-by: Andrea Bolognani <abologna>
    Reviewed-by: Ján Tomko <jtomko>

  v6.0.0-374-gc4a78d00f8

Since we usually don't backport documentation changes, and the code
itself is already working as well as we can reasonably expect it to,
I'll mark this as CLOSED CURRENTRELEASE.


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