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: 0fe2d8dd335054fae38b46bbbac58a4662e1a1d0
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
{
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);
}