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 1285665 - Fail to valid the guest's xml while set the graphical listen as ipv6 address which end with "::" on rhel7
Summary: Fail to valid the guest's xml while set the graphical listen as ipv6 address ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-26 08:27 UTC by mxie@redhat.com
Modified: 2016-11-03 18:32 UTC (History)
9 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:32:18 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 mxie@redhat.com 2015-11-26 08:27:39 UTC
Description of problem:
Fail to valid the guest's xml while set the graphical listen as ipv6 address which end with "::" on rhel7

Version-Release number of selected component (if applicable):
Host:3.10.0-327.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Edit a guest xml on rhel7 and change graphical listen address to "::" or other ipv6 address end with "::"
# virsh edit 2OS
<graphics type='vnc' port='5901' autoport='no' listen='::'>
  <listen type='address' address='::'/>
</graphics>

2.Using ":wq" to save xml, it will pop up below error
# virsh edit 2OS
error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content

Failed. Try again? [y,n,i,f,?]: 

3.if type "i" , the xml could be saved as below and the graphical listen ipv6 address "::" could be used by guest normally

Domain 2OS XML configuration edited.


Actual results:
As above description

Expected results:
Could valid the guest's xml while set the graphical listen as ipv6 address which end with "::" on rhel7 

Addtional info:
Could valid the guest's xml while set the graphical listen as ipv6 address which end with "::" on rhel6 normally

Comment 1 Ján Tomko 2015-11-26 09:52:37 UTC
Reproducible with libvirt-1.2.17-13.el7

Upstream patch:
https://www.redhat.com/archives/libvir-list/2015-November/msg01118.html

Comment 2 Ján Tomko 2015-11-26 09:56:38 UTC
Note that 'virsh edit' did not validate the XML before RHEL 7.2, it was added upstream by:

commit d7565bd8aab018302307a994e7753766cc72c085
Author:     Daniel P. Berrange <berrange>
CommitDate: 2015-01-16 11:07:59 +0000

    virsh: add support for domain XML validation
    
    The 'virsh edit' command gets XML validation enabled by default,
    with a --skip-validate option to disable it. The 'virsh define'
    and 'virsh create' commands get a --validate option to enable
    it, to avoid regressions for existing scripts.
    
    The quality of error reporting from libxml2 varies depending
    on the type of XML error made. Sometimes it is quite clear
    and useful, other times it is obscure & inaccurate. At least
    the user will see an error now, rather than having their
    XML modification silently disappear.

git describe: v1.2.11-188-gd7565bd contains: v1.2.12-rc1~21

Comment 3 Ján Tomko 2015-11-26 10:06:06 UTC
Now pushed upstream:
commit 7ec235ed092a2408ca0d3b7fd1c4bfcbc3fc835e
Author:     Ján Tomko <jtomko>
CommitDate: 2015-11-26 11:05:18 +0100

    schema: use a better regex for listen addresses
    
    A domain with '::' as the listen address fails to validate.
    
    Reuse the 'ipAddr' and 'dnsName' regexes from basictypes instead
    of reinventing them.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1285665

git describe: v1.2.21-142-g7ec235e

Comment 5 Fangge Jin 2016-03-03 02:14:54 UTC
Verify pass on downstream build: libvirt-1.3.1-1.el7.x86_64

Steps:
# virsh edit rhel7
(edit listen address to :: or 0::, like
<graphics type='spice' port='5900' autoport='no' listen='0::'>
)
Domain rhel7 XML configuration edited.

# virsh dumpxml rhel7 |grep gra
<graphics type='spice' port='5900' autoport='no' listen='0::'>
</graphics>

# virsh start rhel7

# ps aux|grep qemu
...-spice port=5900,addr=::,disable-ticketing,seamless-migration=on...

Comment 6 Fangge Jin 2016-04-11 03:53:58 UTC
Verify pass on downstream build: libvirt-1.3.3-1.el7.x86_64

Steps:
1. # virsh edit windows
    <graphics type='spice' port='5905' autoport='no' listen='**0::**'/>
Domain windows XML configuration edited.
2. # virsh dumpxml windows
    <graphics type='spice' port='5905' autoport='no' listen='0::'>
      <listen type='address' address='0::'/>
    </graphics>
3. # virsh start windows
4. # ps aux|grep qemu
-spice port=5905,addr=0::,...
5.# remote-viewer spice://10.66.5.57:5905
6.Edit listen address to '::', and test again

Comment 8 errata-xmlrpc 2016-11-03 18:32:18 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.