Use latest release 1.1.0 and compatible changes w.r.t pep8
It's worth noting that the pep8 package has been renamed to
pycodestyle. New hacking packages no longer install the old pep8
package automatically.
Change-Id: Ibbad8b42188ade597d9a3032389e930c2f5fe2d0
This will expose Windows mutexes. We usually rely on file locks
when synchronizing multiple processes, mostly for portability
reasons.
Some times, file locks may not be an option, in which case a
named mutex can be useful. We intend to use this in Glance when
ensuring that only one scrubber can run at a time.
Change-Id: I4a2a51e2164c6f5816f2af2641d41d1db7870600
This change cleans up the utilsfactory map, making it easier to add
new classes.
Most classes have 6.2 as a minimum version, without having a maximum
version cap. For this reason, this change sets those versions as
defaults so that we don't have to be explicit every time.
At the same time, we're now using a list for each class type, instead
of a dict that uses the class name as a key (which is redundant). So,
something like this:
'networkutils': {
'NetworkUtils': {
'min_version': 6.2,
'max_version': 6.3,
'path': 'os_win.utils.network.networkutils.NetworkUtils'},
'NetworkUtilsR2': {
'min_version': 6.3,
'max_version': None,
'path': 'os_win.utils.network.networkutils.NetworkUtilsR2'}},
... becomes
'networkutils': [
{'max_version': 6.3,
'path': 'os_win.utils.network.networkutils.NetworkUtils'},
{'min_version': 6.3,
'path': 'os_win.utils.network.networkutils.NetworkUtilsR2'},
],
Change-Id: I7919617166b2e872f1b50c0a0f40196fc90e9a82
This change adds a few helpers that will allow creating and consuming
pipes. While similar functions are already provided by the built-in
os module, the handle inherit flags do not work on Windows.
We intend to use those helpers in Glance when dealing with
subprocesses.
Change-Id: I6ed456b5f95b5691da555e36846de4286ad96f15
os-win should silently pass when requested to disconnect a vhd that's missing.
At the moment, it's erroring out, which prevents some Nova instances from being
cleaned up.
This change checks if the image to be disconnected actually exists before
attempting to open it.
Change-Id: Ic734d38e1939165a89a79842d37e98b4cbbcb3bf
Closes-Bug: #1810927
Small cleanups:
* Use openstack-lower-constraints-jobs template, remove individual
jobs.
* Sort list of templates
Change-Id: I3688fc5be123cff756ad8d778e6c97b2b6173c9b
Needed-By: https://review.openstack.org/623229
WMI jobs may return multiple errors, but only one of them
would be logged.
This change ensures that we're fetching all of them, calling the
Msvm_ConcreteJob.GetErrorEx method.
Change-Id: I7311e63e4f95c4e1d17357d28fdd1c7425362270
Closes-Bug: 1748208
Due to the known issues related to WMI object caching, it's safer
if we just disable it by default.
Change-Id: If859917af9a185fc612231002d252c9e0ac6ddd3
Related-Bug: #1801701
One cluster listener daemon isn't properly mocked, for which reason
it's running in a separate thread and calling mocked methods,
affecting other test cases and their assertions.
http://paste.openstack.org/raw/734339/
This change mocks it properly, ensuring that other test cases will
not be affected by it.
Change-Id: I2e9d2b98457bac280bf7a19afc12dc822a83eb0f
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
This will allow fetching various VM memory information, such as
dynamic memory limits and reserved amount.
Change-Id: Ifa9649e490a851090cdf3f8a0390e4ab7d5a6373
This change will allow enabling metrics for individual virtual disks.
The Nova Hyper-V driver will use it when attaching Cinder volumes.
Note that Hyper-V does not support collecting metrics for passthrough
disks at the moment.
Change-Id: Iaba32ca94b2c09661f150fa4b12b2c7eb83ff6d9
Partial-Bug: #1794456
We need a way to retrieve VM nic names. This will allow the Nova
Hyper-V driver to enable port metrics when receiving instance power
on events.
It's safer to query Hyper-V directly rather than relying on Nova's port
cache.
Change-Id: Ibe7409b392b91204f0cea2bdd32c86ec03d06b67
Partial-Bug: #1794456
At the moment, port metrics are not enabled. The reason is that we're
using the wrong switch port WMI class.
This issue went more or less unnoticed, especially due to the fact that
we're currently ignoring the according WMI method return code.
This change ensures that port metrics are properly enabled and that an
exception will be raised when failing to do so.
Closes-Bug: #1794291
Change-Id: I8086e7dd9e134749760b05469f5b2c8bcfdcdbde
In a few places, we're using "is" or "is not", when comparing
numeric variables.
This is incorrect and will give unexpected results when the types
do not match (for example, if one of the variables is a long int):
http://paste.openstack.org/raw/730618/
This change fixes those comparisons.
Closes-Bug: #1794068
Change-Id: Ibf28778879050cfdfa82ef4f9b587170dde6203f
We're using a hardcoded 15 seconds timeout when canceling WMI jobs.
Some jobs may not be cancelable, some may take longer to stop. For
example, Nova instances may end up in error state after attempting
to delete them as this hardcoded timeout gets exceeded.
That being considered, we're now adding a config option for this,
also increasing the default timeout to 2 minutes.
Ideally, Nova should pass a timeout here. Still, by adding a config
option at the os-win level, it's easier to backport this to older
releases, also providing a default for any kind of WMI job.
Change-Id: I797366c40a3a4bb74fe925bd10697f227e22915c
Closes-Bug: #1790890
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: I03acea5710dc85938d1b77bdc81c3f8704f64659
Story: #2002586
Task: #24345
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.
Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.
Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: I3683d6634b8973ef63f467fb6466bf57f984b3e9
Story: #2002586
Task: #24345
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ieb432c391d3dcc798a30516ed96528a15f526d48
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: Ia95aa8f003151cbce870acc54f2053cbcfc6effb
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This change provides additional log information when handling WMI
jobs. This allows us to get a better picture of the job states.
This will be extremely helpful for debugging purposes, as currently
we don't get much information about pending jobs or errors that
occur when stopping jobs.
Closes-Bug: #1748208
Change-Id: Ibb4d5969eea13a0b11a6d5b46b797482a6d2a20b
VMUtils10 has a few extra methods when compared to VMUtils. This
patch adds those methods to VMUtils (raising NotImplementedError).
Adds unit test that checks for future inconsistentcies.
ISCSIInitiatorCLIUtils has been deprecated and removed, but it was
not removed from utilsfactory.utils_map. This patch addresses this
issue.
Closes-Bug: #1746986
Change-Id: I2a963304fc67595bc18e719e6b4420f553519c41