From 1b4037e13db92bbc688f179247c285a17cba4082 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 13 Mar 2013 11:03:42 -0400 Subject: [PATCH] Fix reconnecting to libvirt. The right logic was in place for dealing with losing a connection to libvirt and reconnecting. However, it was observed that we actually get VIR_ERR_INTERNAL_ERROR, VIR_FROM_RPC after restarting libvirtd. The code is just updated to deal with INTERNAL_ERROR. Fix bug 1154473. Change-Id: Idf4abf3fe485cf534f1732e4340fc35652fec003 --- nova/tests/test_libvirt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 3e379a29..86f2fe91 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -2864,7 +2864,8 @@ class LibvirtConnTestCase(test.TestCase): def test_broken_connection(self): for (error, domain) in ( (libvirt.VIR_ERR_SYSTEM_ERROR, libvirt.VIR_FROM_REMOTE), - (libvirt.VIR_ERR_SYSTEM_ERROR, libvirt.VIR_FROM_RPC)): + (libvirt.VIR_ERR_SYSTEM_ERROR, libvirt.VIR_FROM_RPC), + (libvirt.VIR_ERR_INTERNAL_ERROR, libvirt.VIR_FROM_RPC)): conn = libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)