compute: remove get_disks work-around

The bug referenced on get_disks in nova has been fixed and the fix released
in Folsom.

Change-Id: I5443bb918166b71b6af2216776044c2a76cee704
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2012-11-08 23:12:34 +01:00
parent cd02257cc9
commit 4d088162c3

View File

@ -101,22 +101,11 @@ class DiskIOPollster(LibVirtPollster):
"errors=%d",
])
def _get_disks(self, conn, instance):
"""Get disks of an instance, only used to bypass bug#998089."""
domain = conn._conn.lookupByName(instance)
tree = etree.fromstring(domain.XMLDesc(0))
return filter(bool,
[target.get('dev')
for target in tree.findall('devices/disk/target')
])
def get_counters(self, manager, instance):
conn = get_libvirt_connection()
# TODO(jd) This does not work see bug#998089
# for disk in conn.get_disks(instance.name):
instance_name = _instance_name(instance)
try:
disks = self._get_disks(conn, instance_name)
disks = conn.get_disks(instance_name)
except Exception as err:
self.LOG.warning('Ignoring instance %s: %s',
instance_name, err)