From e1921703395cdc8807caa92813dcf1936d0ab64f Mon Sep 17 00:00:00 2001 From: John Griffith Date: Thu, 7 Feb 2013 16:45:03 -0700 Subject: Fix missing key error in libvirt.driver The libvirt disk mapping refactor change introduced a bug in libvirt.driver.get_guest_config where we were attempting to perform instance_update using a non-existent key in the disk_mapping. Given that we already parsed out the root_device_name and stored it in a variable, and then verify that it's set in an if statement before this method we should be just using what we've already parsed. Fixes bug: 1118829 Change-Id: Ifd80e67740d6f257ee537b68e9afe028273484d2 --- nova/virt/libvirt/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/virt') diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 666eb66f3..9c6da127c 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -1789,7 +1789,7 @@ class LibvirtDriver(driver.ComputeDriver): # for nova.api.ec2.cloud.CloudController.get_metadata() self.virtapi.instance_update( nova_context.get_admin_context(), instance['uuid'], - {'root_device_name': '/dev/' + disk_mapping['disk']['dev']}) + {'root_device_name': root_device_name}) guest.os_type = vm_mode.get_from_instance(instance) -- cgit