get_instance_disk_info uses wrong XML to get disk information
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Alvaro Lopez |
Bug Description
Hi there.
In nova/virt/
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/
<target dev='sda' bus='scsi'/>
</disk>
but the code expects that driver_name has a "type" attribute, containing the type of the driver used (i.e. qcow2, raw). Therefore, if somebody is using raw images instead of cow nova-compute throws an exception, because get_instance_
2012-02-09 11:06:51,407 CRITICAL nova [-] list index out of range
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: _launcher.wait()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: service.wait()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return self._exit_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return hubs.get_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return self.greenlet.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: result = function(*args, **kwargs)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: server.start()
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self.manager.
(nova): TRACE: File "/usr/lib/
ce
(nova): TRACE: self.driver.
(nova): TRACE: File "/usr/lib/
e_resource
(nova): TRACE: 'disk_available
(nova): TRACE: File "/usr/lib/
ble_least
(nova): TRACE: disk_infos = utils.loads(
(nova): TRACE: File "/usr/lib/
sk_info
(nova): TRACE: backing_file = libvirt_
(nova): TRACE: File "/usr/lib/
(nova): TRACE: backing_file = os.path.
(nova): TRACE: IndexError: list index out of range
I've tested it using libvirt + Xen and using cow and raw images. I do now know if this is the case for other hypervisors, since I do not know the format of the XML returned by libvirt in such cases, but I assume that this should be the
same.
Changed in nova: | |
assignee: | nobody → Alvaro Lopez (aloga) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → essex-4 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-4 → 2012.1 |
tags: | added: libvirt xen |
Reviewed: https:/ /review. openstack. org/4189 github. com/openstack/ nova/commit/ d1bc92fdbd3aa42 b15beeb5eaf2987 365247cfa2
Committed: http://
Submitter: Jenkins
Branch: master
commit d1bc92fdbd3aa42 b15beeb5eaf2987 365247cfa2
Author: Alvaro Lopez Garcia <email address hidden>
Date: Wed Feb 15 11:47:28 2012 +0100
Fix bug 929427
We ensure that we are getting the info from a QCOW2 image, not anything
else.
Change-Id: I8b6bd504da8d52 bb9902c917360f0 465f9002551