When using WMI, the resources passed to the
Msvm_VirtualSystemManagementService are not cleaned up
by the garbage collector if the Service object is still
referenced (cached as a property in BaseUtilsVirt).
PyMI doesn't have this issue, so the Service objects can be
safely cached.
This issue only affects Windows / Hyper-V Server 2012.
Closes-Bug: #1697389
(cherry picked from commit 49a012e83c44d28ee533aace22c42b1781b8e5e2)
tests: Sets baseutils.BaseUtilsVirt._old_wmi
There is a race condition between tests, and because
the _old_wmi is not set, it will try to load it, but since it
is mocked, it cannot, and it shouldn't.
Reviewed: https:/ /review. openstack. org/475590 /git.openstack. org/cgit/ openstack/ os-win/ commit/ ?id=938a99a7a7b 1f55b7e31f0ff02 8d4f72ee0e2cdb
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit 938a99a7a7b1f55 b7e31f0ff028d4f 72ee0e2cdb
Author: Claudiu Belu <email address hidden>
Date: Tue Jun 13 16:07:58 2017 +0300
Fixes cached old WMI service objects issue
When using WMI, the resources passed to the VirtualSystemMa nagementService are not cleaned up
Msvm_
by the garbage collector if the Service object is still
referenced (cached as a property in BaseUtilsVirt).
PyMI doesn't have this issue, so the Service objects can be
safely cached.
This issue only affects Windows / Hyper-V Server 2012.
Conflicts:
os_ win/tests/ unit/utils/ compute/ test_migrationu tils.py
Closes-Bug: #1697389 ee533aace22c42b 1781b8e5e2)
(cherry picked from commit 49a012e83c44d28
tests: Sets baseutils. BaseUtilsVirt. _old_wmi
There is a race condition between tests, and because
the _old_wmi is not set, it will try to load it, but since it
is mocked, it cannot, and it shouldn't.
Change-Id: Id029baf2e72f7b 67eb6af3b3e66f9 98b902fd412
Change-Id: If8df0bf0a2f13a 9e94993dde8b2a1 8943f2e9f83