https://bugzilla.redhat.com/show_bug.cgi?id=890494
The <sysinfo> section needs an extra uuid validation check. The current
check compares the numerical sysinfo/system_uuid with the domain uuid;
however, it's possible that someone added extra hyphens into the sysinfo
uuid which results in the inability to start the domain (at least qemu).
Rather than fail due to improper format, adjust/save to the expected format.
The bug report indicates the 'date' field should at least be syntax checked
based on what's desribed in the SMBIOS spec. From the spec:
"String number of the BIOS release date. The date string, if supplied, is
in either mm/dd/yy or mm/dd/yyyy format. If the year portion of the string
is two digits, the year is assumed to be 19yy.
NOTE: The mm/dd/yyyy format is required for SMBIOS version 2.3 and later"
v2 -> v1 differences:
- Moved Sysinfo field validation checks from virDomainDefParseXML() into
virSysinfoParseXML()
- As long as the virUUIDParse() value matches the domain's UUID field
save the 'correct' format in the system_uuid field - that is don't
error out just because of extraneous space or dash in provided UUID.
- Added tests for date field and uuid comparison parsing errors.
NOTE: 01 and 02 are unchanged
John Ferlan (4):
docs: Fix syntax in sysinfo description
docs: Update description of SMBIOS fields
Validate the bios_date format for <sysinfo>
Adjust improperly formatted <sysinfo> uuid
docs/formatdomain.html.in | 51 +++++++++++---
src/conf/domain_conf.c | 78 ++++++++++++++++------
.../qemuxml2argvdata/qemuxml2argv-smbios-date.xml | 23 +++++++
.../qemuxml2argv-smbios-uuid-match.xml | 23 +++++++
tests/qemuxml2argvtest.c | 2 +
5 files changed, 148 insertions(+), 29 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-smbios-date.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-smbios-uuid-match.xml
--
1.8.1.4