Bug 630617 - cpuCompareXML silently ignores 'match' attribute when 'arch' element is present
Summary: cpuCompareXML silently ignores 'match' attribute when 'arch' element is present
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 613760
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-06 12:45 UTC by Jiri Denemark
Modified: 2011-01-13 23:15 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.8.2-4.el5
Doc Type: Bug Fix
Doc Text:
Clone Of: 613760
Environment:
Last Closed: 2011-01-13 23:15:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0060 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-01-12 17:22:30 UTC

Description Jiri Denemark 2010-09-06 12:45:09 UTC
+++ This bug was initially created as a clone of Bug #613760 +++

Clone of a corresponding bug fixed in RHEL-6...

The following XML is wrong since 'match' attribute is allowed only for guest CPUs and 'arch' element is only allowed for host CPUs:

<cpu match="minimum">
  <arch>i686</arch>
  <model>pentium</model>
</cpu>

When running virsh cpu-compare on this XML, libvirt silently ignores the 'match' attribute and treats the XML as describing a host CPU.

An error should be returned instead.

Comment 1 Jiri Denemark 2010-09-13 21:55:07 UTC
Fix built into libvirt-0.8.2-4.el5

Comment 3 zhanghaiyan 2010-10-13 02:37:17 UTC
Verified this bug on RHEL5u6-Server-20100930.0-x86_64-kvm 
- kernel-2.6.18-225.el5
- kvm-83-200.el5
- libvirt-0.8.2-6.el5

Test steps:
1. # cat pentium.xml
<cpu match="minimum">
<model>pentium</model>
</cpu>
2. # virsh cpu-compare pentium.xml

Actual result:
2. Output
error: Failed to compare host CPU with pentium.xml
error: XML description for 'arch' element element cannot be used inside 'cpu' element with 'match' attribute' is not well formed or invalid

Comment 4 Min Zhan 2011-01-10 08:03:04 UTC
(In reply to comment #3)

I think some error about xml file for step 1. Should change Test step 1 to the following to get correct output:

1. # cat pentium.xml
<cpu match="minimum">
  <arch>i686</arch>
  <model>pentium</model>
</cpu>


Then execute step 2 and the correct output like comment #3 will display.

Comment 6 errata-xmlrpc 2011-01-13 23:15:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0060.html


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