Skip to content

Commit

Permalink
libvirt: ignore deleted domain while get block dev
Browse files Browse the repository at this point in the history
The get_all_block_devices could raise libvirtError if domain was deleted
while listing instances. This will cause LibvirtISCSIVolumeDriver to fail
disconnect_volume. This patch ignores the domain that could not be found
to avoid this issue.

Fixes bug 1060836

Change-Id: I9dc994d8ca7fc084830adb4f6f9d3ca10e0fe577
  • Loading branch information
motokentsai committed Oct 4, 2012
1 parent 1d4506c commit 5a16b8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nova/virt/libvirt/driver.py
Expand Up @@ -1899,8 +1899,8 @@ def get_all_block_devices(self):
"""
devices = []
for dom_id in self.list_instance_ids():
domain = self._conn.lookupByID(dom_id)
try:
domain = self._conn.lookupByID(dom_id)
doc = etree.fromstring(domain.XMLDesc(0))
except Exception:
continue
Expand Down

0 comments on commit 5a16b8f

Please sign in to comment.