Bug 1595993
Summary: | Improve the CPU extracting code for (hypervisor-)cpu-baseline/ cpu-compare cmd | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | jiyan <jiyan> | |
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> | |
Status: | CLOSED WONTFIX | QA Contact: | jiyan <jiyan> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.6 | CC: | dyuan, dzheng, fjin, jdenemar, jiyan, lcheng, lhuang, lmen, xuzhang, yalzhang | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1607287 (view as bug list) | Environment: | ||
Last Closed: | 2018-11-29 10:20:09 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1607287 |
Description
jiyan
2018-06-28 01:50:54 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2018-November/msg00838.html Oops, the patch in comment 2 is for a different bug. So I was thinking a bit more about this and I think it is not really a bug we should fix in any way. The documentation is very clear in both cases: - the commands accept either a valid CPU definition or a complete domain capabilities XML; extracting just the <cpu> element from a domain capabilities XML does not produce a valid CPU definition - cpu-baseline does not mention a CPU from domain capabilities as a supported input That said, a user can pass anything they want to the commands and libvirt will try to use and parse it as CPU definitions. If the input is not the expected CPU definition, either error or unexpected result will be reported. It's similar to passing invalid domain XML; some unknown parts will just be ignored and we will end up using an XML different from the one used by a user, some of them will result in an error. With domain XMLs users can ask libvirt to validate the XML, but I don't think it's practical or even useful to do something like this for CPU definition XMLs used by the various CPU model related APIs. Mostly because the XMLs are supposed to be taken either from a domain XML (which can be validated) or from XMLs produced by libvirt. |