Skip to content

Commit cbed398

Browse files
committed
Revert "Add logging to find test cases leaking libvirt threads"
This reverts commit 1778a9c. Reason for revert: We said we wouldn't have it in RC1. Change-Id: Idf0c9a8adeac231f099b312fc24b9cf9726687e0
1 parent 1778a9c commit cbed398

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

nova/tests/fixtures/nova.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,24 +1822,6 @@ def __init__(self, test, modules):
18221822

18231823
def find_spec(self, fullname, path, target=None):
18241824
if fullname in self.modules:
1825-
current = eventlet.getcurrent()
1826-
# NOTE(gibi) not all eventlet spawn is under our control, so
1827-
# there can be senders without test_case_id set, find the first
1828-
# ancestor that was spawned from nova.utils.spawn[_n] and
1829-
# therefore has the id set.
1830-
while (
1831-
current is not None and
1832-
not getattr(current, 'test_case_id', None)
1833-
):
1834-
current = current.parent
1835-
1836-
if current is not None:
1837-
self.test.tc_id = current.test_case_id
1838-
LOG.warning(
1839-
"!!!---!!! TestCase ID %s hit the import poison while "
1840-
"importing %s. If you see this in a failed functional "
1841-
"test then please let #openstack-nova on IRC know "
1842-
"about it. !!!---!!!", current.test_case_id, fullname)
18431825
self.test.fail_message = (
18441826
f"This test imports the '{fullname}' module, which it "
18451827
f'should not in the test environment. Please add '
@@ -1850,7 +1832,6 @@ def find_spec(self, fullname, path, target=None):
18501832
def __init__(self, module_names):
18511833
self.module_names = module_names
18521834
self.fail_message = ''
1853-
self.tc_id = None
18541835
if isinstance(module_names, str):
18551836
self.module_names = {module_names}
18561837
self.meta_path_finder = self.ForbiddenModules(self, self.module_names)
@@ -1868,13 +1849,6 @@ def cleanup(self):
18681849
# there (which is also what self.assert* and self.fail() do underneath)
18691850
# will not work to cause a failure in the test.
18701851
if self.fail_message:
1871-
if self.tc_id is not None:
1872-
LOG.warning(
1873-
"!!!---!!! TestCase ID %s hit the import poison. If you "
1874-
"see this in a failed functional test then please let "
1875-
"#openstack-nova on IRC know about it. !!!---!!!",
1876-
self.tc_id
1877-
)
18781852
raise ImportError(self.fail_message)
18791853

18801854

nova/virt/libvirt/driver.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10061,24 +10061,6 @@ def live_migration_abort(self, instance):
1006110061
:param instance: instance object that is in migration
1006210062

1006310063
"""
10064-
current = eventlet.getcurrent()
10065-
# NOTE(gibi) not all eventlet spawn is under our control, so
10066-
# there can be senders without test_case_id set, find the first
10067-
# ancestor that was spawned from nova.utils.spawn[_n] and
10068-
# therefore has the id set.
10069-
while (
10070-
current is not None and
10071-
not getattr(current, 'test_case_id', None)
10072-
):
10073-
current = current.parent
10074-
10075-
if current is not None:
10076-
LOG.warning(
10077-
"!!!---!!! live_migration_abort thread was spawned by "
10078-
"TestCase ID: %s. If you see this in a failed functional test "
10079-
"then please let #openstack-nova on IRC know about it. "
10080-
"!!!---!!!", current.test_case_id
10081-
)
1008210064

1008310065
guest = self._host.get_guest(instance)
1008410066
dom = guest._domain

0 commit comments

Comments
 (0)