Bug 1220265
Summary: | libvirt format a (null) in ./devices/shmem/msi[@ioeventfd] when pass a invalid ioeventfd | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Martin Kletzander <mkletzan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.2 | CC: | dyuan, honzhang, mzhan, rbalakri |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.16-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 06:30:36 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Luyao Huang
2015-05-11 07:07:55 UTC
Another try (version 2): https://www.redhat.com/archives/libvir-list/2015-May/msg00305.html commit c49b9032a212538ff28786d1b9922ebf549ea5ca Author: Luyao Huang <lhuang> AuthorDate: 2015-05-11 20:59:37 +0800 Commit: Martin Kletzander <mkletzan> CommitDate: 2015-05-11 16:05:07 +0200 conf: Report error for unknown shmem ioeventfd value https://bugzilla.redhat.com/show_bug.cgi?id=1220265 Passing the return value to an enum directly is not safe. Fix this by comparing the true integer result of virTristateSwitchTypeFromString(). Signed-off-by: Luyao Huang <lhuang> git describe: v1.2.15-56-gc49b903 Verify it as follows. The result is expected. Move its status to VERIFIED. # rpm -q libvirt libvirt-1.2.17-3.el7.x86_64 # virsh edit test4 <shmem name='my_shmem0'> <size unit='M'>2</size> <server path='/tmp/socket-shmem'/> <msi vectors='32' ioeventfd='aaa'/> </shmem> 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 # virsh edit test4 <shmem name='my_shmem0'> <size unit='M'>2</size> <server path='/tmp/socket-shmem'/> <msi vectors='32' ioeventfd=' '/> </shmem> Failed. Try again? [y,n,i,f,?]: 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 # virsh edit test4 <shmem name='my_shmem0'> <size unit='M'>2</size> <server path='/tmp/socket-shmem'/> <msi vectors='32' ioeventfd='111'/> </shmem> Failed. Try again? [y,n,i,f,?]: 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 # virsh edit test4 <shmem name='my_shmem0'> <size unit='M'>2</size> <server path='/tmp/socket-shmem'/> <msi vectors='32' ioeventfd='on'/> </shmem> Domain test4 XML configuration edited. # virsh edit test4 <shmem name='my_shmem0'> <size unit='M'>2</size> <server path='/tmp/socket-shmem'/> <msi vectors='32' ioeventfd='off'/> </shmem> Domain test4 XML configuration edited. (In reply to hongming from comment #4) Did you also try it without the RNG validation? For example with 'virsh define' or by pressing 'i' when the XML error pops out? # cat r7.xml |grep /shmem -B4 <shmem name='my_shmem0'> <size unit='M'>2</size> <server path='/tmp/socket-shmem'/> <msi vectors='32' ioeventfd='aaa'/> </shmem> # virsh define r7.xml error: Failed to define domain from r7.xml error: XML error: invalid msi ioeventfd setting for shmem: 'aaa' # vim r7.xml # cat r7.xml |grep /shmem -B4 <shmem name='my_shmem0'> <size unit='M'>2</size> <server path='/tmp/socket-shmem'/> <msi vectors='32' ioeventfd=' '/> </shmem> # virsh define r7.xml error: Failed to define domain from r7.xml error: XML error: invalid msi ioeventfd setting for shmem: ' ' # vim r7.xml # cat r7.xml |grep /shmem -B4 <shmem name='my_shmem0'> <size unit='M'>2</size> <server path='/tmp/socket-shmem'/> <msi vectors='32' ioeventfd='111'/> </shmem> # virsh define r7.xml error: Failed to define domain from r7.xml error: XML error: invalid msi ioeventfd setting for shmem: '111' # virsh edit r7.1 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,?]: error: XML error: invalid msi ioeventfd setting for shmem: 'aaa' Failed. Try again? [y,n,f,?]: 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/RHBA-2015-2202.html |