Commit Graph

394 Commits

Author SHA1 Message Date
OpenDev Sysadmins a27efc35fd 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 f7b8bca92c Merge "Cleanup migration files" into stable/pike 2018-04-04 15:31:47 +00:00
Lucian Petrut 8b20b8b5c4 Cleanup migration files
At the moment, if an instance migration/resize fails and is deleted
while being in error state, the instance revert files are not deleted.

This change fixes this issue, ensuring that instance migration files
are cleaned up when an instance is destroyed.

(cherry-picked from commit 24cc1f3fff)

Closes-Bug: #1724240

Change-Id: I3752e7d0bd96a7d418563afd997739e88a87914d
2018-04-04 15:12:40 +00:00
Claudiu Belu d1f0e66e28 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.

(cherry-picked from commit d4fa1d7da1)

Change-Id: I94ed8f15f3c6312a6f675b9255aff7e9d76f96fc
Closes-Bug: #1744032
2018-04-04 15:11:42 +00:00
AlexMuresan dda87c567e Raise proper exception in case of vif plug errors
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
2018-04-03 13:53:06 +03:00
Claudiu Belu 47c6e678d2 hyperv: report disk_available_least field
Reporting the disk_available_least field can help in making sure
the scheduler doesn't pick a host that cannot fit a specific flavor's
disk.

The reported local_gb_used is calculated based on the instances spawned
by nova on a certain compute node, and might not reflect the actual
reality, especially on shared storage scenarios.

Change-Id: I20992acef119f11f6584094438043a760fc4a287
Closes-Bug: #1717892
(cherry picked from commit 6479f5539d)
2017-09-19 13:34:07 +00:00
Jenkins b9063f33f0 Merge "Fixes cold migration path trimming issue" into stable/pike 2017-09-15 10:24:35 +00:00
Claudiu Belu 4672aa051d Fixes cold migration path trimming issue
During cold migration, the following steps happen:

1. The source node will stop the VM, copy the VM files to a _revert path,
destroy the VM, and return the _revert path as disk_info.
2. The destination node will get that disk_info, and if it was configured
not to move the storage (multiple CSVs cluster scenario), it will just
copy the files to a path without the ending _revert.

The issue is that rstrip can strip more characters than desired. It will
remove all characters contained by "_revert" from the given path's ending.
For example:

"instance_000000be_revert".rstrip("_revert") => "instance_000000b"

Change-Id: I784835800a961be4ba755a4d51edbc931eccdc57
Closes-Bug: #1716862
(cherry picked from commit e00240f5d7)
2017-09-15 08:55:55 +00:00
Claudiu Belu 0804098383 migration: Updates the VM before VM disk checks
In the case of multiple CSVs scenario, disks are not migrated on
cold migration. Thus, pathutils relies on the VM's ConfigurationDataRoot
when determining its disk file locations, but the VM's
ConfigurationDataRoot is set after checking the disks, resulting in
a DiskNotFoundException.

This commit addresses this issue.

Change-Id: I589239c6ebcd3cf706bc188179a74c97bb831a0d
Closes-Bug: #1716886
(cherry picked from commit 0c673d5c5c)
2017-09-15 08:55:49 +00:00
Claudiu Belu 5d559c3340 Installs nova stable/pike as a dependency
Change-Id: Iea5d7cfdd08d691c3f009ad9e4eecfccc3859851
2017-09-15 01:22:01 -07:00
Claudiu Belu 185f9e3720 Fixes vmops destroy planned VM call
vmops' destroy method calls the wrong method "destroy_planned_vm"
instead of "destroy_existing_planned_vm".

Change-Id: I1f2f495bf55921a2322e71e224ed67990db4a02e
(cherry picked from commit bd12ddf55e)
2017-09-04 14:43:12 +00:00
Lucian Petrut 01f12ef8bf Perform proper cleanup after failed instance spawns
This change ensures that vif ports as well as volume connections
are properly removed after an instance fails to spawn.

In order to avoid having similar issues in the future, the
'block_device_info' and 'network_info' arguments become mandatory
for the VMOps.destroy method.

Side note: for convenience reasons, one redundant unit test has
been squashed.

Closes-Bug: #1714285
Change-Id: Ifa701459b15b5a2046528fa45eca7ab382f1f7e8
(cherry picked from commit 6e715ed580)
2017-09-01 11:31:38 +00:00
Lucian Petrut 6887bbf70b Disconnect volumes after cold migrations
After cold migrating an instance, volumes are not disconnected on
the source node side. This change fixes it.

A recent change fixed a similar issue regarding vif ports but we've
missed volume connections.

Change-Id: I094b405a151366236d6b86e45e7a989818006e2b
Closes-Bug: #1705683
(cherry picked from commit fedb492a14)
2017-08-31 10:46:32 +00:00
Claudiu Belu 8c646358b9 Fixes wrong method call in volumeops
planned_vm_exists method exists in migrationutils, not in vmutils.

Change-Id: I9af57254b90ef787b4633fcb367a77857a018ff4
(cherry picked from commit 90b372ea42)
2017-08-29 11:04:49 +00:00
Claudiu Belu ab6feea103 hyperv: Cleans up live migration Planned VM
If an instance having iSCSI volumes attached is being
live-migrated, a Planned VM is created at the destination.
If the live-migration fails, the Planned VM is not cleaned
up at the destination.

Depends-On: I91636a82b057f566eab9887c422911163668f556

Change-Id: If62941eb44ff1a5bbf5df01f5cfd19d9008d98bb
Closes-Bug: #1604078
2017-08-25 12:58:24 +03:00
Claudiu Belu 662553aa3b Updates default gerrit branch to stable/pike
Change-Id: Ice1ea9f3148f18dd19da633df9fa312568f28c5c
2017-08-24 02:25:46 -07:00
Claudiu Belu 5daa3a6c44 Updates requirements (Pike)
Change-Id: I7927730385f3f3a5ac301ddaccc101b6485a0ca6
2017-08-24 02:18:43 -07:00
OpenStack Proposal Bot d0a69d9a3c Updated from global requirements
Change-Id: I31e6497113267ed4e2f4b88318296f422c1ebe83
2017-08-24 05:48:14 +00:00
Jenkins 74830c0630 Merge "Fix SMB volume detachment issue" 2017-08-14 14:34:06 +00:00
Lucian Petrut 20412248b7 Fix SMB volume detachment issue
A recent change introduced a regression which prevents SMB volumes
from being detached. By passing the volume tag to os-win when
detaching a disk, os-win then ignores the disk path and attempts
to retrieve the attachment using the tag.

Virtual images don't get tagged, for which reason detaches will fail
siliently.

For now, we'll just skip passing the tag when detaching such disks.

Change-Id: Ie0500c29bfbbd63761b732872f1dda92720dbe21
Closes-Bug: #1710616
2017-08-14 15:49:41 +03:00
Jenkins 5c3a09bef4 Merge "Ignore external VMs when handling serial console output" 2017-08-11 13:21:23 +00:00
Jenkins 3ab2ee6390 Merge "Ensure that vif ports are unplugged during failover migration" 2017-08-11 13:21:17 +00:00
Jenkins 87352845c5 Merge "cluster: Adds VM clustering failover configuration" 2017-08-11 12:54:13 +00:00
Jenkins 445705de64 Merge "Validate retrieved disk resources" 2017-08-11 12:49:56 +00:00
Jenkins f11a3b5e48 Merge "Improve detaching passthrough disks" 2017-08-11 12:49:47 +00:00
Claudiu Belu 93fbc50b0b cluster: Adds VM clustering failover configuration
Adds the following config options:

* max_failover_count - the maximum number of failovers that can occur
in the failover_period. Once a VM's number of failovers reaches
this number, the VM will simply end up in a Failed state.

* failover_period - the number of hours in which the max_failover_count
failovers can occur.

* auto_failback - allow the VM to failback to its original host once it
is available.

Closes-Bug: #1709598

Depends-On: I2af82c8ecf3bee2e2f2161976d75123f8a0c89e9

Change-Id: Ib28b41f95b544b1a9547b80f389d65dc8ecf5f9b
2017-08-09 04:08:47 -07:00
Lucian Petrut 78686e448b Validate retrieved disk resources
When attaching passthrough disks, we're passing a Msvm_DiskDrive
object path instead of the actual disk path.

The issue is that even if the according disk path is retrieved, we
may fail to retrieve the above mentioned resource path.

This change adds the missing check. This way, a retry may be
performed if needed. Also, this ensures that we don't get a VM disk
with no actual disk attached (Hyper-V allows it).

Closes-Bug: #1709049

Change-Id: I55abf82f51d4dc739083eec2ea479d2c8115670f
2017-08-09 13:40:25 +03:00
Lucian Petrut 8fff7e8be5 Improve detaching passthrough disks
Retrieving the disk path can be a time consuming operation in case
of passthrough disks. As such disks attachments will be tagged using
the volume id, we'll just use that instead.

Note that Hyper-V does not allow us to attach the same passthrough
disk to multiple instances, which means that we're safe to rely
on this tag.

Depends-On: Ic3775c3e81a5f05b20221ef52e393fdb54d0190c

Change-Id: I99448881d8f9e247e1c34b1cd489c5488eff7146
2017-08-09 13:40:25 +03:00
Lucian Petrut 27d424f106 Ignore external VMs when handling serial console output
When the driver is initialized, we're attempting to capture serial
console output for instances that were not created by Nova,
although those should be skipped.

The event handler decides whether an instance should be skipped or
not based on its instance notes, which are expected to contain an
uuid, the instance uuid, in case of Nova instances.

We'll do the same when the driver is initialized. Note that there
may be VMs that were not created by us but do have an UUID in their
"Notes" field but this workflow is *good enough* and consistent for
now.

Alternatively, we could fetch from nova a list of instances that are
expected to reside on this node, but this may be out of sync. The
other option would be to change the notes format, adding some specific
prefix, but that would not be backwards compatible.

Change-Id: I156348e39a0db80160a7223d18dd9cfd277e7e5a
Closes-Bug: #1709057
2017-08-09 13:37:04 +03:00
Alexandru Muresan dc2daad2fc Ensure that vif ports are unplugged during failover migration
There is a race condition during failover migration, that, when
triggered, stops the host from proper cleanup.
If the destination node finishes the failover before the host,
proper cleanup is done, otherwise there will pe an ovs port
remaining on the source host.

This change addresses this issue by removing the race condition
which was previously used to check if the migration was done
properly.
This doesn't completly fix the because, if the host was already updated,
no aciton is taken at the source node.

Change-Id: I50213de235907f80e1d4266dfd6785ea147a7f0c
Partial-Bug: #1705992
2017-08-09 13:13:42 +03:00
Claudiu Belu 9a52134eb3 cluster: Do not destroy clustered VMs on live migration rollback
If a VM is clustered, it should not be destroyed on rollback.

Change-Id: Iaa07517cb60069ff2a52f60ffa661777118eb28a
Related-Bug: #1604078
2017-08-09 02:59:28 -07:00
Claudiu Belu 37b3a54aea move to compute_hyperv namespace
In order to avoid namespace sharing with networking-hyperv, compute-hyperv
should use the compute_hyperv namespace.

Closes-Bug: #1709085

Change-Id: I44eede0ea6b6558c0ddf6ebdc342ed8f11395f3b
2017-08-09 09:00:32 +00:00
Jenkins 3dd606cc65 Merge "Change file permissions to 644 instead of 755" 2017-08-08 11:19:56 +00:00
Claudiu Belu 53f95eb4cc Change file permissions to 644 instead of 755
Change-Id: Ia31621e7f9a5d10ad226e63fccd952a014dbdacd
2017-08-07 04:12:52 -07:00
Jenkins 6ddb80b120 Merge "Ensure that vif ports are unplugged during cold migration" 2017-08-04 14:02:20 +00:00
OpenStack Proposal Bot 85a5fc8f50 Updated from global requirements
Change-Id: I8f14fc9b50df3a94cfe584a207740b569db13b25
2017-08-04 12:48:00 +00:00
OpenStack Proposal Bot 4b1b6417e3 Updated from global requirements
Change-Id: I0b0bc63fe23eb025d3cfaef8dfd549e2ed1c1555
2017-07-31 09:32:55 +00:00
Alexandru Muresan 2eabb86120 Ensure that vif ports are unplugged during cold migration
At the moment, the vif ports are not unplugged after cold migration
on the source node.

This change addresses this issue by passing the network info when
destroying the instance.

Change-Id: I902ab7499fa1aca7fab415393a9670350b8437aa
Closes-Bug: #1705683
2017-07-31 12:13:50 +03:00
Claudiu Belu 2550dad20d Adds wsgi_intercept as a test requirement
This will fix the unittests. The package is required by
nova fixtures.

Change-Id: I7a6195c70064d3474eadd88503693eb69c556a69
2017-07-31 02:01:05 -07:00
Jenkins 52f94530a1 Merge "Remove log translations" 2017-07-21 11:53:37 +00:00
OpenStack Proposal Bot 394b814126 Updated from global requirements
Change-Id: Ica0e78019da49107203d27d773aed858a3a7dbb4
2017-07-19 03:54:24 +00:00
Alexandru Muresan 397ae79e3b Cluster: fix destroy method arguments
This change fixes the number of arguments used by the cluster
driver destroy method, as per a recent nova change.

The according argument was removed from the "stadard" driver by
a different change, omitting the cluster one.

Change-Id: I52ab6ed4ebed89ce55fb21d2d252187af98ab152
2017-07-14 17:27:46 +03:00
Ngo Quoc Cuong 6f6714c8bf Remove log translations
Starting with the Pike series, OpenStack no longer supports log
translation.
This patch remove log translations then update hacking rules to prevent
future mistakes. It also enables H904, which allows the logging package
to skip creating the formatted log message if the message is not going
to be emitted because of the current log level. [1]

https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages

Change-Id: I584d10356acea0ede6d219a8ca9e1b001b8d6064
2017-07-09 23:29:29 -04:00
Jenkins 6c3c482cd0 Merge "Raise MigrationPreCheckError if instance location is unavailable" 2017-07-06 08:32:55 +00:00
OpenStack Proposal Bot fbc13cae83 Updated from global requirements
Change-Id: Ic11e3b4553e0123ff21e393af0f34b0889bb884c
2017-06-30 12:13:38 +00:00
Lucian Petrut 27a02a70bc Raise MigrationPreCheckError if instance location is unavailable
At the moment, when doing the live migration precheck on the
destination, if the source or destination instance location are
not available, an OSError will be raised.

We need to catch it and throw a MigrationPreCheckError instead
so that we allow a different destination to be used.

Closes-Bug: 1694636

Change-Id: I3286c32ca205ffd2d5d1aaab88cc96699476e410
2017-06-29 13:13:43 +03:00
OpenStack Proposal Bot b0dd384329 Updated from global requirements
Change-Id: I8811ea93a13554efc0ed32f2b27882962b00a9d8
2017-06-27 12:08:52 +00:00
Jenkins 607226bf38 Merge "Fixes "always enable nested virt" issue" 2017-06-19 12:07:53 +00:00
Claudiu Belu 5d9b23af9e Fixes "always enable nested virt" issue
When creating an instance, the driver doesn't check if nested
virtualization is required. This fixes this issue.

Closes-Bug: #1698771

Change-Id: Ia30942dfcd0a4ab88ce3818020c5476d007a2395
2017-06-19 09:31:12 +00:00
Jenkins 7094427990 Merge "Updated from global requirements" 2017-06-16 13:37:14 +00:00