1887 Commits

Author SHA1 Message Date
Zuul
f526685104 Merge "Support sys.argv in wsgi app" 2020-11-28 06:07:39 +00:00
Zuul
c9b88cef90 Merge "releasenotes: Add fixes note for bug #1882521" 2020-11-25 16:10:54 +00:00
Balazs Gibizer
d38b7e13a6 Support sys.argv in wsgi app
At least uwsgi supports passing command line arguments to python wsgi
apps by specifying them as --pyargv for to uwsgi binary. Then the wsgi
app can access them normally via sys.argv.

This patch makes sure that nova-api and nova-metadata-api passes
sys.argv to oslo.config and therefore specifying config files for
these services now possible.

For example the following line in the systemclt service file makes sure
that the nova-api service reads both the nova.conf and the
nova-extra.conf

ExecStart = /usr/local/bin/uwsgi --procname-prefix nova-api \
  --ini /etc/nova/nova-api-uwsgi.ini \
  --pyargv "--config-file=/etc/nova/nova.conf
    --config-file=/etc/nova/nova-extra.conf"

Change-Id: If4783adda92da33d512d7c2834f0bb2e2a9b9654
Related-Bug: #1871482
2020-11-25 12:22:41 +01:00
Zuul
ff3170fbd6 Merge "Fix unplugging VIF when migrate/resize VM" 2020-11-14 11:51:22 +00:00
Zuul
eb6ce97544 Merge "api: Remove 'os-agents' API" 2020-11-14 10:06:44 +00:00
Dat Le
66c7f00e1d Fix unplugging VIF when migrate/resize VM
When migrating/resizing VM to destination
host that has VIF type difference from source VIF
type, it fails due to exception in unplugging
VIF on source host after user perform a confirmation
action.

This change unplugs the vifs in resize_instance and
wraps the call to unplug in confirm with an try except
block. the call to unplug_vifs in confirm is not removed
to support rolling upgrades but a todo is added to remove
it after the Wallaby release.

Change-Id: I2c195df5fcf844c0587933b5b5995bdca1a3ebed
Closes-Bug: #1895220
2020-11-09 17:27:40 +00:00
Zuul
d97cb3b9bd Merge "Prevent starting services with older than N-1 computes" 2020-11-08 04:30:15 +00:00
Zuul
120d866df7 Merge "Allow excluding image type capabilities" 2020-11-07 08:27:51 +00:00
Zuul
7134cbdc7a Merge "Update pci stat pools based on PCI device changes" 2020-11-06 05:23:46 +00:00
Sylvain Bauza
8d9f298f4c Fix the compute RPC 5.12 issue
In I147bf4d95e6d86ff1f967a8ce37260730f21d236 we added a new argument for
the rebuild_instance() RPC method. Unfortunately, we missed to that it
needs to be optional for older versions.

Adding a default none value for it so rolling upgrades would work.

Change-Id: I59c5e56b00114fea5ec19fa63ec73f032dc3bd5c
Closes-Bug: #1902925
2020-11-05 16:58:03 +01:00
Balazs Gibizer
aa7c6f8769 Prevent starting services with older than N-1 computes
Nova services only support computes that are not older than
the previous major release. This patch introduces a check in the
service startup that prevents staring the service if too old computes
are detected.

Change-Id: Ie15ec8299ae52ae8f5334d591ed3944e9585cf71
2020-11-04 14:05:52 +01:00
Lee Yarwood
c716e7608e releasenotes: Add fixes note for bug #1882521
As Ib9059dde41b0a07144ffa26552577308b1ffc9e1 introduced a known issue
release note we should follow up with a fixes release note now that
Ib9ed7069cef5b73033351f7a78a3fb566753970d has resolved this.

Related-Bug: #1882521
Related-Bug: #1894804
Change-Id: I87dacf14c061dfd544207e7374626e59f380db3a
2020-10-27 13:19:50 +00:00
Hemanth Nakkina
b8695de6da Update pci stat pools based on PCI device changes
At start up of nova-compute service, the PCI stat pools are
populated based on information in pci_devices table in Nova
database. The pools are updated only when new device is added
or removed but not on any device changes like device type.

If an existing device is configured as SRIOV and nova-compute
is restarted, the pci_devices table gets updated but the device
is still listed under the old pool in pci_tracker.stats.pool
(in-memory object).

This patch looks for device type updates in existing devices
and updates the pools accordingly.

Change-Id: Id4ebb06e634a612c8be4be6c678d8265e0b99730
Closes-Bug: #1892361
2020-10-15 13:10:36 +05:30
Dan Smith
cf0e519a0e Allow excluding image type capabilities
During the implementation of blueprint request-filter-image-types,
I left a FIXME to follow-up and add an ability for an operator to
configure compute nodes to not expose image formats that they *can*
support, for situations where they may not be desired. Consider a
remote compute node which *can* support raw images, but for which
you want to require that the user use qcow2 for transfer efficiency.

This adds a new compute-level config option which allows excluding
image types, which will be filtered out of the traits list in a
general way, to avoid having to honor the list in each driver.

Change-Id: Iabe6246dba212b1a287a82cc0cf16e2e8c8a24b8
2020-10-09 07:02:18 -07:00
851cc12f67 Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: I90b2702b83512edd04e5a85a4b8ba2fbd0f0fd6e
Sem-Ver: feature
2020-09-25 08:40:38 +00:00
Lee Yarwood
95103c3bc9 libvirt: Bump MIN_{LIBVIRT,QEMU}_VERSION and NEXT_MIN_{LIBVIRT,QEMU}_VERSION
Ia18e9be4d07b732afd9db0007c541253f3cdaf82 bumped these versions in
Ussuri and while it's late in the Victoria cycle we now need to do the
same. Based on the LibvirtDistroSupportMatrix wiki page [1] the
following versions have been selected for the next min versions during
the Wallaby release:

NEXT_MIN_LIBVIRT_VERSION = (6, 0, 0)
NEXT_MIN_QEMU_VERSION = (4, 2, 0)

MIN_QEMU_VTPM is removed as part of this patch as it also requires
changes to functional tests that would otherwise fail.

Follow up patches will remove the following constants after this change:

- MIN_LIBVIRT_FILE_BACKED_DISCARD_VERSION
- MIN_{LIBVIRT,QEMU}_NATIVE_TLS_VERSION
- MIN_LIBVIRT_BETTER_SIGKILL_HANDLING
- MIN_LIBVIRT_VIDEO_MODEL_VERSIONS
- MIN_{LIBVIRT,QEMU}_PMEM_SUPPORT

This change depends on the following devstack change that introduces the
use of the Train UCA on Bionic nodes, allowing us to bump versions here
ahead of a move to Focal.

Depends-On: https://review.opendev.org/#/c/747123/

[1] https://wiki.openstack.org/wiki/LibvirtDistroSupportMatrix

Change-Id: I8e349849db0b1a540d295c903f1470917b82fd97
2020-09-22 10:29:37 +01:00
Zuul
0a2403acd9 Merge "releasenote: Add known issue for bug #1894804" 2020-09-18 13:22:18 +00:00
Zuul
c49cd3b966 Merge "Victoria 22.0.0 prelude section" 2020-09-18 10:03:41 +00:00
Lee Yarwood
57ac83d4d7 releasenote: Add known issue for bug #1894804
Related-Bug: #1882521
Change-Id: Ib9059dde41b0a07144ffa26552577308b1ffc9e1
2020-09-18 10:45:43 +01:00
Zuul
8a33066b25 Merge "api: Set min, maxItems for server_group.policies field" 2020-09-17 19:00:20 +00:00
Sylvain Bauza
09204e6616 Victoria 22.0.0 prelude section
Mostly based on cycle highlights and a couple of additions worth
mentioning.

Change-Id: I3587f7d89f8ab164a5569601d9fd237c2c031886
2020-09-17 15:33:12 +02:00
Stephen Finucane
32c43fc801 api: Set min, maxItems for server_group.policies field
As noted inline, the 'policies' field may be a list but it expects one
of two items.

Change-Id: I34c68df1e6330dab1524aa0abec733610211a407
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1894966
2020-09-16 11:13:47 +01:00
Zuul
f72c9e59fb Merge "Allow tap interface with multiqueue" 2020-09-16 09:56:29 +00:00
Rodrigo Barbieri
84cfc8e9ab Allow tap interface with multiqueue
When vif_type="tap" (such as when using calico),
attempting to create an instance using an image that has
the property hw_vif_multiqueue_enabled=True fails, because
the interface is always being created without multiqueue
flags.

This change checks if the property is defined and passes
the multiqueue parameter to create the tap interface
accordingly.

In case the multiqueue parameter is passed but the
vif_model is not virtio (or unspecified), the old
behavior is maintained.

Change-Id: I0307c43dcd0cace1620d2ac75925651d4ee2e96c
Closes-bug: #1893263
2020-09-11 12:40:25 -03:00
Stephen Finucane
7ac52e643c api: Remove 'os-agents' API
This was only useful with XenAPI and can therefore be removed.

Change-Id: I9512f605dd2b3b0e88c951ed086250d57056303d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-09-11 14:10:32 +01:00
Stephen Finucane
adb28f503c xenapi: Remove driver and tests
Change-Id: I42b302afbb1cfede7a0f7b16485a596cd70baf17
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-09-11 14:09:06 +01:00
Balazs Gibizer
adbc94f8cd Spell out 3pp in vmware undeprecation reno
Change-Id: If9d643267731b9b274915c1ecf9f4309260801e7
2020-09-11 10:46:34 +02:00
Zuul
509c01e86d Merge "Support SRIOV interface attach and detach" 2020-09-10 22:54:26 +00:00
Zuul
acefdc563d Merge "Undeprecate the vmwareapi driver" 2020-09-10 18:52:39 +00:00
Balazs Gibizer
1361ea5ad1 Support SRIOV interface attach and detach
For attach:
* Generates InstancePciRequest for SRIOV interfaces attach requests
* Claims and allocates a PciDevice for such request

For detach:
* Frees PciDevice and deletes the InstancePciRequests

On the libvirt driver side the following small fixes was necessar:
* Fixes PCI address generation to avoid double 0x prefixes in LibvirtConfigGuestHostdevPCI
* Adds support for comparing LibvirtConfigGuestHostdevPCI objects
* Extends the comparison of LibvirtConfigGuestInterface to support
  macvtap interfaces where target_dev is only known by libvirt but not
  nova
* generalize guest.get_interface_by_cfg() to work with both
  LibvirtConfigGuest[Inteface|HostdevPCI] objects

Implements: blueprint sriov-interface-attach-detach

Change-Id: I67504a37b0fe2ae5da3cba2f3122d9d0e18b9481
2020-09-10 18:44:53 +01:00
Zuul
4f5f834681 Merge "Set migrate_data.vifs only when using multiple port bindings" 2020-09-10 02:41:00 +00:00
Ghanshyam Mann
fe545dbe5f Migrate default policy file from JSON to YAML
Default value of 'CONF.oslo_policy.policy_file' config option
has been changed from 'policy.json' to 'policy.yaml'. If new default
file 'policy.yaml' does not exist but old default 'policy.json' exist
then fallback to use old default file.

An upgrade checks is added to check the policy_file format and
fail upgrade checks if it is JSON formatted.

Added a warning in policy doc about JSON formatted file is deprecated,
also removed all the reference to policy.json file in doc as well as
in tests.

Related Blueprint: policy-json-to-yaml

Closes-Bug: #1875418

Change-Id: Ic4d3b998bb9701cb1e3ef12d9bb6f4d91cc19c18
2020-09-09 08:09:38 -05:00
Zuul
bbe2adecc7 Merge "libvirt: Remove '[vnc] keymap', '[spice] keymap' options" 2020-09-08 15:50:33 +00:00
Zuul
695ad1e2b0 Merge "libvirt: Deprecate support for non-QEMU/KVM backends" 2020-09-08 14:47:56 +00:00
Balazs Gibizer
498b41f65b Undeprecate the vmwareapi driver
* 3pp CI is stable and produces results comparable to other nova 3pp
  CIs [1]
* Yingji Sun seems to be actively maintaining the machinery (see
  comments in [2])

[1] http://ciwatch.mmedvede.net/project?project=nova&time=7+days
[2] https://review.opendev.org/#/c/734114

Change-Id: Id61118f9374dcb51b8450b35c92950fb313df5a2
2020-09-08 07:05:52 +00:00
root
b8f3be6b3c Set migrate_data.vifs only when using multiple port bindings
In the rocky cycle nova was enhanced to support the multiple
port binding live migration workflow when neutron supports
the binding-extended API extension.
When the migration_data object was extended to support
multiple port bindings, populating the vifs field was used
as a sentinel to indicate that the new workflow should
be used.

In the train release
I734cc01dce13f9e75a16639faf890ddb1661b7eb
(SR-IOV Live migration indirect port support)
broke the semantics of the migrate_data object by
unconditionally populating the vifs field

This change restores the rocky semantics, which are depended
on by several parts of the code base, by only conditionally
populating vifs if neutron supports multiple port bindings.

Co-Authored-By: Sean Mooney <work@seanmooney.info>
Change-Id: Ia00277ac8a68a635db85f9e0ce2c6d8df396e0d8
Closes-Bug: #1888395
2020-09-07 20:21:24 +00:00
Zuul
60fa0ec83b Merge "Remove support for Intel CMT events" 2020-09-03 01:59:23 +00:00
Stephen Finucane
46b1ff4e80 libvirt: Remove '[vnc] keymap', '[spice] keymap' options
These options were deprecated way back in Rocky due to buggy behavior
they introduced. We can remove them now.

Change-Id: I9266edfd4ea6315239c54ff8d91e37d197c760c0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-09-02 16:55:12 +01:00
Jiří Suchomel
3ae2153632 Describe '[glance]/enable_rbd_download'
New option was introduced for faster download images directly from Ceph
instead of using the Glance API.

See the following blueprint for more details:

https://blueprints.launchpad.net/nova/+spec/nova-image-download-via-rbd

Compared to the blueprint, this new option was added instead of reviving
deprecated '[glance]/allowed_direct_url_schemes'.

Change-Id: Ib7e52f386df2134aa043dc703b378d0737b1d36d
2020-09-02 07:58:13 +02:00
Stephen Finucane
e45f3b5d71 Remove support for Intel CMT events
The 4.14 kernel is sufficiently old in the tooth (Ubuntu 18.04 uses
4.15, RHEL 7.x has likely backported the fixes) that there are likely
not a great deal of users that could still use this broken feature if
they wanted to. Drop support for it almost entirely, retaining only a
warning to prevent accidental use.

Change-Id: Iad76bce128574dc2f86998ccf2a9c5e799c71313
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-09-01 17:36:31 +01:00
Stephen Finucane
340ef02e06 libvirt: Deprecate support for non-QEMU/KVM backends
None of these backends has had upstream testing in a very long time, if
ever, and their usage levels are unknown. Deprecate them now so that we
can at least remove the worst of them (UML, Xen) in the next cycle.

Change-Id: Id5b15aa846a5ddaf4ac26fe586327aef8c08c89d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-09-01 16:10:21 +01:00
Zuul
b3bbcafe54 Merge "QEMU/KVM: accept vmxnet3 NIC" 2020-08-30 12:55:42 +00:00
Zuul
295d20297e Merge "Add a lock to prevent race during detach/attach of interface" 2020-08-30 12:45:01 +00:00
Alexandre Arents
39831c5599 Add a lock to prevent race during detach/attach of interface
Only allow one detach/attach at a time with the same pattern instance-port_id
in order to avoid race condition when multiple detach/attach are run
concurrently.

When multiple detach run concurrently on a specific instance-port_id,
manager consider many of them as valid because info_cache still contains
the port and info_cache is refreshed only once the first request complete.

So during this gap of time, while the first request accomplishes the task,
all subsequent requests are destined to fail and log a warning [1] in
different location of code, depending on the outcome of the first request.
The Issue is that all those caught requests finally run a
deallocate_port_for_instance which will unbind the port.

This may cause a race condition, because a successful attach can pass between
those unbind, and be silently unbound, resulting in an infrastructure/DB
inconsistency.

[1] 'Detaching interface %(mac)s failed because the device is no longer found
     on the guest.'

Closes-Bug: #1892870
Change-Id: Iea5969d0bd16dc9a6f1ba950224b0115e466ce66
2020-08-28 14:55:42 +00:00
Zuul
54f46be258 Merge "Change default num_retries for glance to 3" 2020-08-28 11:12:23 +00:00
Keigo Noha
662af9fab6 Change default num_retries for glance to 3
Previously, the default value of num_retries for glance is 0.
It means that the request to glance is sent only one time.
On the other hand, neutron and cinder clients set the default
value to 3.
To align the default value for retry to other components, we
should change the default value to 3.

Closes-Bug: #1888168
Change-Id: Ibbd4bd26408328b9e1a1128b3794721405631193
2020-08-27 20:16:53 +00:00
Zuul
f521f4dbac Merge "Provider Config File: Enable loading and merging of provider configs" 2020-08-27 05:10:11 +00:00
Zuul
cf7288c53f Merge "Avoid invalid file name, preventing git clone on win32" 2020-08-26 19:22:28 +00:00
Zuul
20459e3e88 Merge "releasenotes: Detail support for server ops with vTPM" 2020-08-26 17:03:13 +00:00
Dustin Cowles
260713dc22 Provider Config File: Enable loading and merging of provider configs
This series implements the referenced blueprint to allow for specifying
custom resource provider traits and inventories via yaml config files.

This fourth commit adds the config option, release notes, documentation,
functional tests, and calls to the previously implemented functions in
order to load provider config files and merge them to the provider tree.

Change-Id: I59c5758c570acccb629f7010d3104e00d79976e4
Blueprint: provider-config-file
2020-08-26 23:18:53 +08:00