55201 Commits

Author SHA1 Message Date
Takashi NATSUME
b244a02730 doc: Fix a broken reference link
Fix a broken reference link in
contributor/testing/zero-downtime-upgrade.rst

Change-Id: I1c0054175f9d665fecd76a03466663177c49f774
Closes-Bug: #1842985
2019-09-09 07:58:38 +09:00
Zuul
ba3147420c Merge "Fix rebuild of baremetal instance when vm_state is ERROR" 2019-09-07 23:08:19 +00:00
Zuul
c51187ab5b Merge "Decouple NVMe tests from os-brick" 2019-09-07 12:23:15 +00:00
Zuul
b879f1b6df Merge "Move get_machine_type() test to test_utils.py" 2019-09-07 08:55:08 +00:00
Zuul
b96f932fdf Merge "Extract fake KVM guest fixture for reuse" 2019-09-07 08:54:59 +00:00
Zuul
0a8444e903 Merge "Ensure non-q35 machine type is not used when booting with SEV" 2019-09-07 08:54:50 +00:00
Zuul
ade53dc9cd Merge "Fix incorrect invocation of openstacksdk's baremetal.nodes()" 2019-09-07 08:54:11 +00:00
Zuul
535af1ee12 Merge "Use fields="instance_uuid" when calling Ironic API" 2019-09-07 05:19:49 +00:00
Zuul
c4555f34ad Merge "Remove old comments about caching scheduler compat" 2019-09-06 23:28:32 +00:00
Zuul
e25f3e31c5 Merge "doc: cleanup references to conductor doc" 2019-09-06 22:53:59 +00:00
Mohammed Naser
e840135a17 Decouple NVMe tests from os-brick
The existing tests for NVMe with Libvirt were using
APIs inside of os-brick rather than making sure that
we are calling os-brick with the right values.

This patch mocks up the factory function instead and
makes sure we call it with the right values, it also
adds a few more things to test if the root helper and
`device_scan_attempts` are passed down through to
os-brick as well.

Change-Id: I067f9e29b4db3bba0601041cf3603b9653a240b9
2019-09-06 21:53:53 +00:00
Zuul
31aa0c58c5 Merge "Bump min for oslo.service & .privsep to fix SIGHUP" 2019-09-06 19:34:16 +00:00
Zuul
840a556bd2 Merge "objects: Remove ConsoleAuthToken.to_dict" 2019-09-06 18:51:31 +00:00
Dmitry Tantsur
6bf0467303 Fix incorrect invocation of openstacksdk's baremetal.nodes()
This call accepts keyword arguments, not a dictionary. The dictionary
ends up passed into the 'details' argument, making it True, so the
query returns all nodes instead of just one. Fix it and raise an error
in case it ever repeats.

Closes-Bug: #1843050
Change-Id: If464423b3c5bc05e2b22ff2245828c677b264d15
2019-09-06 14:39:41 +00:00
Zuul
a2b814619b Merge "update allocation in binding profile during migrate" 2019-09-06 10:20:57 +00:00
Zuul
965142459b Merge "Add delete_on_termination to volume-attach API" 2019-09-06 09:31:14 +00:00
Zuul
7020196aaa Merge "Handle VirtDriverNotReady in _cleanup_running_deleted_instances" 2019-09-06 01:39:22 +00:00
Dustin Cowles
19f01023c2 Use fields="instance_uuid" when calling Ironic API
IronicDriver should be using fields="instance_uuid" when calling Ironic
API via the OpenStack SDK, but instead is using fields="instance_id".
This patch corrects the calls and adds new tests to cover it.

Change-Id: I4b976b7ea60c63ec334b5eb78c1ad7972fbed574
Closes-Bug: #1842989
2019-09-05 16:51:36 -07:00
Eric Fried
73f1fda7e9 Bump min for oslo.service & .privsep to fix SIGHUP
The combined fixes for the two related bugs resolve the problem where
SIGHUP breaks the nova-compute service. Bump the minimum requirements
for oslo.privsep and oslo.service to make sure these fixes are in place,
and add a reno to advertise resolution of the issue.

This also bumps oslo.utils to match the lower constraint from
oslo.service.

Change-Id: I39ead744b21a4423352a88573f327273e4d09630
Related-Bug: #1794708
Related-Bug: #1715374
2019-09-05 18:16:43 -05:00
Matt Riedemann
37164b418e doc: cleanup references to conductor doc
The conductor doc is not really end user material,
so this moves it under reference/, removes it from the
user page and adds it to the reference index for internals.
Also makes the contributor page link to the reference internals
since it's kind of weird to have one contributor section that
only mentions one thing but the internals under reference have
a lot more of that kind of detail. Finally, a todo is added so
we don't forget to update the reference internals about versioned
objects at some point since that's always a point of confusion
for people.

Change-Id: I8d3dbce5334afaa3e1ca309b2669eff9933a0104
2019-09-05 18:37:31 -04:00
Matt Riedemann
d11a335ea5 Remove old comments about caching scheduler compat
The CachingScheduler driver was removed in Stein [1] but
there are a couple of comments in the FilterScheduler
driver code that reference conditions from when the
CachingScheduler existed. This removes them to avoid
confusion.

[1] I1832da2190be5ef2b04953938860a56a43e8cddf

Change-Id: If71a7ac7a33dbc45f417368e3e705f444a3e5bd3
2019-09-05 17:20:49 -04:00
Zuul
c84400f152 Merge "Trap and log errors from _update_inst_info_cache_for_disassociated_fip" 2019-09-05 21:08:37 +00:00
Adam Spiers
1e10f58eef Move get_machine_type() test to test_utils.py
SEV work uncovered that test_get_guest_config_machine_type_s390(), a
unit test for nova.virt.libvirt.utils.get_machine_type(), was
misplaced in test_driver.py, so move that to test_utils.py and in the
process extend it to test other architectures.

Also rename three related unit tests of the same get_machine_type()
for increased clarity.

Change-Id: Ib43f96445e7c13f4abc4522f1d3567a4a5499382
blueprint: amd-sev-libvirt-support
2019-09-05 22:03:34 +01:00
Adam Spiers
dbbaf1a00a Extract fake KVM guest fixture for reuse
A future test in the SEV patch series will require a fake of a fully
configured KVM guest in order to test enabling of IOMMU for relevant
drivers.  So extract the fixture factory and the resulting XML out
into fake_libvirt_data.py where it can also be used by
libvirt/test_designer.py.

It is not sufficient to only extract the XML, because parts of the
config do not have parse_dom() implemented and therefore can only be
generated via code rather than by parsing the XML.

Change-Id: I6595d55823e15ef155f8303eb06676494dd0c661
blueprint: amd-sev-libvirt-support
2019-09-05 22:03:32 +01:00
Adam Spiers
c1179d1ff2 Ensure non-q35 machine type is not used when booting with SEV
As explained in the SEV spec[0], SEV needs a q35 machine type in order
to bind all the virtio devices to the PCIe bridge so that they use
virtio 1.0 and not virtio 0.9, since QEMU's iommu_platform feature was
added in virtio 1.0 only.

So add an extra check to be run in the API layer whenever SEV is
requested, to ensure that a machine type *outside* the q35
family (e.g. 'pc', or something like 'pc-i440fx-2.11') is not
explicitly selected in the image via the hw_machine_type property.
Since code in the API layer doesn't run on the compute host, at this
stage we can't check CONF.libvirt.hw_machine_type via libvirt.utils.
A subsequent commit will change the libvirt driver to trigger an
extra, later check on the compute node, although if that late check
fails, the best we can do is to fail the operation on that compute
host, in which case it will potentially be retried on another compute
host.

nova's hardcoded default for x86_64 is 'pc' (which in fact matches
QEMU's current default).  This means that it will be recommended that
SEV-capable compute hosts have CONF.libvirt.hw_machine_type configured
to include 'x86_64=q35', otherwise attempts to boot SEV guests without
the image property 'hw_machine_type=q35' will fail unpleasantly.

In the future it is expected that both of these defaults will change
to 'q35'[1].  Once that happens, x86_64 images will be bootable
without needing to set either the hw_machine_type image property or
CONF.libvirt.hw_machine_type.

While extending the unit tests for invalid combinations of image
properties, add tests for the case where the 'hw_firmware_type'
property is not specified at all; previously the tests only covered
the case where it was set to 'bios'.

[0] http://specs.openstack.org/openstack/nova-specs/specs/train/approved/amd-sev-libvirt-support.html
[1] https://bugs.launchpad.net/nova/+bug/1780138

blueprint: amd-sev-libvirt-support
Change-Id: Ibf66a0b371685c673644493bf12663dbf71fab6c
2019-09-05 22:03:30 +01:00
Zuul
86b6906ff4 Merge "neutron: refactor nw info cache refresh out of associate_floating_ip" 2019-09-05 20:43:24 +00:00
Balazs Gibizer
a2984b647a update allocation in binding profile during migrate
If the server has port with resource allocation and the server is
migrated then when the port is bound to the destination host the
allocation key needs to be updated in the binding:profile to point to
the resource provider that provides resources for this port on the
destination host.

This patch extends the migrate_instance_finish() network api method to
pass the updated resource providers of the ports during migration.

Change-Id: I220fa02ee916728e241503084b14984bab4b0c3b
blueprint: support-move-ops-with-qos-ports
2019-09-05 14:58:12 +02:00
zhangbailin
e5b47543cf Add delete_on_termination to volume-attach API
Add the 'delete_on_termination' field to the volume attach API to support
configuring whether to delete the data volume when the instance is destroyed.

To avoid upgrade impact issues with older computes, the
'delete_on_termination' field is set in the API rather than when the BDM
is created in the compute service.

Implements: blueprint support-delete-on-termination-in-server-attach-volume
Change-Id: I55731b1822a4e32909665a2872d80895cb5b12f7
2019-09-05 20:54:56 +08:00
Zuul
f7f5e1846c Merge "Add server sub-resource topology API" 2019-09-05 12:51:36 +00:00
Zuul
27925a0e22 Merge "Use microversion in put allocations in test_report_client" 2019-09-05 03:01:51 +00:00
Zuul
0568676132 Merge "Modernize nova-lvm job" 2019-09-04 20:43:02 +00:00
Zuul
85d21ad5e0 Merge "Convert nova-lvm job to zuul v3" 2019-09-04 20:08:05 +00:00
Zuul
2b2a5cedfc Merge "Remove unused methods" 2019-09-04 19:59:25 +00:00
Zuul
b1de451629 Merge "unit test: do not fill rp mapping for failed re-schedule" 2019-09-04 15:58:15 +00:00
Zuul
c34b783749 Merge "Refactor MigrationTask._execute" 2019-09-04 15:58:05 +00:00
Zuul
b973d44f0e Merge "libvirt: Make scheduler filters customizable" 2019-09-04 14:34:50 +00:00
Zuul
6bfe3cf42d Merge "Make _get_cpu_feature_traits() always return a dict" 2019-09-04 14:34:38 +00:00
Takashi NATSUME
2311a194e1 Remove unused methods
The following methods have not been used any more
since the following change IDs or a commit.

* _add_vif_extension

  I56d859beb675199b209587bfe0a23cd9b75233ad

* _node_dict

  Ia76e41a8a3b7230701872ae7a1975edc3d9ea847

* _bdms_from_legacy and _bdms_to_legacy

  I01c108ceb539bb99491ed542c683e36fbf0c2bbe

* _create_block_device_mapping

  Ib0e0b708c46e4330e51f8f8fdfbb02d45aaf0f44

* _get_folder

  If734e22af223836b424561e8e9ca65e6c39fe5c2

* _details_map

  This method has not been used since the commit
  that added the method (initial commit).
  e7562217ed

Change-Id: Ica00c013961366d044f5a4ad3ed24568d60288b3
2019-09-04 15:26:59 +09:00
Zuul
cbaea3bd69 Merge "re-calculate provider mapping during migration" 2019-09-04 01:00:07 +00:00
Zuul
a496bb9397 Merge "libvirt: Fold in argument to '_update_provider_tree_for_vgpu'" 2019-09-03 22:12:56 +00:00
Zuul
de6b5dd87d Merge "Use SDK for setting instance id" 2019-09-03 18:30:18 +00:00
Zuul
8670b0b9cb Merge "Use SDK for validating instance and node" 2019-09-03 18:17:46 +00:00
Zuul
5e6446bb2b Merge "Use SDK for node.list" 2019-09-03 17:50:31 +00:00
Zuul
27f2eb9cb6 Merge "Remove dead code" 2019-09-03 16:56:29 +00:00
Zuul
3d9344a88b Merge "Nice to have test coverage for If1f465112b8e9b0304b8b5b864b985f72168d839" 2019-09-03 16:56:20 +00:00
Zuul
34a052f04e Merge "objects: Rename 'fields' import to 'obj_fields'" 2019-09-03 16:56:13 +00:00
Zuul
40e7fdbaec Merge "libvirt: Start checking compute usage in functional tests" 2019-09-03 16:01:59 +00:00
Zuul
2821908a07 Merge "libvirt: Simplify 'fakelibvirt.HostInfo' object" 2019-09-03 16:01:49 +00:00
Zuul
4318bfdd18 Merge "Add <launchSecurity> and <driver iommu='on' /> to config.py" 2019-09-03 15:21:03 +00:00
Balazs Gibizer
8a1ea45124 unit test: do not fill rp mapping for failed re-schedule
This is a follow up for I8e5a0480c81ba548bc1f50a8098eabac52b11453 where
Matt pointed out that there is missing unit test coverage for the
case when resource claim fails on an alternate host during re-schedule.
This patch adds such coverage.

Change-Id: Ia2d8f511c9b46b805aa504a9ca6b0d9f35cc1a31
blueprint: support-move-ops-with-qos-ports
2019-09-03 16:59:42 +02:00