Provide a new method:
nova.utils.get_ksa_adapter(service_type, ks_auth=None, ks_session=None,
min_version=None, max_version=None))
...to configure a keystoneauth1 Adapter for a service. The Adapter, and
its component keystoneauth1 artifacts not passed into the method, are
loaded based on options in the conf group corresponding to the specified
service_type.
The ultimate goal is to replace the various disparate mechanisms used by
different services to do endpoint URL and version discovery. In Queens,
the original mechanisms will still take precedence, but (other than
[glance]api_servers - see the spec) will be deprecated. In Rocky, the
deprecated options will be removed.
This change incorporates the above utility into endpoint discovery for
glance and ironic. Future change sets will do the same for other
services (cinder, neutron, placement).
Change-Id: If625411f40be0ba642baeb02950f568f43673655
Partial-Implements: bp use-ksa-adapter-for-endpoints
Closes-Bug: #1707860
This patch adds test that checkes that the resource allocation is properly
handled during live migration force complete.
Co-Authored-By: Dan Smith <dms@danplanet.com>
Related-Bug: #1712045
Change-Id: If958e64eda1260a8dd08078de2dae167c6a147bc
This patch moves some tests to a cellsv1-specific mixin class ahead of
changing how the plumbing in compute api works. Since we will make a hard
cutover to the new instance query method for all non-CellsV1 code, we
pre-duplicate these tests in a mixin here so we can just fix the base test
class when we make that cut. This makes it easier to just gut cellsv1
later instead of having to remove in-test conditionals for cellsv1.
Change-Id: Idec35d2aab591e988dbd10efb513700ce71521e5
This just wraps the new multi-db instance query method with one that
returns an InstanceList of Instance objects.
Change-Id: I249cddc9191053bcf324b5887a65a16bb64b7a88
This makes us pass fault through to the db layer if requested,
instead of always relying on upper layers doing the fault-filling
legacy behavior.
Change-Id: Ibb4e8d96fbb091b2fbfad4997df29e800e1717a9
Because of past qemu bugs we set this to default off and required a
workaround to enable it. However these issues appear to be fixed, and
we should enable this by default for people (with the ability to turn
it off if it's causing crashes in their environment). Metacloud/Cisco
has been running default this way the entire time without issue.
Change-Id: I4545cc99683d311c41c8d6d8dc9787ea6ec6cbc9
Underscores make for really ugly URLs and every other document here is
now using hyphens for this very reason. Let's try to keep that going.
Change-Id: I5c99ff6b04ee97bac210a0d6762015225775c5ee
Added a new parameter to vif objects for modelling the following
OVS port profiles:
- VIFPortProfileOpenVSwitch
- VIFPortProfileFPOpenVSwitch
This new parameter named "datapath_type" is a string
coerced variable. The posible values stored in this
field are defined in [1].
This information is required by ``os-vif`` to define or ensure
correctly the datapath type of the OVS bridge when plugging a
port to this bridge. Currently the datapath type is hardcoded
in ``os-vif`` and doesn't work with anything other than the kernel
OVS versions.
[1] https://github.com/openstack/neutron/blob/11.0.0/neutron/plugins/ml2/drivers/openvswitch/agent/common/constants.py#L129
Depends-On: Ia813c39e2917ff373f8e1f85c75fc22d109c94d3
Related-Bug: #1632372
Change-Id: I6194606498bff177d9856ed9f0c86ca0a4eef32f
If nova list API is called with empty regex pattern like below:
http://<host-ip>/compute/v2.1/servers?name=""
it fails at db layer and returns 500 InternalServerError.
Empty string('') is a valid regex for re.compile [1] so nova-api fails
to catch it at schema layer and it is passed to databse for searching.
Database fails to search it with "REGEXP %(display_name_1)s)" and
'display_name_1' as u'' in sql query which leads to below error:
InternalError: (1139, u"Got error 'empty (sub)expression' from regexp")
This issue is there for every query parameter which is using below
regex parameter types defined in parameter_types.py:
common_query_regex_param
This patch fixes this issue by rejecting the request with 400 if the
provided filter regex is empty string. If user is intending to filter
something, user must pass something to the filter, it cannot be a empty
string.
[1] https://github.com/openstack/nova/blob/16.0.0/nova/api/validation/validators.py#L40
Closes-Bug: #1718877
Change-Id: I3f6fa04dc7267279964e8e5dd2a790b997a40e4e
This moves two nearly identical utility methods into the
InstanceHelperMixin for waiting for an instance action failure
event.
Change-Id: Idc011a8aa4b1aa9b35e793913e43e9835d5d08f2
When we unshelve an offloaded instance, the scheduler
creates allocations in placement when picking a host.
If the unshelve fails on the host, due to either the
instance claim failing or the guest spawn failing, we
need to remove the allocations since the instance isn't
actually running on that host.
Change-Id: Id2c7b7b3b4abda8a3b878fdee6806bcfe096e12e
Closes-Bug: #1713796
In order to make it simpler to use the default
configuration files when deploying services
from source, the files are added to pbr's
data_files section so that the files are
included in the built wheels and therefore
deployed with the code. Packaging and deployment
tools can then more easily use the default files
if they wish to.
This pattern is already established with similar
files for neutron and the glance metadefs as has
been mentioned in the related bug report.
Change-Id: I66e6525338e06f289a20ff2cdc2d108ffd6d30b2
Closes-Bug: #1718356
Moving an instance that was created concurrently by a multiple instances create
call no longer works in Pike because of a wrong RequestSpec field lookup.
Verifying that regression so the next change will fix it.
Change-Id: I26d1c90578b3dfb183bbf77ac758c2743dbced28
Related-Bug: #1718455
This adds a functional test to recreate bug 1713796 where
allocations are not cleaned up from the compute node when
unshelving an offloaded server fails when spawning the
guest.
Change-Id: I3237ec954f6504513c8ef5a6ba43f57d0d2622a3
Related-Bug: #1713796