From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: netlink: monitor: join scanner thread on __exit__
......................................................................
netlink: monitor: join scanner thread on __exit__
In case a timeout occurs, the _scan() function ultimately ends, but
nothing explicitly waits on its control thread. It is harmless in the
case of netlink.monitor, but it is impolite to leak threads, even for a
short while.
This patch explicitly waits for the scan thread to finish before exiting
from an event monitor context manager.
The issue was spotted by running the tests with --with-thread-leak-check.
Change-Id: I9dd0097ad8d6ba5288e27b8f02bc62fc562030e9
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Signed-off-by: Petr Horáček <phoracek(a)redhat.com>
---
M lib/vdsm/network/netlink/monitor.py
1 file changed, 8 insertions(+), 1 deletion(-)
Approvals:
Nir Soffer: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Petr Horáček: Verified
Dan Kenigsberg: Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/69041
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9dd0097ad8d6ba5288e27b8f02bc62fc562030e9
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>