Change in vdsm[master]: v2v: handle exception on probing external VMs

shavivi at redhat.com shavivi at redhat.com
Tue Jul 7 05:59:54 UTC 2015


Shahar Havivi has uploaded a new change for review.

Change subject: v2v: handle exception on probing external VMs
......................................................................

v2v: handle exception on probing external VMs

XMLDesc of libvirt domain can throw error,
We don't want to fail all the process of fetching external VMs if we
fail to read one VM xml.

Change-Id: Ie3203dde4878a80c65fe3185cadaef2fe00e6a02
Signed-off-by: Shahar Havivi <shaharh at redhat.com>
---
M vdsm/v2v.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/43259/1

diff --git a/vdsm/v2v.py b/vdsm/v2v.py
index b6763da..307c005 100644
--- a/vdsm/v2v.py
+++ b/vdsm/v2v.py
@@ -139,7 +139,11 @@
     with closing(conn):
         vms = []
         for vm in conn.listAllDomains():
-            root = ET.fromstring(vm.XMLDesc(0))
+            try:
+                root = ET.fromstring(vm.XMLDesc(0))
+            except libvirt.libvirtError as e:
+                logging.error('error reading domain xml, msg: %s', e.message)
+                continue
             params = {}
             _add_vm_info(vm, params)
             try:


-- 
To view, visit https://gerrit.ovirt.org/43259
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3203dde4878a80c65fe3185cadaef2fe00e6a02
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>


More information about the vdsm-patches mailing list