Commit Graph

3856 Commits

Author SHA1 Message Date
zhangbailin c19de075e1 Add nested resource providers limit for multi create
In 21.0.0 Ussuri we were completed the nova-cyborg interaction feature,
but there are some issue when multiple create instances.

Creating servers with accelerators provisioned with the Cyborg service,
if a flavor asks for resources that are provided by nested Resource
Provider inventories (eg. VGPU) and the user wants multi-create (ie. say
--max 2) then the scheduler could be returning a NoValidHosts exception
even if each nested Resource Provider can support at least one specific
instance, if the total wanted capacity is not supported by only one
nested RP.

For example,creating servers with accelerators provisioned with the
Cyborg service, if two children RP have 4 VGPU inventories each:
 - you can ask for a flavor with 2 VGPU with --max 2
 - but you can't ask for a flavor with 4 VGPU and --max 2

Related-Bug: #1874664
Change-Id: I64647a6ba79c47c891134cedb49f03d3c61e8824
2020-05-02 01:10:06 +00:00
Zuul d24de1440e Merge "Add docs and releasenotes for BP policy-defaults-refresh" 2020-04-23 07:30:02 +00:00
Ghanshyam Mann af21183082 Add docs and releasenotes for BP policy-defaults-refresh
This commit adds the documents to explain the new defaults,
migration plan and releases notes for policies changes in
BP policy-defaults-refresh

Partial implement blueprint policy-defaults-refresh

Change-Id: I00e678858a8e46786f3b69fbba3f5353932de49b
2020-04-23 02:06:06 +00:00
Lee Yarwood 30fcb2ddfd docs: Add stable device rescue docs
Adds the new mode to the existing user rescue docs and highlights some
known limitations.

Change-Id: Iaa2f27ccb2a77102fde6b24b76c9d5ae54608cca
2020-04-21 10:54:18 +01:00
Zuul 418eb770fc Merge "Allocate mdevs when resizing or reverting resize" 2020-04-21 00:42:44 +00:00
Sylvain Bauza d2e0afc1f7 Allocate mdevs when resizing or reverting resize
Now that allocations are passed to the methods, we can ask whether we
need to use mediated devices for the instance.

Adding a large functional test for verifying it works.

Change-Id: I018762335b19c98045ad42147080203092b51c27
Closes-Bug: #1778563
2020-04-20 14:48:16 +02:00
Takashi Natsume 2e299a6e72 doc: Fix term mismatch warnings in glossary
The term role has became case sensitive since sphinx 3.0.1.
It causes the following warnings and makes a check job fail.

  WARNING: term not in glossary: availability zone

This patch fixes the issue.

Change-Id: I1f993b503ef769da0950afa206d6ac4a54f903b4
Closes-Bug: #1872260
2020-04-12 13:06:49 +09:00
Zuul a40c694125 Merge "api: Introduce microverion 2.87 allowing boot from volume rescue" 2020-04-10 20:12:04 +00:00
Zuul 8ee8d03c69 Merge "[Trivial] FUP: addressed comments in support non-admin filter instances" 2020-04-10 13:18:45 +00:00
zhangbailin 9ca505700a [Trivial] FUP: addressed comments in support non-admin filter instances
This commit mainly addressed comments in [1]
[1]https://review.opendev.org/#/c/701609/9/api-ref/source/parameters.yaml@420
that were related to change Ia66d3a1ceb74ed521cf44922929b2a502f3ee935

Part of blueprint non-admin-filter-instance-by-az
Change-Id: I8627de0fdb31f2090a4eef7dba8f0f5eb4ebb946
2020-04-10 09:17:48 +00:00
Zuul c9421a3248 Merge "docs: Add documentation for flavor extra specs" 2020-04-10 05:22:22 +00:00
Zuul f758a7d8ae Merge "api: Add microversion for extra spec validation" 2020-04-10 05:22:03 +00:00
Zuul 77482b05af Merge "Support different vGPU types per pGPU" 2020-04-09 23:29:14 +00:00
Sylvain Bauza 5b5cbc64f9 Support different vGPU types per pGPU
It's now possible to have a different vGPU type for each pGPU. By modifying
the config, you can say which PCI device (ie. a pGPU) should use a specific
vGPU type.

For upgrades, the behaviour from Train won't be changed since we only use
the first type if we don't have the dynamic options (so operators don't
need to change nova.conf before upgrading).

Implements: blueprint vgpu-multiple-types

Change-Id: I46f0a76811142888db2bbc66cc3fde04ff890c01
2020-04-09 17:54:26 +02:00
Lee Yarwood 24106290e6 api: Introduce microverion 2.87 allowing boot from volume rescue
Building on Ic2ad1468d31b7707b7f8f2b845a9cf47d9d076d5, when requested
this microversion will allow boot from volume requests to proceed when
the COMPUTE_RESCUE_BFV trait is also reported by the compute the
instance currently resides on.

Implements: blueprint virt-bfv-instance-rescue
Change-Id: I3242fec1547693078cf36c3637116f8c41f1d0bc
2020-04-09 08:39:36 +01:00
Zuul 874c2fe329 Merge "api: Add framework for extra spec validation" 2020-04-09 07:01:46 +00:00
Zuul 2fe5d90436 Merge "partial support for live migration with specific resources" 2020-04-08 16:56:59 +00:00
Stephen Finucane 63e30e022d docs: Add documentation for flavor extra specs
Now that we have a registry of all extra specs known by stock nova, we
can start documenting these. We choose the configuration guide to do
this since configuration of flavor extra specs is traditionally an
admin-only operation.

Part of blueprint flavor-extra-spec-validators

Change-Id: I5ad6576e0d31a29822d1c7b47751ea81828630cf
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-04-08 13:20:15 +00:00
Stephen Finucane d8e9daafe8 api: Add microversion for extra spec validation
Enable support for API-based extra spec validation. Since most of the
hard work has been done in previous patches, all that's necessary here
is to wire up the microversion handling and turn things on.

Part of blueprint flavor-extra-spec-validators

Change-Id: If67f0d924ea372746a6dc440ea7bdc655e4f0bea
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-04-08 13:20:02 +00:00
Stephen Finucane 58784943f7 api: Add framework for extra spec validation
Add the validation framework necessary to verify extra specs along with
the definitions for every extra spec we currently recognize in-tree.
None of this is currently used since we don't have the API microversions
wired up, but that will come in a future patch.

Note that we must add the H238 hacking check to the ignore list here,
since this includes our first use of Python 3-type classes without the
explicit 'object' subclass. This can be removed when that check is
removed from hacking.

Part of blueprint flavor-extra-spec-validators

Change-Id: Ib64a1348cce1dca995746214616c4f33d9d664bd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-04-08 12:47:01 +00:00
LuyaoZhong 990a26ef1f partial support for live migration with specific resources
1. Claim allocations from placement first, then claim specific
   resources in Resource Tracker on destination to populate
   migration_context.new_resources
3. cleanup specific resources when live migration succeeds/fails

Because we store specific resources in migration_context during
live migration, to ensure cleanup correctly we can't drop
migration_context before cleanup is complete:
 a) when post live migration, we move source host cleanup before
    destination cleanup(post_live_migration_at_destination will
    apply migration_context and drop it)
 b) when rollback live migration, we drop migration_context after
    rollback operations are complete

For different specific resource, we might need driver specific support,
such as vpmem. This change just ensures that new claimed specific
resources are populated to migration_context and migration_context is not
droped before cleanup is complete.

Change-Id: I44ad826f0edb39d770bb3201c675dff78154cbf3
Implements: blueprint support-live-migration-with-virtual-persistent-memory
2020-04-07 13:12:53 +00:00
Zuul bc10a724c6 Merge "Add info about affinity requests to the troubleshooting doc" 2020-04-06 11:56:59 +00:00
Zuul ae39f0395f Merge "Support for nova-manage placement heal_allocations --cell" 2020-04-03 15:13:00 +00:00
Zuul e487b05f7e Merge "Allow PUT volume attachments API to modify delete_on_termination" 2020-04-03 05:21:35 +00:00
Zuul bf242d1f16 Merge "FUP for Add a placement audit command" 2020-04-02 23:08:07 +00:00
hackertron 1a39ed9005 Support for nova-manage placement heal_allocations --cell
Closes-bug: #1868531

Change-Id: I98b3280583a6d12461d8aa52e5714d7606b84369
2020-04-02 16:06:38 -04:00
zhangbailin 733d4133df Allow PUT volume attachments API to modify delete_on_termination
Allow PUT /servers/{server_id}/os-volume_attachments/{volume_id}``
to support specifying ``delete_on_termination`` field in the request
body. This allows updating the attached volume's flag that controls
whether or not it is automatically deleted when the instance is deleted.

When we request 'volumeId' and 'delete_on_termination' in the requst
body to swap volume, since the new microversion it will be support
updating the swapping volume's delete flag.

Co-Authored-By: Dan Smith <dansmith@redhat.com>

Blueprint: destroy-instance-with-datavolume
Change-Id: I6ccac4e17f56b40e67c79d40f32558ef414685ea
2020-04-02 09:26:55 -07:00
melanie witt df216de6d9 Add info about affinity requests to the troubleshooting doc
We had recent bug report about a possible regression related to
affinity policy enforcement with parallel server create requests.

It turned out not to be a regression but because of the complexity
around affinity enforcement, it might help to add a section to the
compute troubleshooting doc about it which we could refer to in the
future.

Related-Bug: #1863190

Change-Id: I508c48183a7205d46e13154d4e92d31dfa7f7d78
2020-03-31 22:21:40 +00:00
Zuul e5ea915f1b Merge "[Community goal] Update contributor documentation" 2020-03-31 19:33:46 +00:00
Zuul 81a6439923 Merge "Add instance actions v284 samples test" 2020-03-30 12:01:39 +00:00
Zuul fe66c28dac Merge "Add a placement audit command" 2020-03-30 12:01:33 +00:00
Sylvain Bauza 35ec5a0bd1 FUP for Add a placement audit command
Since I537ed74503d208957f0a97af3ab754a6750dac20 had some clean-up comments,
we can just provide a follow-up change.

Change-Id: Ie8b5147322e13ad7df966b5c3c41ef0418e4f64c
Related-Bug: #1793569
2020-03-30 12:18:05 +02:00
zhangbailin 59156bdf01 Add instance actions v284 samples test
Implements blueprint action-event-fault-details
Change-Id: I8e8a5ca1efe4a3554038dcddc503c3030956e0b9
2020-03-30 03:02:31 +00:00
Matt Riedemann 8337bee4b5 Expose instance action event details out of the API
This adds a new microversion to expose the instance action
event details in the
GET /servers/{server_id}/os-instance-actions/{request_id} API.

With the new microversion the "details" key is always returned
with each event dict but the value may be null because of old
records or events that did not fail.

The details are not constrained by policy like the traceback
field since the details are like a fault message on the server
resource when the server is in ERROR status and the fault
message is likewise not constraint by policy unlike the fault
details which is a traceback like the event traceback field.

This commit add a SYSTEM_READER ('rule: system_reader_api') role
to the Show Server Action Details API. With this default policy,
events fault details can be displayed. And also add some nova and
non-nova exception functional tests for os-instance-actions API.

Co-Authored-By: Brin Zhang <zhangbailin@inspur.com>

Implements blueprint action-event-fault-details
Change-Id: I6fe4dd265b0030ce12f92771b255a3d795f03d01
2020-03-27 08:20:12 +00:00
Zuul df9195de72 Merge "Non-Admin user can filter their instances by more filters" 2020-03-26 14:29:46 +00:00
Balazs Gibizer 612c36034b [Community goal] Update contributor documentation
As the Ussuri goal we have an OpenStack project wide contributing
documentation template [1]. Nova has its own contributor documentation
so this patch adds the new contributing.rst according to the global
template and links the sections in it to the existing Nova contributor
documentation.

Also the top level CONTRIBUTING.rst template has been changed in the
cookiecutter repo[2]. So this patch updates the CONTRIBUTING.rst according
to the new template.

[1] https://opendev.org/openstack/cookiecutter/src/branch/master/%7b%7bcookiecutter.repo_name%7d%7d/doc/source/contributor/contributing.rst
[2] https://review.opendev.org/#/c/696001

Change-Id: Ia12cd4acbb63f192fcaf0790b72f8e977025a9dc
Story: #2007236
Task: #38541
2020-03-25 12:01:37 +00:00
Victor Coutellier 4018d6fb71 Non-Admin user can filter their instances by more filters
Microversion bump to allow non-admin user to use more filters key
when listing instances.

In order to stay coherent, all existing instance filters who are
related to a field readable by default to non admin users when showing
instance details, should be allowed by default without policy
modification.

Implements: blueprint non-admin-filter-instance-by-az

Change-Id: Ia66d3a1ceb74ed521cf44922929b2a502f3ee935
2020-03-15 17:35:49 +01:00
Zuul f3abaf4bec Merge "trivial: Rename directory for os-keypairs samples" 2020-03-09 12:25:18 +00:00
Zuul d5b75845a6 Merge "Fix os-keypairs pagination links" 2020-03-09 12:25:11 +00:00
Zuul 618abecd28 Merge "hyper-v: update support matrix" 2020-03-09 12:25:05 +00:00
Zuul bb53370197 Merge "Fix hypervisors paginted collection_name." 2020-03-08 17:58:35 +00:00
Stephen Finucane f2a438aa9c trivial: Rename directory for os-keypairs samples
We have a custom of naming the directory after the API. Reinforce that
here.

Change-Id: I5bf68aacc1d987400a91467835c4b55f03c18beb
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-03-06 16:57:46 +00:00
Stephen Finucane f31efe0a0e Fix os-keypairs pagination links
The API URL is '/os-keypairs', not '/keypairs'. Attempting to use these
pagination links as-is will result in a HTTP 404 (Not Found).

Change-Id: Ic04568caecc138e6016418f6878d031c4a0d3fb4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #1866373
2020-03-06 16:57:44 +00:00
Lucian Petrut ca3e14319b hyper-v: update support matrix
This change documents certain hyper-v driver features that are not
included in the driver support matrix.

Change-Id: I29f6d816138bd31ad6bc8d327636b202d718bdff
2020-03-04 15:45:21 +02:00
Zuul 9728dff3a1 Merge "Add description of live_migration_timeout_action option" 2020-03-03 02:18:59 +00:00
Sundar Nadathur c6365f1b55 Define Cyborg ARQ binding notification event.
APIImpact: Adds 2.82 microversion for /os-server-external-events API.
DocImpact: Adds new version to doc/api_samples/versions/.

Change-Id: I7a626544d8221dc0eeb5672986ca897ce4718be8
Blueprint: nova-cyborg-interaction
2020-03-01 13:52:51 -08:00
Zuul 4ba79539c8 Merge "trivial: Use recognized extra specs in tests" 2020-02-26 12:08:11 +00:00
Zuul 4cf008135f Merge "docs: Improve documentation on writing custom scheduler filters" 2020-02-26 12:08:01 +00:00
Zuul bfe681cd29 Merge "Allow TLS ciphers/protocols to be configurable for console proxies" 2020-02-24 17:27:02 +00:00
Fan Zhang b68033ecc9 Fix hypervisors paginted collection_name.
Hypervisor view builder's _collection_name,
'hypervisors' is used to build next link that
sdk use as uri to do paginated query. But correct
API should be `GET /v2.1/os-hypervisors?<params>`
rather than `GET /v2.1/hypervisors?<params>`.

This patch fixes this bug.

Change-Id: Idc4f3fe54136a6bd3dbc7dc0efd3f62745991199
Closes-Bug: 1864428
Signed-off-by: Fan Zhang <zh.f@outlook.com>
2020-02-24 16:49:35 +08:00