os-win/os_win/tests/unit
Lucian Petrut 6c6955f9f2 Limit Failover Cluster WMI provider usage
The Failover Cluster WMI provider is quite unreliable, especially
in recent Windows Server 2016 versions.

After failovers, some valid WMI queries fail with "Invalid Property"
errors, which really looks like a WMI provider bug. Event listeners
are affected as well, for which reason we're missing VM failover events.

This change refactors "clusterutils", switching to the underlying
C library.

The new failover event listener cannot provide the source of the
migrated instances, so we're keeping the old one as well for backwards
compatibility, for now.

The only other places in which we're still using WMI are the methods
that add or destroy VM cluster roles.

The reason is that we'd have to explicitly create the the cluster
resources and group, probably set some resource dependencies and
properties. For now, it's easier/safer to just stick with the WMI
method (which really shouldn't fail).

Also, destroying VM cluster groups using clusapi's DestroyClusterGroup
function behaves strange. VMs get recreated asyncronuously and put in
suspended state, breaking everything. We're avoiding it for now.

Closes-Bug: #1798069

Change-Id: I63d1aa3a6f9fb12d08478eb41fe973b1582b540c
2018-10-25 11:49:55 +03:00
..
utils Limit Failover Cluster WMI provider usage 2018-10-25 11:49:55 +03:00
__init__.py Move unit tests to a separate folder 2016-10-17 14:25:45 +03:00
test_base.py Limit Failover Cluster WMI provider usage 2018-10-25 11:49:55 +03:00
test_hacking.py Update log translation hacking rule 2017-07-05 00:39:00 -04:00
test_processutils.py tests: Use mock autospec in unit tests 2018-01-22 08:39:13 -08:00
test_utils.py tests: Use mock autospec in unit tests 2018-01-22 08:39:13 -08:00
test_utilsfactory.py Ensures that all classes have the same interface as their parents 2018-01-31 01:57:45 -08:00