Allocations committed against the destination host are not reverted
during live migration rollbacks. The reason is that we're not passing
the migrate data object properly.
At some point, the rollback callback signature has changed. We picked
it up but only for the main (non-cluster) driver:
I5f247d733642464f4ede0430d4dfc8a27a02e7fd
This change addresses the cluster driver as well.
Change-Id: I8c509d411b8fdf7e65622f1fbb2095fe9c3b98b5
Closes-Bug: #1841068
(cherry picked from commit d9c1cb6aa1)
Some issues were not caught during the initial mock autospec
patch which was added to compute_hyperv, and now they're causing
some unit tests to fail. This patch fixes those issues.
Secondly, the docs job relies on tools/tox_install.sh to install
nova, but it is not passing the required arguments, causing it to
fail. This patch updates the script so it can properly execute.
Change-Id: I91cbadb2a05ee4880c3fa761696818ec95c40df2
(cherry picked from commit 48bb0d6b41)
tests: uses oslotest as the test base
oslotest's base will add mock.patch.stopall, so we don't have to.
Change-Id: If13a465000648dfbf1e229a3b8d765e8b3204db4
(cherry picked from commit 8dd2910195)
This change ensure that we're honoring the "remove_unused_base_images"
config option, allowing deployers to disable the auto-removal of
old images.
Change-Id: I49a0a83ab34ca0b9da5d589aaa9006d169275b15
Closes-Bug: #1773342
(cherry picked from commit 7caef58be0)
We need this in a later change to pull volume attachment
information from cinder for the volume being detached so
that we can do some attachment counting for multiattach
volumes being detached from instances on the same host.
(cherry-picked from commit d2941bfd165055348dd584b630d4e631ef05e328)
Change-Id: If6e869b1c3516220b7deb0599d699caa2ed33889
Related-Bug: #1752115
(cherry picked from commit e27b942877)
Hyper-V exposes instance serial console ports through named pipes.
We're consuming those named pipes, logging the output to a file,
retrieving the content when the console output is requested.
The issue is that the log file used by os-win never gets flushed
(unless closed). For this reason, we're returning incomplete output.
This change ensures that we're flushing the log file before attempting
to read its content.
Closes-Bug: #1741494
Change-Id: Ic558b16b317e0b1478cc259327d1336f7589afe3
Depends-On: I4b5eb7579ac0c92e9c3630539b0c4d76f5b98c6d
(cherry picked from commit eb2c7b20a3)
There are critical known issues related to the cluster driver and
passthrough disks.
When an instance is failed over, the instance attached volumes need
to be accessible on the destination host. This will not happen
transparently for such disks, for which reason the instance may
bounce between a few nodes and then end up in error state,
basically defeating the purpose of the cluster driver.
This change ensures that the Hyper-V Cluster driver rejects
iSCSI/FC Cinder volumes, raising an error that describes possible
alternatives.
Closes-Bug: #1749958
Change-Id: I231b51c648e1349fcb8df4cd818b2d2887a55d69
This change documents how to identify Cinder volumes from within
the guets as well as online resize limitations.
Change-Id: I725e958ae85353acdf1a1eb110f1a03c3629f0b2
We've enabled the release notes zuul job quite late in the release
cycle, for which reason some of the notes are missing, being added
by this change.
This change also adds a reference to the release notes page on
the main compute-hyperv docs page.
Change-Id: If5c717bad101b55379201a02afe6f88b3cd9345d
For some code blocks, we have a superfluous 2-space indentation.
For this reason, the generated docs are quite inconsistent.
This change fixes this issue.
Change-Id: Ib37906f61875c17d32635f3b11937f429a7027fc
This patch adds additional documentation regarding various
features introduced in the Hyper-V Driver, how to configure
the compute node in order to use them, and how to use them:
* Generation 2 VMs
* UEFI Secure Boot
* Shielded VMs
* Setting boot order
* RemoteFX
* Hyper-V vNUMA
* QoS
* PCI devices
* Serial ports
* Nested Virtualization
Additionally, this patch adds more details on how to add the
compute nodes to Nova cells.
Change-Id: Ie475da2a8dca947344de22e287225c972258b3c2
The eventlet clock must be patched with the monotonic clock
in order to avoid issues caused by drifs of system time.
This is done in nova/__init__.py, but if compute-hyperv is
installed after nova, compute-hyperv will overwrite that
file.
Closes-Bug: #1749088
Change-Id: I0d32406a65d1f4d57435766d41a0f1c1efba2782
At some point, we've removed the instance snapshot lock, allowing
destroy requests to proceed immediately. We assumed that this
should be fine as long as we're stopping pending WMI jobs.
The issue is that the snapshot operation is still not fully
preemptive. VHD related operations (e.g. copy, merge, upload to
glance) are not preemptive at the moment, for which reason
destroy requests will fail due to file locks.
Unless the new 'force_destroy_instances' config option is enabled
(disabled by default), we're locking the destroy/snapshot operations.
This partially reverts commit
e4208017fe.
Closes-Bug: #1748394
Change-Id: I3119c5bc5a714be867af19510dfab576f354835b
When spawning instances, we're checking if the instance dir
already exists, in which case we're logging a message, stating
that existing instance files will be reused.
Well, at least that's what we thought we were doing. Actually,
we're always logging this message as the check is wrong.
This change fixes this issue.
Change-Id: I6cf52ae23d90e687103e8bea0b6c4f9eaba6d36c
Closes-Bug: #1747961
Since compute-hyperv is not an official OpenStack project, we cannot
host our docs on docs.openstack.org. For this reason, we'll use
readthedocs.
As readthedocs will not use tox, we have to explicitly provide the doc
build requirements that are not included in requirements.txt.
Unfortunately, we'll have to update this file manually at least once
per release.
Also, reathedocs will invoke sphinx-doc from the /doc dir, for which
reason it cannot find etc/compute-hyperv-config-generator.conf. The
according reference is updated, explicitly declaring the namespaces
to be used when generating the config reference.
Change-Id: Idab6f10f92f7f2e40962f1cabaac8691e6c46619
When spawning an Hyper-V instance with NICs having the vif_type "hyperv",
neutron will fail to bind the port to the Hyper-V host if the neutron
server doesn't have the "hyperv" mechanism driver installed and configured,
resulting in a PortBindingFailed exception on the nova-compute side.
When this exception is encountered, the logs will say to check the
neutron-server logs, but the problem and its solution are not obvious
or clear, resulting in plenty of questions / reports, all having the
same solution: is there an L2 agent on the host alive and reporting to
neutron, and if neutron Hyper-V agent is used, make sure to install
networking-hyperv and configure neutron-server to use the "hyperv"
mechanism_driver.
Change-Id: I94ed8f15f3c6312a6f675b9255aff7e9d76f96fc
Closes-Bug: #1744032
Zuul no longer requires the project-name for in-repo configuration.
Omitting it makes forking or renaming projects easier.
Change-Id: I07536e3a73fcf262c8fce5a393d9f2b8c8ea99f7
By default, mock.patch's autospec argument is None, meaning that
there's no signature checking for the patched methods and funtions.
oslotest.mock_fixture.patch_mock_module fixes a few issues within
mock.patch functions, as well as setting autospec=True by default,
unless otherwise specified or new_callable, create, spec arguments
are passed in.
Updates HyperVBaseTestCase to autospec the classes used by different
*Ops classes.
Change-Id: Ifbdc185d0b50e29c5d5f3ff036141253d2323076
Partial-Bug: #1735588
This patch adds basic details about:
* Supported OS versions
* Requirements and host configurations
* MSI installer, its features, and arguments
* Further steps after installing and configuring the
nova-compute service
* Troubleshooting tips
* Usage
Change-Id: Icf7ba18121547ba7ea37fdefdb3c9510aeb1654e
This patch adds the 'evacuate' feature to the compute-hyperv driver.
It works by removing the 'delete_disk_files' from the 'spawn' method,
preventing it from happening every time a new instance is spawned, and
checking whether or not disk files already exist for the given machine.
If they do, they will be used when evacuating the instance on another
host
Change-Id: Ie3e847b9f285cf47b474cdcc96e289c7d053c8a0
Starting with Rocky, we will support only Windows / Hyper-V Server
2012 R2 or newer.
(cherry-picked from 2e51da875aceeb21d5bde9ab844c3882178ccd99)
Change-Id: I6844a0664860d09ecd259cea7715fe50814b5362
A new driver capability has been introduced, specifying if volume
multiattach is supported.
The issue is that our driver doesn't have it yet, so attaching
volumes currently fails with a KeyError:
http://paste.openstack.org/show/647116/
This change adds the missing capability field.
Change-Id: I24a3be98d5b7afd1d56eea9bfca22fbca5c64f42
The Nova driver 'block_device_info_get_root' method has been renamed
to 'block_device_info_get_root_device', for which reason we're now
getting attribute errors when spawning instances.
This change updates the method call.
Change-Id: I811ca11d347a63556b66af3d5db1524fe325485e