[NEW PATCH] libvirtconnection: Add "VIR_FROM_RPC" to trigger prepareForShutdown. (via gerrit-bot)
David Naori
dnaori at redhat.com
Wed Jul 13 16:42:42 UTC 2011
New patch submitted by David Naori (dnaori at redhat.com)
You can review this change at: http://gerrit.usersys.redhat.com/699
commit 1ce349a644d20dfd3d71f8b8f8eda30fab8108fc
Author: David Naori <dnaori at redhat.com>
Date: Wed Jul 13 16:34:04 2011 +0300
libvirtconnection: Add "VIR_FROM_RPC" to trigger prepareForShutdown.
libvirt-0.9.3-2 has change the behavior of libvirt disconnection,
we now should trigger prepareForShutdown in this case too. (Reference: BZ#681911)
Change-Id: I2a85b01e5d9a32aab2e9399035043d4a08856d67
diff --git a/vdsm/libvirtconnection.py b/vdsm/libvirtconnection.py
index ed1ae2e..48030e2 100644
--- a/vdsm/libvirtconnection.py
+++ b/vdsm/libvirtconnection.py
@@ -68,8 +68,8 @@ def get(cif=None):
setattr(ret, name, wrapMethod(method))
return ret
except libvirt.libvirtError, e:
- if (e.get_error_domain() == libvirt.VIR_FROM_REMOTE and
- e.get_error_code() == libvirt.VIR_ERR_SYSTEM_ERROR):
+ if (e.get_error_domain() in (libvirt.VIR_FROM_REMOTE, libvirt.VIR_FROM_RPC)
+ and e.get_error_code() == libvirt.VIR_ERR_SYSTEM_ERROR):
cif.log.error('connection to libvirt broken. '
'taking vdsm down.')
cif.prepareForShutdown()
More information about the vdsm-patches
mailing list