The Nova Compute manager expects a VirtualInterfacePlugException
exception to be raised when a vif plug fails.
This particularly affects the service initialization step. If we're
raising an exception other than the above mentioned one, the exception
won't be cought, in which case the Nova Compute service will stop.
This change ensures that we're raising the expected exception if vif
plugging fails.
(cherry picked from commit 6adc5cf4d4)
Change-Id: Ibaa405577d4fa06f27fdd9440aca49be0c620af5
Closes-bug: #1736392
os-win now allows setting a timeout when migrating clustered
instances. When that timeout is hit, pending migrations will be
canceled.
For the moment, we're only going to use this timeout value when
live migrating clustered instances.
The default timeout is 300s, adjustable through a config option.
Conflicts:
hyperv/nova/conf.py
NOTE(claudiub): the config options have been refactored on master.
Change-Id: I21a7a8edd763f0203b58dc58fb30b7a495ec04cd
(cherry picked from commit 067f602612)
This change ensures that the hostname is used consistently throughout
the Hyper-V driver.
This fixes a VM port binding issue in case of failovers.
Conflicts:
hyperv/nova/cluster/clusterops.py
Change-Id: Ic1c9644721dad451fb68131bdc5f9b3397d5e267
Closes-Bug: #1694238
(cherry picked from commit 2205dc79e0)
Currently, plug_vifs is called when powering on the instance.
The call to wait_for_plug_events will give a timeout waiting
for the plug event when using neutron-ovs-agent.
This patch addresses this issue by moving the call to plug_vifs
from power_on to after the create_instance call, which is prior
to waiting for plug events. This change modifies the behaviour
of power_on only during the instance spawn, the other calls
remaining the same.
Change-Id: I13b7caf84434a4b9b6f2795cddc7401874c46647
Closes-Bug: #1684250
(cherry picked from commit ae76684e07)
Although the Hyper-V driver is used with VHDX images most of the
time, it rejects Glance images marked as VHDX.
Note that for legacy reasons, people usually just mark them as vhd
at he moment, which is misleading and unsafe.
This change ensures that such images are handled properly.
Closes-Bug: #1693470
Change-Id: I8cf4339cdf17721c257cf7aa5597594aa2d1c53f
(cherry picked from commit 387c53cccc)
The patch that introduced setting boot order to the nova
Hyper-V driver [1] was using a method that no longer existed
(Generation 2 VMs only). That method was renamed by the patch
that refactored volumeops (to use os-brick) [2].
[1] d68c04299aa2c04aea16e881d93076236cc64d7b
[2] 758a32f7cef6c675b35c04dd8d276c918be188dd
Change-Id: Ib374199a972ed1ab4342e08c68d1713051a76517
Closes-Bug: #1687570
When using multiple CSVs, we rely on the instance itself when
locating its files.
The issue is that we're fetching the instance files location after
destroying the instance, for which reason we're leaking instance
files.
Closes-Bug: #1633556
Change-Id: Ic09ad9e8346a69b74d6f930ee0756f511d0c3ac6
(cherry picked from commit 90a08935ed)
At the moment, whenever we live migrate an instance, we'll get a
trace in the logs because of a log formatting exception.
This change fixes this trivial issue.
Change-Id: Ie8119bfe90690fd4a13e03162963b25696f3d565
(cherry picked from commit 820fa8ca5e)
At the moment, we handle each failover event sequentially, also
waiting a fixed amount between them.
This change ensures we do this concurrently and that we don't wait
between events.
Change-Id: I225bb63050c7f044d1c7562bcdb2640da4321273
(cherry picked from commit 9f0ea777a7)
nova.exception.MissingParameter has been removed, which is causing
the unit tests to fail.
Replaces the raised MissingParameter exception with InstanceUnacceptable.
Change-Id: I09a498a3eb898fdb908e134450adef8aeb3863b5
Since the network_info wasn't getting passed to vmops.power_on
after a resize/cold migrate confirmation, the OVS VIFs weren't
getting plugged.
(cherry-picked from commit 568a682e5efa6e4fd49b69e02cbd80f1d8a96c63)
Change-Id: I9097debeb68cb25dec27e7b3e979cf51d951c250
Closes-Bug: #1657424
At the moment, the instances will be automatically saved whenever
the host is shut off. This adds a disk overhead which may not be
desired.
For this reason, this patch makes it configurable. By turning on
'instance_automatic_shutdown', instances will be turned off instead
of being saved when the host is turned off.
Note that existing VMs will not be affected by this config option.
For this reason, whenever an admin will change it, he has to make
sure that the existing VMs are updated.
Instance disk overhead will be calculated based on the assumption
that all the instances are configured the same way.
Depends-On: I68490a4e257eef88bdd07f3ec14d345a2df79a4a
Change-Id: I46c1497fe1863b09c5f41ddd0cbd6a23e9e4828c
Splits the create_instance method into two, separating the
"updateable" resources from the method. This new method will be
called from migrationops in the following patch, when performing a resize.
Change-Id: I94277e8f1a58ecc1529f3cf92deac3596f5b65d9
Simplifies the cold resize / migration process by making the
destination node pull the VM files from the source instead of
vice-versa. Doing so, the logic is simplified greatly, the
destination node only has to copy the files, regardless if it
is on shared storage or not.
Solves the migration issue when the compute nodes have different
instances_path config option set, as the destination node will
copy the files to its configured instances_path folder.
Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>
Change-Id: Ia44850675e8cb8eb21017e1c4321802574dfe6a0
If there are no VMs running on the compute node, the given instance_uuids
will be an empty array. This should be added as a filter, otherwise, the
entire list of instances will be returned.
Change-Id: I9a77eeb410f59feda5ee84429eae8895ae3f3c26
Closes-Bug: #1660293
Discrete Device Assignment is a new feature in Windows Server 2016,
offering users the possibility of taking some of the PCI Express
devices in their systems and pass them through directly to a guest VM.
Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>
Depends-On: I8e7782d3e1e9f8e92406604f05504a7754ffa3c2
Implements: blueprint hyper-v-pci-passthrough
Change-Id: Ica395a982da1ffa4ead41601124d192a838ea1ad
The post_start_vifs method has been renamed to plug_vifs in a
previous patch, but no all the references have been updated.
Change-Id: Ic70197e4a186202a5f50fd6548fc354f07bc7076
The driver will now detect and reclaim any failovered instances
that appeared on the host while the nova-compute service was down.
Closes-Bug: #1646809
Change-Id: Id7b053f9debcb869efb4440cfaf6a3b66b067b8c