Commit Graph

49061 Commits

Author SHA1 Message Date
Takashi NATSUME 35dd1f9185 api-ref: Fix a description for 'guest_format'
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
2017-12-12 04:53:32 +00:00
Zuul 32c8ac6b7d Merge "remove glance usage inside compute" 2017-12-12 00:09:59 +00:00
Zuul b5ea12183b Merge "Make live migration hold resources with a migration allocation" 2017-12-11 23:59:59 +00:00
Zuul 3fc1dcead7 Merge "[placement] Fix API reference for microversion 1.14" 2017-12-11 21:24:15 +00:00
Zuul 2cbe6820e4 Merge "Address nits from service create/destroy notification review" 2017-12-11 21:24:09 +00:00
Dan Smith 3626019fa0 Make live migration hold resources with a migration allocation
This change makes us do the new migration allocation mode for
live migrations as well.

Implements blueprint migration-allocations
Change-Id: I9068a5a5b47cef565802a6d58f37777464644100
2017-12-11 06:53:02 -08:00
Takashi NATSUME 0dee4cd6c4 [placement] Fix API reference for microversion 1.14
It is a follow-up for I4db74e4dc682bc03df6ec94cd1c3a5f5dc927a7b.
Fix description of placement microversion 1.14.

Change-Id: I7a7ffc395d444fe7cf0434ea6745dde0dae11ad5
blueprint nested-resource-providers
2017-12-11 11:37:31 +09:00
Zuul 3cec0cb584 Merge "Fix NoneType error when [service_user] is misconfigured" 2017-12-10 20:07:27 +00:00
Zuul adedd40647 Merge "Follow up on removing old-style quotas code" 2017-12-09 07:24:15 +00:00
Zuul 9ff02d6d0d Merge "Unmap compute nodes when deleting host mapping" 2017-12-09 07:24:09 +00:00
Zuul e390871a41 Merge "[placement] Fix an error message in API validation" 2017-12-09 07:24:02 +00:00
Zuul 0ceb016bc7 Merge "Add API and nova-manage tests that use the NoopQuotaDriver" 2017-12-09 07:23:55 +00:00
Zuul 4784513b41 Merge "Reformat _get_all_with_shared" 2017-12-09 06:54:34 +00:00
Zuul ced5d0f323 Merge "Scheduler set_inventory_for_provider does nested" 2017-12-09 06:26:31 +00:00
Zuul c69631700b Merge "[placement] Object changes to support last-modified headers" 2017-12-09 06:26:19 +00:00
Zuul e22ec4ff03 Merge "placement: update client to set parent provider" 2017-12-09 06:26:05 +00:00
Zuul f3f1514efa Merge "Fix cellsv1 messaging test" 2017-12-09 03:24:00 +00:00
Zuul 13ce78d125 Merge "Implement new attach Cinder flow" 2017-12-09 03:06:14 +00:00
Zuul 5d97937c3c Merge "Add new style volume attachment support to block_device.py" 2017-12-09 02:58:58 +00:00
Zuul a08d7712df Merge "Modify select_destinations() to return objects and alts" 2017-12-09 02:58:48 +00:00
Zuul a758e3889a Merge "Move the to_dict() method to the Selection object" 2017-12-09 02:58:40 +00:00
Zuul f56eede7ae Merge "Return Selection objects from the scheduler driver" 2017-12-09 02:58:33 +00:00
Zuul 681298e8a1 Merge "Refactor the code to check for sufficient hosts" 2017-12-09 02:06:12 +00:00
Zuul 7b9f930fee Merge "xenapi: pass migrate_data to recover_method if live migrate fails" 2017-12-09 01:36:24 +00:00
Dan Smith 8ad36d15e4 Unmap compute nodes when deleting host mapping
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
2017-12-08 14:55:12 -08:00
melanie witt 4d3bd33134 Follow up on removing old-style quotas code
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
2017-12-08 22:11:24 +00:00
melanie witt 93ceb7fb5e Add API and nova-manage tests that use the NoopQuotaDriver
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
2017-12-08 22:11:24 +00:00
Zuul 82acee044e Merge "Fix 'force' parameter in os-quota-sets PUT schema" 2017-12-08 19:27:25 +00:00
Zuul f9be6dd732 Merge "Updated from global requirements" 2017-12-08 19:16:33 +00:00
Zuul 476e7b534a Merge "Avoid stashed connector lookup for new style detach" 2017-12-08 15:43:02 +00:00
Zuul f942f45c1a Merge "XenAPI: update the picture in Xen hypervisor document" 2017-12-08 12:30:04 +00:00
Chris Dent ee47beb3be [placement] Object changes to support last-modified headers
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
2017-12-07 18:47:17 +00:00
Zuul 81544829d1 Merge "libvirt: Re-initialise volumes, encryptors, and vifs on hard reboot" 2017-12-07 16:52:37 +00:00
Zuul adc4d4a29d Merge "placement: adds REST API for nested providers" 2017-12-07 16:38:40 +00:00
John Griffith 6d70d6adf9 Implement new attach Cinder flow
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
2017-12-07 10:29:15 -05:00
John Griffith 2d68fbe565 Add new style volume attachment support to block_device.py
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
2017-12-07 10:23:00 -05:00
Ed Leafe e7152eef7b Modify select_destinations() to return objects and alts
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
2017-12-07 15:01:13 +00:00
Ed Leafe 526934eafd Move the to_dict() method to the Selection object
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
2017-12-07 15:01:09 +00:00
EdLeafe b33cfe8bb8 Return Selection objects from the scheduler driver
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
2017-12-07 15:01:04 +00:00
Ed Leafe 638e8d3254 Refactor the code to check for sufficient hosts
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
2017-12-07 15:01:02 +00:00
Matt Riedemann 9ddbaa15cb Fix 'force' parameter in os-quota-sets PUT schema
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
2017-12-07 08:59:29 -05:00
Eric Fried 55b6a2f5d3 Reformat _get_all_with_shared
This change set pulls the otherwise-unrelated reformatting out of [1].
There is no functional change.

[1] https://review.openstack.org/#/c/377215/48/nova/objects/resource_provider.py@1275

Change-Id: I91540a3965ab81bea92b05441e37ae6365da6c68
blueprint: nested-resource-providers
2017-12-07 13:51:06 +00:00
OpenStack Proposal Bot 14c74f1dce Updated from global requirements
Change-Id: I05c26b75c2e4fe37dd6832b695851befa2f48e4b
2017-12-07 13:37:18 +00:00
Zuul 76f8013f4b Merge "[placement] re-use existing conf with auth token middleware" 2017-12-07 08:57:06 +00:00
Zuul ede4cf2ef6 Merge "placement: allow filter providers in tree" 2017-12-07 08:56:32 +00:00
Zuul 1893c24d22 Merge "Add Selection objects" 2017-12-07 06:45:11 +00:00
Zuul 9aab64558d Merge "XenAPI: provide vGPU inventory in compute node" 2017-12-07 06:39:08 +00:00
Jianghua Wang 2046991c58 XenAPI: update the picture in Xen hypervisor document
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
2017-12-06 22:20:11 -08:00
Zuul 1f29d4283a Merge "Add PowerVM to compute_driver options" 2017-12-07 00:06:22 +00:00
Matt Riedemann 82de8bc5ac Avoid stashed connector lookup for new style detach
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
2017-12-06 16:40:06 -05:00