Commit Graph

479 Commits

Author SHA1 Message Date
Lucian Petrut c18786d179 Allocations leaked during migration rollback
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)
2019-09-04 13:38:26 +00:00
OpenDev Sysadmins 26207db8dc OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:54 +00:00
Zuul 63b2ea5e01 Merge "Avoid cleaning up cached images when configured not to" into stable/queens 2018-08-08 13:41:52 +00:00
Claudiu Belu 49dcf6ea7a Adds stable/queens branch to .gitreview
Change-Id: I651d146ed178cd65430790ef9e6fd625e74cfd5f
2018-08-02 08:23:25 -07:00
Claudiu Belu 68897c48e6 Fixes zuul issues
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)
2018-08-02 08:22:44 -07:00
Lucian Petrut 35fc2fa6da Avoid cleaning up cached images when configured not to
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)
2018-08-02 13:02:10 +00:00
Zuul 74daeb2219 Merge "Flush console log file before retrieving content" into stable/queens 2018-03-13 19:04:13 +00:00
Claudiu Belu 2e3b85f291 Pass user context to virt driver when detaching volume
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)
2018-03-13 13:44:26 +00:00
Lucian Petrut 4af4d6c4e2 Flush console log file before retrieving content
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)
2018-03-13 13:43:16 +00:00
Zuul 77b1b06f4c Merge "Cluster driver: Blacklist iSCSI/FC volume drivers" 2018-02-16 19:11:26 +00:00
Zuul 481c5c9439 Merge "docs: Update Cinder volume usage section" 2018-02-16 19:08:45 +00:00
Zuul 84b87fbb11 Merge "Add release notes" 2018-02-16 14:31:05 +00:00
Lucian Petrut 937aa55ffa Cluster driver: Blacklist iSCSI/FC volume drivers
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
2018-02-16 16:29:11 +02:00
Lucian Petrut 707432f45a docs: Update Cinder volume usage section
This change documents how to identify Cinder volumes from within
the guets as well as online resize limitations.

Change-Id: I725e958ae85353acdf1a1eb110f1a03c3629f0b2
2018-02-16 16:12:23 +02:00
Lucian Petrut 5b43e2ded4 Add release notes
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
2018-02-16 16:12:20 +02:00
Zuul 1fc3788eb8 Merge "doc: Adds vNIC plug / unplugging information" 2018-02-16 14:05:20 +00:00
Claudiu Belu 734b46ec6d doc: Adds vNIC plug / unplugging information
There are a few restrictions when attaching / detaching a
vNIC to a Hyper-V instance.

Change-Id: Ibbfb3271f357d31446174c2e3c00f1478455df1b
2018-02-15 21:03:24 -08:00
Lucian Petrut f50f40ffc4 [Trivial] docs: fix code blocks indentation
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
2018-02-15 19:41:51 +02:00
Lucian Petrut f5d32fa5fa docs: Update storage reference
This change provides additional information about the available
storage options.

Change-Id: Ia1d17632210469021aa1a1d3e3dc1b8d38a8d466
2018-02-15 19:41:47 +02:00
Zuul 27dcc93473 Merge "Adds documentation (part 2)" 2018-02-15 13:19:08 +00:00
Claudiu Belu 958eda9796 Adds documentation (part 2)
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
2018-02-15 03:58:06 -08:00
Zuul 7cc9d95e29 Merge "Fixes eventlet monotonic clock issue" 2018-02-15 07:48:04 +00:00
Claudiu Belu 897321130a Fixes eventlet monotonic clock issue
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
2018-02-14 07:48:40 +00:00
Zuul 3d4bc292dd Merge "Lock snapshot/destroy operations" 2018-02-13 14:55:29 +00:00
Lucian Petrut 95e979d907 Lock snapshot/destroy operations
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
2018-02-13 14:30:18 +00:00
Zuul 0664a5181f Merge "Zuul: Remove project name" 2018-02-13 14:11:26 +00:00
Lucian Petrut c4c65971d3 Fix instance dir check when spawning
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
2018-02-09 11:07:20 +02:00
Zuul 19917084d3 Merge "Prepare for readthedocs" 2018-02-07 11:53:31 +00:00
Lucian Petrut 3d816ede99 Prepare for readthedocs
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
2018-02-07 13:11:16 +02:00
Zuul ce8c2879c0 Merge "hyper-v: Logs tips on PortBindingFailed" 2018-02-07 08:39:55 +00:00
Claudiu Belu d4fa1d7da1 hyper-v: Logs tips on PortBindingFailed
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
2018-02-07 08:12:33 +00:00
Zuul ad53c88d4e Merge "tests: autospecs mock.patch and classes usages" 2018-02-02 12:19:29 +00:00
James E. Blair 6596aab8f4 Zuul: Remove project name
Zuul no longer requires the project-name for in-repo configuration.
Omitting it makes forking or renaming projects easier.

Change-Id: I07536e3a73fcf262c8fce5a393d9f2b8c8ea99f7
2018-02-01 12:00:27 -08:00
Zuul 54d038912f Merge "Adds documentation" 2018-02-01 12:11:28 +00:00
Zuul 95116aae72 Merge "Deprecate unused config option" 2018-01-31 16:25:09 +00:00
Zuul 184a64f7fa Merge "Evacuate feature" 2018-01-31 15:12:33 +00:00
Claudiu Belu 26c91401ee tests: autospecs mock.patch and classes usages
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
2018-01-30 06:11:29 -08:00
Claudiu Belu efe5d8634b Adds documentation
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
2018-01-30 02:23:46 -08:00
Lucian Petrut 7b7745219e Deprecate unused config option
The 'cluster_event_check_interval' config option is no longer used
and is now deprecated.

Change-Id: If5b1f7338ed549a36d1c5afc33c707ad98a6b43a
2018-01-29 18:06:13 +02:00
AlexMuresan 70f3477a3d Evacuate feature
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
2018-01-29 12:05:17 +00:00
Claudiu Belu c9629cf984 hyper-v: Deprecates support for Windows / Hyper-V Server 2012
Starting with Rocky, we will support only Windows / Hyper-V Server
2012 R2 or newer.

(cherry-picked from 2e51da875aceeb21d5bde9ab844c3882178ccd99)

Change-Id: I6844a0664860d09ecd259cea7715fe50814b5362
2018-01-28 05:31:07 -08:00
OpenStack Proposal Bot 269db011e8 Updated from global requirements
Change-Id: I14115f6b9a854699368e81b4215df75ab6a447c0
2018-01-27 21:06:56 +00:00
OpenStack Proposal Bot 264efe76c1 Updated from global requirements
Change-Id: Iaee8326c4c8cb4935cce0e0ce1734443d103687d
2018-01-24 00:50:51 +00:00
Zuul dd0e0c8796 Merge "Add missing capability, breaking volume attachments" 2018-01-19 19:57:43 +00:00
Lucian Petrut 0a1a94dfdc Add missing capability, breaking volume attachments
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
2018-01-19 21:14:00 +02:00
OpenStack Proposal Bot 7eaab31dcb Updated from global requirements
Change-Id: Id59ffcd1617e4bf6a572042a445a7bc892683863
2018-01-17 20:29:51 +00:00
Zuul 4d84341387 Merge "sync: Update renamed method usage" 2018-01-17 10:17:59 +00:00
Lucian Petrut 81da493c3e sync: Update renamed method usage
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
2018-01-17 11:08:44 +02:00
OpenStack Proposal Bot 7a9dd48398 Updated from global requirements
Change-Id: I4b20bf02916f10efad47ca23f13a59c691bd71e5
2018-01-16 04:04:01 +00:00
Zuul d69a7e887c Merge "Cleanup migration files" 2017-12-21 11:34:53 +00:00