Fix the location of the 'trusted_image_certificates'
parameter in the parameter list
of the request body in the "Create Server" API.
Add an additional description that explains
the value is null if the trusted certificate IDs are not set
in the description for the 'trusted_image_certificates' parameter
in the response body.
Change-Id: Ibd3763044068c64b88a28d6c541c569233e112f8
Closes-Bug: #1777394
Support for the 'multi_instance_display_name_template' option was
removed in commit 0e43002c9 and booting multiple instances now will
simply result in a simple numerical suffix (-1, -2, -3, ...) being added
to the instance's 'display_name' and 'hostname' attributes.
We're now in a position to greatly simplify how we do this, so do just
that, removing some comments and updating some documentation that
referenced the removed option in the process.
Change-Id: If5369bcf4a6f7fc36190e153776e60446eb14040
This adds a new policy rule which defaults to behave in a
backward compatible way, but will allow operators to enforce
that servers created with a zero disk flavor must also be
volume-backed servers.
Allowing users to upload their own images and create image-backed
servers on local disk with zero root disk size flavors can be
potentially hazardous if the size of the image is unexpectedly
large, since it can consume the local disk (or shared storage pool).
It should be noted that disabling the new policy rule will
result in a non-backward compatible API behavior change and no
microversion is being introduced for this because enforcement via
a new microversion would not close the security gap on any previous
microversions.
Related compute API reference and user documentation is updated
to mention the policy rule along with a release note since
this is tied to a security bug, which will be backported to stable
branches.
Change-Id: Id67e1285a0522474844de130c9263e11868f67fb
Closes-Bug: #1739646
This change adds support for the trusted_image_certificates parameter,
which is used to define a list of trusted certificate IDs that can be
used during image signature verification and certificate validation. The
parameter may contain a list of strings, each string representing the ID
of a trusted certificate. The list is restricted to a maximum of 50 IDs.
The list of certificate IDs will be stored in the trusted_certs field of
the instance InstanceExtra and will be used to verify the validity of
the signing certificate of a signed instance image.
The trusted_image_certificates request parameter can be passed to
the server create and rebuild APIs (if allowed by policy):
* POST /servers
* POST /servers/{server_id}/action (rebuild)
The following policy rules were added to restrict the usage of the
``trusted_image_certificates`` request parameter in the server create
and rebuild APIs:
* os_compute_api:servers:create:trusted_certs
* os_compute_api:servers:rebuild:trusted_certs
The trusted_image_certificates parameter will be in the response
body of the following APIs (not restricted by policy):
* GET /servers/detail
* GET /servers/{server_id}
* PUT /servers/{server_id}
* POST /servers/{server_id}/action (rebuild)
APIImpact
Implements blueprint: nova-validate-certificates
Change-Id: Iedd3fea0e86648fae364f075915555dcb2c4f199
Some of the block_device_mapping_v2 parameter descriptions
were lacking details on valid values, combinations, restrictions
and how things get linked together, for example, to get a swap
bdm. This fills in the details and re-words things in some
places for clarity.
The mention of the libvirt driver in the guest_format for
non-swap ephemeral block devices is removed since (1) it's
overly confusing and (2) API users shouldn't know or care
if the hypervisor running their server is libvirt or not.
The point is, if you want swap, ask for swap, and if you want
ephemeral, specify one of the other values. Then you get what
you get and you don't throw a fit.
Change-Id: Ia7e49f28e2f410ada5c2f4c2e3a13ffd97e54654
Since I8ae8507a089df4d0a32be5fbc615e2166f44516e the config option
multi_instance_display_name_template has been removed.
So this patch removes the remaining of the option.
Change-Id: I81fa2588d85c803415aadf6150ed6cdd7a0fe6d1
In the following APIs, the 'volume_id' parameters are
'path' parameters. So fix them.
- GET /servers/{server_id}/os-volume_attachments/{volume_id}
- DELETE /servers/{server_id}/os-volume_attachments/{volume_id}
In addition, the descriptions of the parameters are amended.
Change-Id: Iab93acde31639b1471c83b06fb1a77474bb52c48
Closes-Bug: #1770560
This patch adds a new microversion to
``GET /servers/{server_id}/os-instance-actions/{req_id}`` API to
include the ``host`` field for admin and an ``hostId`` for all users
by default. And the display of newly added ``host`` field will be
controlled by the same policy as the ``traceback`` field.
The newly added fields can be used to determine on which host a
given action event occurred.
Part of blueprint: add-host-to-instance-action-events
Change-Id: I2f8b4a12a088b9ed96b428eafde2e0c478fb1db5
This was marked optional in change If57aa3e37 but it has
only been optional since Queens due to change I8a3e7e6c4,
before that you will get a 400 error if you do not provide
boot_index in the BDMs, e.g.:
2018-04-23 12:34:13,308 INFO [nova.api.openstack.wsgi] \
HTTP exception thrown: Block Device Mapping is Invalid: \
Boot sequence for the instance and image/block device \
mapping combination is not valid.
2018-04-23 12:34:13,310 INFO [nova.api.openstack.requestlog] \
127.0.0.1 "POST /v2.1/6f70656e737461636b20342065766572/servers"
status: 400 len: 164 microversion: 2.1 time: 0.129485
One could argue that I8a3e7e6c4b72eb1c3707d54049d18dc29f606fe5
is a behavior change that should have gone with a microversion,
which if people agree with that, could be reverted separately.
Change-Id: I14d44dbc0b6a8fb25932c333e695cad9edaefbed
Closes-Bug: #1766306
Exposes flavor extra_specs in the flavor representation since
microversion 2.61. Now users can see the flavor extra-specs
in flavor APIs response only and do not need to call
``GET /flavors/{flavor_id}/extra_specs`` API.
Flavor extra_specs will be included in Response body of the
following APIs:
* ``GET /flavors/detail``
* ``GET /flavors/{flavor_id}``
* ``POST /flavors``
* ``PUT /flavors/{flavor_id}``
Part of blueprint add-extra-specs-to-flavor-list
Change-Id: I048747633babf690a63c6de9773bff5547872053
This patch verifies BDM, fault and scheduler hint parameters.
A subsequent patch will verify other parameters.
Change-Id: If57aa3e37ebaa6fa13718480bb216d10664aa5b1
Partial-Bug: #1738930
This patch verifies query parameters.
Subsequent patches will verify other parameters.
Change-Id: I6078c0c8ebc888dc120f446f228a3b0433b89a76
Partial-Bug: #1738930
The description of hypervisor statistics response was not for one
hypervisor, but all hypervisors. So I will modify the description
from "this hypervisor" to "all hypervisors".
Change-Id: I5b92732a9044e3ce4b18568b8b37f3e6ffc2c929
Closes-Bug: #1687871
'all_tenants' and 'all_projects' are query param to
list the resources for all tenants/projects.
Checking of this query param in code is different in different APIs.
- GET /servers and /servers/detail API checks the value of 'all_tenants'
strictly as boolean if there is one present.
- other APIs just checks the presence of it in req,
like GET /os-server-groups, /os-fping
api-ref mentioned this param types as integer, boolean or string.
This commit make api-ref consistent to have type of this query param
as string.
Change-Id: I5297e6baa1e3d06adfc9d29d2bc56124119b9c8c
Closes-Bug: #1734427
When the parameter is always 'null', it should be defined as 'none'.
So fix the parameter type of the 'force_complete'
in "Force Migration Complete Action" API.
And add an additional description for the action.
Change-Id: Ic0dd390a87d0d5a88d9a08fdaa9e59ee99f6e7c4
Closes-Bug: #1744688
This patch adds pagination support and changes-since filter
for os-migrations API.
Users can now use 'limit' and 'marker' to perform paginate
query of running migrations list. Users can also filter the
results according to the migrations' updated time.
The ``GET /os-migrations`` and server migrations APIs will now
return a uuid value in addition to the migrations id in the response,
and the query parameter schema of the ``GET /os-migrations`` API no
longer allows additional properties.
Co-Authored-By: Yikun Jiang <yikunkero@gmail.com>
Implement: blueprint add-pagination-and-change-since-for-migration-list
Change-Id: I7e01f95d7173d9217f76e838b3ea71555151ef56
This patch adds pagination support and changes-since filter
for os-instance-actions API.
Users can now use 'limit' and 'marker' to perform paginate
query of instance action list. Users can also filter the
results according to the actions' updated time.
Co-Authored-By: Yikun Jiang <yikunkero@gmail.com>
Implement: blueprint pagination-add-changes-since-for-instance-action-list
Change-Id: I1a1b39803e8d0449f21d2ab5ef96d4060e638aa8
This microversion makes the following changes:
1. Deprecates personality files from POST /servers and the rebuild
server action APIs.
2. Adds the ability to pass new user_data to the rebuild server
action API.
3. Personality / file injection related limits and quota resources
are removed from the limits, os-quota-sets and os-quota-class-sets
APIs.
Implements blueprint deprecate-file-injection
Change-Id: Ia89eeb6725459c35369e8f790f68ad9180bd3aba
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 function enables users to specify a target host
when cold migrating a VM instance.
This patch modifies the migration API.
APIImpact
Add an optional parameter 'host' in cold migration action.
Change-Id: Iee356c4dd097c846b6ca8617ead6a061300c83f8
Implements: blueprint cold-migration-with-target-queens
In rebuild operation, users can unset the existing keypair
by setting 'key_name' to 'null' in a request body.
(The function has been added in
I23886a89c25f811cfbe7e2500ce7ff52f9162966).
But it is not described obviously in API reference.
So add an additional description in API reference.
Change-Id: I2d1b8eddd8555ad6896541b308895dc537686168
In "Delete Assisted Volume Snapshot",
there is an incorrect example in the description for
the 'delete_info' parameter.
So fix it.
Change-Id: I0b984bee06b0890d7705b9e47a5f975266b6a670
Closes-Bug: #1726254
The block_device_mapping_v2 parameter is a list of dicts, so
we need to fix the type in the api-ref description.
Change-Id: I099bd8adcfc57ae31010d68b5a5b46ffe68bac8d
This adds the new microversion to allow providing
a description when creating a flavor, returning a
flavor description when showing flavor details, and
updating the description on an existing flavor.
Implements blueprint flavor-description
Change-Id: Ib16b0de82f9f9492f5cacf646dc3165a0849d75e
People get confused that os:scheduler_hints is not part of the
'server' portion of the POST /servers request body, it's actually
a separate top-level entry. This change makes a note of that in
the parameter description.
Change-Id: Id176c185dedcda970d1cd730267e2c5861b5b9c0
This patch adds `key_name` param to instance rebuild
API. Then the user could reset the instance keypair
when rebuilding. If set key_name to None, the API
will unset the keypair of the instance.
APIImpact
Implements blueprint: rebuild-keypair-reset
Change-Id: I23886a89c25f811cfbe7e2500ce7ff52f9162966
block_device_mapping_v2.bus_type is missing from
POST /servers API reference. This patch add it.
Change-Id: I998cf6195d72c80649e9e0fd43be0cf37f8e2f48
Closes-Bug: #1713895
I noticed this while working on change
I49ffebcd129990f1835f404d98b51732a32171eb and I realized
the scheduler_hints in the legacy filter_properties
dict is a bit different than what's in the RequestSpec
object, namely that the request validation schema is
per-hint. Some require a single value, like 'group', and
some accept a list of values, like 'different_host'.
Given how nebulous scheduler hints are, we should probably
note these in the API reference for the parameter, especially
because scheduler hints should not be considered interoperable.
Change-Id: I74114fc56bee2bebf4a5f5d6823ec968cad9a8e9
As part of the docs migration from openstack-manuals to
nova in the pike release we missed the config-drive docs.
This change does the following:
1. Imports the config-drive doc into the user guide.
2. Fixes a broken link to the metadata service in the doc.
3. Removes a note about liberty being the current release.
4. Adds a link in the API reference parameters to actually
point at the document we have in tree now, which is
otherwise not very discoverable as the main index does
not link to this page (or the user index for that matter).
Partial-Bug: #1714017
Closes-Bug: #1720873
Change-Id: I1d54e1f5a1a94e9821efad99b7fa430bd8fece0a
This adds to the existing warning about forcing a host during
evacuate and mentions how you really really shouldn't be doing
that if the instance is managed by the ironic driver
since those are 1:M with host:node relationships, and since you
can't specify a node when forcing the evacuate, nova will randomly
pick a node from the list for the given host and assign resource
allocations to that node which may already be fully allocated.
Change-Id: I8ae34399d32b2762a67e897807ffa2298e796c4c
The project_id / tenant_id filter parameters when
listing servers is only applied when the all_tenants
filter is used.
Otherwise if an admin is listing servers and specifies
project_id but not all_tenants, they only get back
instances for the admin's project (in the request context).
Change-Id: I9e8fae8fb86604d7394d0dba4d7c75c3fc93033e
Related-Bug: #1185290