Tomas Golembiovsky has uploaded a new change for review.

Change subject: v2v: Treat Xen specially after all.
......................................................................

v2v: Treat Xen specially after all.

The condition in the exception handler may be too general and may hide
some unforeseen error cases in other drivers that we would like to know
about.

Change-Id: I29befae33113f80a2011670c1edbff331becc72d
Signed-off-by: Tomáš Golembiovský <tgole...@redhat.com>
---
M lib/vdsm/v2v.py
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/57431/1

diff --git a/lib/vdsm/v2v.py b/lib/vdsm/v2v.py
index 946f61b..25d0a1b 100644
--- a/lib/vdsm/v2v.py
+++ b/lib/vdsm/v2v.py
@@ -993,10 +993,12 @@
     try:
         ret = vm.hasCurrentSnapshot()
     except libvirt.libvirtError as e:
-        if e.get_error_code() != libvirt.VIR_ERR_NO_SUPPORT:
+        if e.get_error_code() != libvirt.VIR_ERR_NO_SUPPORT or \
+                conn.getType() != 'Xen':
             logging.exception('Error checking for existing snapshots.')
         # else: The snapshot related API is not implemented in all libvirt
-        #       drivers. It is missing e.g. in Xen.
+        #       drivers. It is missing e.g. in Xen. But we know that already,
+        #       so no need to log the exception.
     else:
         params['has_snapshots'] = ret > 0
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29befae33113f80a2011670c1edbff331becc72d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Golembiovsky <tgole...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to