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@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:
automation@ovirt.org has posted comments on this change.
Change subject: v2v: handle exception on probing external VMs ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Shahar Havivi has posted comments on this change.
Change subject: v2v: handle exception on probing external VMs ......................................................................
Patch Set 1: Verified+1
Francesco Romani has posted comments on this change.
Change subject: v2v: handle exception on probing external VMs ......................................................................
Patch Set 1: Code-Review-1
(1 comment)
I'm OK with the concept, question inside. -1 for visibility.
https://gerrit.ovirt.org/#/c/43259/1//COMMIT_MSG Commit Message:
Line 7: v2v: handle exception on probing external VMs Line 8: Line 9: XMLDesc of libvirt domain can throw error, Line 10: We don't want to fail all the process of fetching external VMs if we Line 11: fail to read one VM xml. Can you please elaborate on the nature of these errors? There is a specific flow or condition that triggers them?
I'm OK in adding a safety net here, but there is probably something strange happening on libvirt layer which should be reported - if there is a BZ already, please link it. Line 12: Line 13: Change-Id: Ie3203dde4878a80c65fe3185cadaef2fe00e6a02
Shahar Havivi has posted comments on this change.
Change subject: v2v: handle exception on probing external VMs ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/43259/1//COMMIT_MSG Commit Message:
Line 7: v2v: handle exception on probing external VMs Line 8: Line 9: XMLDesc of libvirt domain can throw error, Line 10: We don't want to fail all the process of fetching external VMs if we Line 11: fail to read one VM xml.
Can you please elaborate on the nature of these errors?
You may be right here, its an error that we encounter during testing v2v - and we got libvirt exception when getting domains xml, The same error was raise via virsh client. I don't have the setup and don't know If I can reproduce it again... Line 12: Line 13: Change-Id: Ie3203dde4878a80c65fe3185cadaef2fe00e6a02
Arik Hadas has posted comments on this change.
Change subject: v2v: handle exception on probing external VMs ......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/43259/1//COMMIT_MSG Commit Message:
Line 7: v2v: handle exception on probing external VMs Line 8: Line 9: XMLDesc of libvirt domain can throw error, Line 10: We don't want to fail all the process of fetching external VMs if we Line 11: fail to read one VM xml.
You may be right here,
The only thing that was special for that VM was that it contained vcenter that was't completely installed. But as Shahar wrote, newer vsphere was already installed and we don't know exactly how to reproduce it on the new setup.
It might be a problem in libvirt on the client side or on the server side (the implementation of the libvirt driver in VMware's ESX). I think we should be extra-careful on this since we communicate with external systems that we can't really trust. Line 12: Line 13: Change-Id: Ie3203dde4878a80c65fe3185cadaef2fe00e6a02
Shahar Havivi has abandoned this change.
Change subject: v2v: handle exception on probing external VMs ......................................................................
Abandoned
automation@ovirt.org has posted comments on this change.
Change subject: v2v: handle exception on probing external VMs ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found
vdsm-patches@lists.fedorahosted.org