libvirt _live_snapshot & _swap_volume functions re-define guest with wrong XML document
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
lvdongbing |
Bug Description
In the nova/virt/
xml = dom.XMLDesc(0)
dom.undefine()
dom.blockRebase()
dom.defineXML
The reason for this is that 'blockRebase' requires the guest to be transient, so we must temporarily delete the persistent config and then re-create it later.
Unfortunately this code is using the wrong XML document when re-creating the persistent config. 'dom.XMLDesc(0)' will return the guest XML document based on the current guest state. Since the guest is running in both these cases, it will get getting the *live* XML instead of the persistent XML.
So these methods are deleting the persistent XML and replacing it with the live XML. These two different XML documents are not guaranteed to contain the same information.
As a second problem, it is not requesting inclusion of security information, so any SPICE/VNC password set in the persistent XML is getting lost
The fix is to replace
dom.XMLDesc(0)
with
dom.XMLDesc(
in the _live_snapshot and _swap_volume functions.
tags: | added: libvirt |
Changed in nova: | |
assignee: | nobody → lvdongbing (dbcocle) |
Changed in nova: | |
importance: | Undecided → Medium |
tags: | added: icehouse-backport-potential |
Changed in nova: | |
milestone: | none → juno-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-3 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/110346
Review: https:/