mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: Accept <allowReboot value='default'/>
Up until a few commits ago, libvirt produced this XML and so
we need to be able to read it back to prevent a bunch of
error : virXMLPropEnumInternal:516 : XML error: Invalid value
for attribute 'value' in element 'allowReboot': 'default'
messages from being logged on daemon upgrade when there are
running guests.
Fixes: 0fe2d8dd33
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
fd3ca84c3e
commit
d83d9dde1d
@ -2859,9 +2859,12 @@ qemuDomainObjPrivateXMLParseAllowReboot(xmlXPathContextPtr ctxt,
|
||||
{
|
||||
xmlNodePtr node = virXPathNode("./allowReboot", ctxt);
|
||||
|
||||
return virXMLPropTristateBool(node, "value",
|
||||
VIR_XML_PROP_NONE,
|
||||
allowReboot);
|
||||
/* Allow value='default' as the input here, because old versions
|
||||
* of libvirt produced that output and we need to be able to read
|
||||
* it back to correctly handle running guests on daemon upgrade */
|
||||
return virXMLPropTristateBoolAllowDefault(node, "value",
|
||||
VIR_XML_PROP_NONE,
|
||||
allowReboot);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user