From a29442d81ead759e1b33d01ef1603fa677fa86bf Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 22 Aug 2012 14:56:30 +0100 Subject: Clarify nwfilter not found error message In bug #1039398 the user got an error message about an instance's nwfilter not being found, but it gave the impression that live migration was involved. The ensure_filtering_rules_for_instance() method was originally just used for live migration, but since: https://code.launchpad.net/~chemikadze/nova/driver-agnostic-restart-instances/+merge/69069 it has also been used when re-starting the compute service when there are running VMs. Clarify the error message and the comments in the code to reflect this. Waiting up to 30 seconds before reporting an error here seems pretty bad. It appears this is to handle the case where the nwfilters get defined in a separate thread. For reference, the code was added by this merge: https://code.launchpad.net/~nttdata/nova/live-migration/+merge/44940 For now, just add a comment explaining why we're polling for the existence of the nwfilter. Change-Id: Ieb085a6753ac72116d5f5a706fd1a908703286ad --- nova/tests/test_libvirt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 5e5a6eb2a..9d2cc3282 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -1591,7 +1591,9 @@ class LibvirtConnTestCase(test.TestCase): network_info, time_module=fake_timer) except exception.NovaException, e: - c1 = (0 <= str(e).find('Timeout migrating for')) + msg = ('The firewall filter for %s does not exist' % + instance_ref['name']) + c1 = (0 <= str(e).find(msg)) self.assertTrue(c1) self.assertEqual(29, fake_timer.counter, "Didn't wait the expected " -- cgit