Commit Graph

48886 Commits

Author SHA1 Message Date
Zuul b9c19ac8eb Merge "placement: add nested resource providers" 2017-11-29 19:55:39 +00:00
OpenStack Proposal Bot f4c436c0cf Updated from global requirements
Change-Id: I3129f3c1b41a68d6c03d43f7bc1dba4a1d2b882d
2017-11-29 09:08:01 +00:00
Zuul 7e2d8cb89b Merge "PowerVM support matrix update" 2017-11-29 06:41:57 +00:00
Zuul 16ee32b0fd Merge "Updated from global requirements" 2017-11-29 02:22:37 +00:00
Zuul 851bf6c122 Merge "Save updated libvirt domain XML after swapping volume" 2017-11-29 00:57:52 +00:00
Zuul dffd50df39 Merge "PowerVM Driver: config drive" 2017-11-29 00:57:39 +00:00
OpenStack Proposal Bot 0ae992bfb3 Updated from global requirements
Change-Id: Ie857878bbf063fa687cba2e745329c3fc9ae1f92
2017-11-28 23:07:37 +00:00
melanie witt 5b008c6540 Save updated libvirt domain XML after swapping volume
When a user calls the volume-update API, we swap_volume in the libvirt
driver from the old volume attachment to the new volume attachment.
Currently, we're saving the domain XML with the old configuration prior
to updating the volume and upon a soft-reboot request, it results in an
error:

  Instance soft reboot failed: Cannot access storage file <old path>

and falls back to a hard reboot, which is like pulling the power cord,
possibly resulting in file system inconsistencies.

This changes to saving the new, updated domain XML after the volume
swap.

Closes-Bug: #1713857

Change-Id: I166cde5ad8b00699e4ec02609f0d7b69236d855d
2017-11-28 21:29:33 +00:00
Zuul 05c6b54eec Merge "Enable cold migration with target host(1/2)" 2017-11-28 21:00:28 +00:00
Jay Pipes b10f11d7e8 placement: add nested resource providers
Adds initial support for storing the relationship between parent and
child resource providers. Nested resource providers are essential for
expressing certain types of resources -- in particular SR-IOV physical
functions and certain SR-IOV fully-programmable gate arrays. The
resources that these providers expose are of resource class
SRIOV_NET_VF and we will need a way of indicating that the physical
function providing these virtual function resources is tagged with
certain traits (representing vendor_id, product_id or the physical
network the PF is attached to).

The compute host is a resource provider which has an SR-IOV-enabled
physical function (NIC) as a child resource provider. The physical
function has an inventory containing some total amount of SRIOV_NET_VF
resources. These SRIOV_NET_VF resources are allocated to zero or more
consumers (instances) on the compute host.

                    compute host (parent resource provider)
                         |
                         |
                      SR-IOV PF  (child resource provider)
                         :
                        / \
                       /   \
                    VF1    VF2   (inventory of child provider)

The resource provider model gets two new fields:

 - root_provider_uuid: The "top" or "root" of the tree of nested
   providers
 - parent_provider_uuid: The immediate parent of the provider, or None
   if the provider is a root provider.

The database schema adds two new columns to the resource_providers
table that contain the internal integer IDs that correspond to the
user-facing UUID values:

 - root_provider_id
 - parent_provider_id

The root_provider_uuid field is non-nullable in the ResourceProvider
object definition, and this code includes an online data migration to
automatically populate the root_provider_id field with the value of the
resource_providers.id field for any resource providers already in the
DB.

The root_provider_id field value is populated automatically when a
provider is created. If the parent provider UUID is set, then the
root_provider_id is set to the root_provider_id value of the parent. If
parent is unset, root_provider_id is set to the value of the id
attribute of the provider being created. The corresponding UUID values
for root and parent provider are fetched in the queries that retrieves
resource provider data using two self-referential joins.

The root_provider_id column allows us to do extremely quick lookups of
an entire tree of providers without needing to perform any recursive
database queries.

Logic in this patch ensures that no resource provider can be deleted if
any of its children have any allocations active on them. We also check
to ensure that when created or updated, a resource provider's parent
provider UUID actually points to an existing provider.

It's important to point out that qualitative trait information is only
associated with a resource provider entity, not the resources that
resource provider has in its inventory. This is the reason why nested
resource providers are necessary. In the case of things like NUMA nodes
or SRIOV physical functions, if a compute host had multiple SRIOV
physical functions, each associated with a different network trait,
there would be no way to differentiate between the SRIOV_NET_VF
resources that those multiple SRIOV physical functions provided if the
containing compute host had a single inventory item containing the
total number of VFs exposed by both PFs.

Change-Id: I2d8df57f77a03cde898d9ec792c5d59b75f61204
blueprint: nested-resource-providers
Co-Authored-By: Moshe Levi <moshele@mellanox.com>
2017-11-28 15:29:28 -05:00
Zuul 379bbf5183 Merge "libvirt: remove extraneous retry assignment in cleanup method" 2017-11-28 20:26:18 +00:00
Zuul 82a6ca21ba Merge "Remove 'nova-manage quota refresh' command" 2017-11-28 20:02:40 +00:00
Zuul caff225a1a Merge "Regenerate and pass configdrive when rebuild Ironic nodes" 2017-11-28 19:44:41 +00:00
Zuul 5b5b5c8df3 Merge "Update the documentation links" 2017-11-28 19:09:16 +00:00
Zuul 96fcf0c942 Merge "[placement] Clean up TODOs in allocations.yaml gabbit" 2017-11-28 19:09:07 +00:00
Zuul a201ce1891 Merge "[placement] Fix GET PUT /allocations nits" 2017-11-28 19:01:43 +00:00
Zuul 403d13247e Merge "[placement] POST /allocations to set allocations for >1 consumers" 2017-11-28 19:01:37 +00:00
Zuul f0097ef7ed Merge "Add regression test for rebuild with new image doubling allocations" 2017-11-28 18:57:32 +00:00
Zuul 757626e781 Merge "Add instance action record for lock/unlock instances" 2017-11-28 18:57:10 +00:00
Zuul 0c5c964988 Merge "Implement query param schema for sec group APIs" 2017-11-28 18:56:55 +00:00
Zuul 42706270b9 Merge "Don't overwrite binding-profile" 2017-11-28 15:45:49 +00:00
Zuul ea51587508 Merge "Add instance action record for attach/detach/swap volumes" 2017-11-28 15:32:13 +00:00
Zuul 114817560b Merge "Update document related to host aggregate" 2017-11-28 15:26:28 +00:00
Chris Dent 453fd67da1 [placement] Fix GET PUT /allocations nits
In the review of I49f5680c15413bce27f2abba68b699f3ea95dcdc, a few
non-blocking nits were identified. This change addresses some of
those nits, fixing some typos, clarifying method names and what
microversion is in use at particular times.

Change-Id: Iff15340502ce43eba3b98db26aa0652b1da24504
2017-11-28 12:25:13 +00:00
Chris Dent 8caf4f5148 [placement] POST /allocations to set allocations for >1 consumers
This provides microversion 1.13 of the placement API, giving the
ability to POST to /allocations to set (or clear) allocations for
more than one consumer uuid.

It builds on the recent work to support a dict-based JSON format
when doing a PUT to /allocations/{consumer_uuid}.

Being able to set allocations for multiple consumers in one request
helps to address race conditions when cleaning up allocations during
move operations in nova.

Clearing allocations is done by setting the 'allocations' key for a
specific consumer to an empty dict.

Updates to placement-api-ref, rest version history and a reno are
included.

Change-Id: I239f33841bb9fcd92b406f979674ae8c5f8d57e3
Implements: bp post-allocations
2017-11-28 12:15:53 +00:00
Kevin_Zheng fbea321841 Add instance action record for lock/unlock instances
We currently don't record lock/unlock instance
actions. This is useful for auditing and debugging.

This patch adds instance lock/unlock actions.

Change-Id: I09fadf79aac1a74465af48015ef97d9e9d4ac580
partial-implements: blueprint fill-the-gap-for-instance-action-records
2017-11-28 19:22:15 +08:00
Zuul b60a599b5f Merge "[placement] Symmetric GET and PUT /allocations/{consumer_uuid}" 2017-11-28 11:09:03 +00:00
Zuul fa2c1567c1 Merge "Refined fix for validating image on rebuild" 2017-11-28 03:48:43 +00:00
Guoqiang Ding 66a44c95f1 Update the documentation links
The documentation about "ops-guide" has been moved.

Change-Id: I151d1f989cb032c3a3775e5bfffcec58a2cf0121
2017-11-28 11:07:36 +08:00
Kevin_Zheng 1cea4f0135 Add instance action record for attach/detach/swap volumes
We currently don't record volume attach/detach/swap instance
actions. This is useful for auditing and debugging.

This patch adds volume attach/detach/swap actions.

Change-Id: I0a3d15f3e3d0d8d920a79b519e17e3228e99f293
partial-implements: blueprint fill-the-gap-for-instance-action-records
2017-11-27 16:34:48 -05:00
Zuul 916795e0fd Merge "Updated from global requirements" 2017-11-27 20:57:50 +00:00
Matt Riedemann cacfd372ac Add regression test for rebuild with new image doubling allocations
Commit 984dd8ad6a makes a rebuild
with a new image go through the scheduler again to validate the
image against the instance.host (we rebuild to the same host that
the instance already lives on).

The problem is that change introduced a regression where the
FilterScheduler is going to think it's doing a resize to the same
host and double the allocations for the instance (and usage for the
compute node provider) in Placement, which is wrong since the
flavor is the same.

This adds a regression test to show the bug.

Change-Id: Ie0949b4e6101f0b29ec4542146d523a07a683991
Related-Bug: #1664931
2017-11-27 15:52:50 -05:00
Dan Smith f7c688b8ef Refined fix for validating image on rebuild
This aims to fix the issue described in bug 1664931 where a rebuild
fails to validate the existing host with the scheduler when a new
image is provided. The previous attempt to do this could cause rebuilds
to fail unnecessarily because we ran _all_ of the filters during a
rebuild, which could cause usage/resource filters to prevent an otherwise
valid rebuild from succeeding.

This aims to classify filters as useful for rebuild or not, and only apply
the former during a rebuild scheduler check. We do this by using an internal
scheduler hint, indicating our intent. This should (a) filter out
all hosts other than the one we're running on and (b) be detectable by
the filtering infrastructure as an internally-generated scheduling request
in order to trigger the correct filtering behavior.

Closes-Bug: #1664931
Change-Id: I1a46ef1503be2febcd20f4594f44344d05525446
2017-11-27 15:52:45 -05:00
Zuul b9d9de8962 Merge "Versioned notifications for service create and delete" 2017-11-27 19:41:04 +00:00
Zuul c6b352d1ce Merge "Implement query param schema for delete assisted vol" 2017-11-27 19:40:53 +00:00
Zuul bfe0130763 Merge "Add ProviderSummary.resource_class_names @property" 2017-11-27 19:23:18 +00:00
Zuul 43d28c2aab Merge "required traits for no sharing providers" 2017-11-27 19:23:03 +00:00
Zuul d95894c0b5 Merge "finish refactor AllocCandidates._get_by_filters()" 2017-11-27 19:22:42 +00:00
Zuul efce0ea78e Merge "Implement query param schema for fping index" 2017-11-27 17:00:32 +00:00
Zuul 2c4241ded7 Merge "Implement query param schema for flavor index" 2017-11-27 17:00:25 +00:00
liyingjun 8e793a6c6f Versioned notifications for service create and delete
New notifications service.create and service.delete are introduced
with INFO priority and the payload of the notification is the serialized
form of the already existing Service versioned object. Service.create
notification will be emitted after the service is created (so the uuid
is available) and also send the service.delete notification after the
service is deleted.

Implement blueprint: service-create-destroy-notification

Change-Id: I955d98f9fd4b121f98e172e5ab30eb668a24006d
2017-11-27 11:11:44 -05:00
ghanshyam 6590dd2900 Implement query param schema for delete assisted vol
DELETE assisted_volume_snapshots API accept 'delete_info'
query param.

This commit adds json schema to validate the valid
query parameters.

There is no change in API behaviour and additionalProperties
is kept True for backward compatibility.

Partially implements blueprint json-schema-validation-for-query-param

Change-Id: Ie1e81dfdb1e42af87725977c0f9504ea35ca9d70
2017-11-27 10:27:52 -05:00
Jay Pipes 9bff6afe80 Add ProviderSummary.resource_class_names @property
Adds a simple ProviderSummary.resource_class_names @property that
returns a set() of resource class string names for all resources in the
provider summary. This allows a couple locations in the
_alloc_candidates_with_shared() function to be a little more readable.

Change-Id: I5ba492db3e38a3b560443780af82aef5105f13e1
2017-11-27 15:14:49 +00:00
Jay Pipes 828d9eb516 required traits for no sharing providers
Adds filtering on a set of required traits to the
AllocationCandidates._get_by_filters() method, for deployments with no
shared providers that are involved in the request.

This patch should demonstrate where I'm heading with the breaking out of
the various SQL-related pieces into their own functions. The next patch
will add required traits support for scenarios with sharing providers.

Change-Id: Iac246245ef7aedfa2d23e623f83fdf384e252159
2017-11-27 15:13:07 +00:00
Jay Pipes ea63b3b40f finish refactor AllocCandidates._get_by_filters()
This patch completes the refactoring of the
AllocationCandidates._get_by_filters() mega-method by splitting out the
remaining pieces of code that handle the construction of the
part-shared, part-non-shared allocation requests for when there are
sharing providers in a deployment.

The split-out _alloc_candidates_with_shared() is still a long, complex
method and I'll continue trying to reduce the complexity there and break
functions out of it further. I did uncomplicate a part of the function
with use of the itertools.product() function to replace a faulty use of
zip() against a list of allocation request resource lists.

Closes-Bug: #1730730
Change-Id: Ibcfd1a28f36d3c7ccd26fcc6386207e4a25300d4
2017-11-27 15:53:58 +01:00
esberglu 948517756f PowerVM support matrix update
This updates the config drive status to complete for PowerVM [1]. It
also updates the status for PowerVM features previously classified as
unknown.

[1] https://review.openstack.org/#/c/409404/

Change-Id: Idc5e40f2473d27c31c5a620ad9b93cce01dc7f85
2017-11-27 08:52:56 -06:00
Zuul 2c7302e33e Merge "Api-guide: Address TODOs in user_concepts section" 2017-11-26 15:55:34 +00:00
Zuul b0b301506d Merge "Api guide:add Server Consoles" 2017-11-26 15:23:14 +00:00
OpenStack Proposal Bot 183c98112c Updated from global requirements
Change-Id: I8c54e6fa64d89f99ff19e1cfc3530e9c3ec25d0f
2017-11-25 18:22:04 +00:00
ghanshyam 82c4005f43 Implement query param schema for flavor index
GET flavor API accept query param to filter the
flavors.
This commit adds json schema to validate the valid
query parameters.

There is no change in API behaviour and additionalProperties
is kept True for backward compatibility.

Partially implements blueprint json-schema-validation-for-query-param

Change-Id: I61324ba58eddfed1445d7c70db761961e1b6a864
2017-11-25 09:34:22 +00:00