summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorRafi Khardalian <rafi@metacloud.com>2013-01-19 07:12:46 +0000
committerRafi Khardalian <rafi@metacloud.com>2013-01-19 07:37:31 +0000
commitbed78bc1db64dd97af50d1f737dd2c8af63ed61d (patch)
treea122d47334af2d5d323294ac7f8ccacbf5c21fb3 /nova/exception.py
parentab04b00edfbb21131fd370325089e69d5fd8e1f0 (diff)
downloadnova-bed78bc1db64dd97af50d1f737dd2c8af63ed61d.tar.gz
nova-bed78bc1db64dd97af50d1f737dd2c8af63ed61d.tar.xz
nova-bed78bc1db64dd97af50d1f737dd2c8af63ed61d.zip
More consistent libvirt XML handling and cleanup
Fixes bug 1081373 The overall goal of this effort is to make handling of libvirt XMLs more consistent. First, the on-disk XML file in the instances directory is never to be used by the libvirt driver. It will be generated via to_xml(). Second, anytime it is safe to re-define the XML using the version we programatically generate, we do so. Extended to_xml() to support a new write_to_disk argument. When true, this the resulting XML will be written to the instances directory. Renamed _get_domain_xml to _get_existing_domain_xml, as it should only be used when we need the XML for a defined domain. It will continue to fall back to using to_xml() if the defined version is not available. Hard reboots will now assume nothing about the defined state within libvirt. Rather, we generate and define the domain every time. This eliminates the possibility of the hypervisor and Nova database going out of sync (i.e. volume attached in defined XML with Nova having no knowledge). We no longer need to pass an xml argument into _hard_reboot() since it is always generated. Resume state on boot has been updated with logic similar to that of _hard_reboot. Again, after a hypervisor reboot (or detection of downed VMs on compute start), we should not assume the defined XML is valid. The state or configuration of the VM, from Nova's perspective, may have been changed while the system was down. The post_live_migration_on_destination() method used to call to_xml() without block_device_info. This would result in an on-disk XML without any volume mappings. The compute manager has been updated to pass bdi so that this XML can be generated and written correctly. The Mox stub for this function has been replaced by a stub in the fake virt driver. Change-Id: I4aa1068fa3aa54fdb7e690d46b6cf2e41bb20bc9
Diffstat (limited to 'nova/exception.py')
0 files changed, 0 insertions, 0 deletions