There is a wrong format 'ephemeral' in the description.
So remove it and valid formats ('ext2', 'ext3', 'ext4' and 'xfs')
are added.
The parameter is optional, so fix it as well.
Change-Id: Icc04cac3a287955ab1a98b7813e3c7ec8183b120
Closes-Bug: #1736502
This change makes us do the new migration allocation mode for
live migrations as well.
Implements blueprint migration-allocations
Change-Id: I9068a5a5b47cef565802a6d58f37777464644100
It is a follow-up for I4db74e4dc682bc03df6ec94cd1c3a5f5dc927a7b.
Fix description of placement microversion 1.14.
Change-Id: I7a7ffc395d444fe7cf0434ea6745dde0dae11ad5
blueprint nested-resource-providers
When we delete a host mapping in the api database, we need to mark
the compute node record as unmapped. Otherwise we can never re-discover
it if added back.
Change-Id: I9348827c5fd0364727e49cb8fae786cb2a29472a
Closes-Bug: #1735719
This is a follow up to another patch [1] that removed the old-style
quotas code which is no longer in use. Here, we remove the 'reserved'
key from quotas internally and set it in the APIs where it's expected.
We also remove code that accesses the quota_usages and reservations
tables as they're no longer used.
[1] https://review.openstack.org/#/c/511689
Change-Id: I75291571468ddb79b7561810de0953bb462548e3
These are written in preparation for follow up old-style quotas code
removal that moves the logic for the 'reserved' field from the quota
internals (where it's no longer used) to the API (where it's expected
to be provided until we have a new microversion). These tests will
help catch any unintended change in behavior.
Change-Id: I1f743a8db7d032e09372587622ab64250a05e0f0
A variety of changes are required to allow the various entities
presented by the placement API to have last-modified times.
According to the HTTP 1.1 RFC headers last-modified headers SHOULD always
be sent and should have a tie to the real last modified time. If we do
send them, we need Cache-Control headers to prevent inadvertent caching
of resources.
This patch provides necessary changes to the database and object
handling that will support the API changes made in a followup patch.
The main steps are:
* map base.NovaTimestampObject to ovo.TimestampedObject
* Add the base.NovaTimestampObject mixin to the relevant object in
nova/objects/resource_provider.py
* Tweak queries to retrieve updated_at and created_at fields where
they are not already present
Note that only those objects which are directly represented in response
bodies and directly associated with a database resource that has
created_at and updated_at fields are changed (e.g., resource providers).
Other objects, like usage and allocaiton candidates, which are
composites and represent the state of the universe _now_, will use the
current time when they get last-modified headers in the next patch.
Some HTTP requests, such as GET /resource_providers/{uuid}/aggregates
are based on a association that happens at a time that is not recorded
and is ambiguous: should we tell last-modified time of the most recently
created aggregate uuid, or the time when the association between a
resource provider and an aggregate was made (which we don't know). In
those cases where a solution is unclear, no object or database changes
are made, and the next patch will use the current time in any related
last-modified headers.
Change-Id: I3f6310af9c5bea682e793d27d480952aa8776d61
Partial-Bug: #1632852
Partially-Implements: bp placement-cache-headers
This change integrates support of the Cinder 3.44
volume attachment API.
The patch bumps the compute service version to
check whether all the compute nodes are upgraded to the
version that can handle attach and detach with the new
flow.
To enable the new flow we also need the 3.44 or higher
microversion from Cinder. We check that in the API and
if it's not available we fall back to the old
attach/detach flow.
Co-Authored-By: Ildiko Vancsa <ildiko.vancsa@gmail.com>
Partially Implements: blueprint cinder-new-attach-apis
Change-Id: Ifc01dbf98545104c998ab96f65ff8623a6db0f28
This plumbs in the new-style volume attachment support to the
virt driver block device code which does the actual work of
attaching the volume via the driver and completing the attachment
with cinder (the thing that makes the volume status "in-use").
At this point, none of the new flow is exercised outside of tests
because we are not yet setting the attachment_id when attaching
volumes, that comes in a later change to the API.
It's worth noting that when nova creates a volume during boot
from volume for a source_type=blank/image/snapshot BDM, we won't
have an attachment_id for that volume so we'll attach using the
old flow. For now this is OK, but might be something we need to
revisit in the future when we eventually want to remove the old
flow.
The structure here is to separate the old/new attach flows into
separate methods, despite quite a bit of copy/paste code in both
places. A single method using conditionals in different places
is arguably uglier (as seen in the test code) and we could likely
consolidate some of the common code into helper methods later.
Note that test_refresh_connection_info_with_attachment_id is
removed since it's now redundant with test_refresh_connection.
Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>
Part of blueprint cinder-new-attach-apis
Change-Id: Ib1b6b223c9d04579828d47607006ecd98b472e5a
This changes select_destinations() on the scheduler side to optionally
return Selection objects and alternates. The RPC signature doesn't
change in this patch, though, so everything on the conductor side
remains unchanged. The next patch in the series will make the actual RPC
change.
Blueprint: return-alternate-hosts
Change-Id: I03b95a2106624c2ea24835814ca38e954ec7a997
With the RPC change coming in later patches in the series, it simply
makes more sense to have the method for converting a Selection object to
the older host_state dict format in the object itself.
Blueprint: return-alternate-hosts
Change-Id: I2299c71e034299d63c267bc4cbe6360858445779
This changes the returned value from the scheduler driver's
select_destinations() to a list of lists of Selection objects. It
doesn't actually change the returned value from the scheduler manager to
the conductor; that will be done in the next patch in the series, as
that will require an RPC change.
During review it was noticed that the signature for the abstract
scheduler driver class was not updated when 'alloc_reqs_by_rp_uuid'
parameter was added back in e041fddeb0, so
I've updated it here to make all driver signatures the same.
Blueprint: return-alternate-hosts
Change-Id: I9f864455c69e1355a3cf06d7ba8b98fa3bcf619c
There are multiple places in the filter_scheduler code where we need to
check that we found enough hosts to match the request. This patch
refactors the code to create a single method that checks for that, and
raises a NoValidHost exception if there are not enough hosts.
Blueprint: return-alternate-hosts
Change-Id: I858e7f19950c12421331cc2fbb033cd83fb0e260
A regression was introduced in the 2.36 API microversion where the
'force' parameter was missing from the 'PUT /os-quota-sets/{tenant_id}'
API request schema so users could not force quota updates with
microversion 2.36 or later. The bug is now fixed so that the 'force'
parameter can once again be specified during quota updates. There is
no new microversion for this change since it is an admin-only API.
Change-Id: I947e927802f755ccb25a91efd82cac895779d19e
Closes-Bug: #1733886
Although the document is saying the network provider is neutron,
but the picture still has nova network which is outdated.
Change-Id: I3d33a789a2683eea235c5b5c0a2336b7b51da795
Closes-Bug: #1734841
We can avoid all of the stashed connector hulabaloo
when detaching a volume if we're using a new style
attachment, because we don't need a host connector
in that case, stashed or not, we just delete the
attachment and we're done. This also helps to avoid
some confusion about whether or not we need to stash
a connector in the connection_info for the new style
attachment flow (we don't).
Part of blueprint cinder-new-attach-apis
Change-Id: I1404842f91279dd40ec9e03ccbbfe11cfc48520c