We have signaled many times the use of API extensions to change the API
has been deprecated, including:
04f8612aa99e618767a85d2f674ecdfc01955ff7
This patch ensures we no longer check any of the discoverable rules when
compiling the list of extensions to list in the API. This stops users
from being able to use policy to hide certain API extensions. This was
never that useful, but now you can't turn any extensions off and we
report the API version number, it is basically useless.
Note the change in the policy cmd unit test is to ensure now there are
no rules that use the ANY rule, we correctly check we return an empty
list of rules that match.
blueprint remove-discoverable-policy-rules
Change-Id: I61d8063708731133177534888ba7f5f05a6bd901
When the nova-api services starts from its own standalone binary it
registers itself in the services table. The original wsgi script in
nova/wsgi/nova-api.py did not, leading to the bug referenced below.
The new wsgi script at nova.api.openstack.compute.wsgi, modelled on
a similar thing used for the placement API, provides the necessary
service registration.
If a ServiceTooOld exception happens while trying to register the
service then a very simple (currently very stubby) application is
loaded instead of the compute api. This application returns a 500
and a message.
Some caveats/todos:
* wsgi apps managed under mod-wsgi (and presumably other containers)
are not imported/compiled/run until the first request is made. In
this case that means the service handling does not happen until
that first request, somewhat defeating the purpose if the api is a
bit idle.
Change-Id: I7c4acfaa6c50ac0e4d6de69eb62ec5bbad72ff85
Closes-Bug: #1661360
This patch adds '/os-aggregates' related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.
Also note that the original 'ProjectMapper' use the 'routes.Mapper.resource'
to create a set of routes for a resource which comform to the Atom
publishing protocol. It includes some of URL mappings we didn't document
before. This patch will remove those URL mappings. For the detail,
please reference:
http://lists.openstack.org/pipermail/openstack-dev/2017-March/114736.html
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: Ia41c096a579eb1a7c5b99bd6e9267ab4b7f81776
This patch adds '/os-keypairs' related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.
Also note that the original 'ProjectMapper' use the 'routes.Mapper.resource'
to create a set of routes for a resource which comform to the Atom
publishing protocol. It includes some of URL mappings we didn't document
before. This patch will remove those URL mappings. For the detail,
please reference:
http://lists.openstack.org/pipermail/openstack-dev/2017-March/114736.html
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I9b18e7acce37ba935f4302cc89c3aeccc4f50915
This patch adds flavors-access related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I284516a396e99a5a1c2113ad4ef3e4618628caa9
This patch adds flavors-extraspecs related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I7578ef265458365b44b366c4021d0566c39ea936
This patch adds flavor related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for API loading will be
removed from Nova.
flavor access and extraspecs router will be added in part2.
Also note that the original 'ProjectMapper' use the 'routes.Mapper.resource'
to create a set of routes for a resource which comform to the Atom
publishing protocol. It includes some of URL mappings we didn't document
before. This patch will remove those URL mappings. For the detail,
please reference:
http://lists.openstack.org/pipermail/openstack-dev/2017-March/114736.html
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I1c3db4e94ccc27925d800876dcf470614f563cd1
This patch add '/servers' related routes by a plain list, instead
of using stevedore. After all the Nova API endpoints moves to
the plain routes list, the usage of stevedore for loading the API
will be removed from Nova.
To remove the servers extension from stevedore, all the extensions
which depend on servers needs to be removed together. Those
extensions are about the servers API response extension and the action
extension.
Also note that the original 'ProjectMapper' use the 'routes.Mapper.resource'
to create a set of routes for a resource which comform to the Atom
publishing protocol. It includes some of URL mappings we didn't document
before. This patch will remove those URL mappings, also remove the
corresponding URL mappings for 'os-volumes_boot' endpoint. For the detail,
please reference:
http://lists.openstack.org/pipermail/openstack-dev/2017-March/114736.html
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I76c384c10bd804fc2049aef305044149bb55d0dc
This change drops the encryptor classes and supporting code from the
codebase in favor of the classes provided by os-brick. This is made
possible by the following os-brick change that introduced new encryption
provider constants during Ocata :
Ic155bd29d46059832cce970bf60375e7e472eca6
Thanks to the following bugfix also released as part of 1.11.0 for Ocata
the constants present in os-brick also support the use of the deprecated
legacy class paths from Nova, for example
nova.volume.encryptors.luks.LuksEncryptor, while using the os-brick
provided classes :
I3ec6e3fe919bc03d158da04a18fb8b651002ed52
Implements: blueprint switch-to-os-brick-encryptor-classes
Change-Id: I37ffc90c0bd57029fced251b5cfd7cd4318a0292
Depends-On: Iae12605dc7d0607e78020a24b5b8801606c2f169
The CONTENT_LENGTH environ can be present, but empty, which returns
None, and causes a ValueError when attempting to use .int().
This patch removes the setting of CONTENT_LENGTH to an integer, but
instead ensures that if CONTENT_LENGTH is not empty it is an integer, to
prevent a situation where a bogus "CONTENT_LENGTH" header is specified.
Additionally, as the CONTENT_TYPE environ can similarly be present but
empty, we should .get() it in a similar fashion to ensure it isn't
present but None when CONTENT_LENGTH is specified.
Change-Id: I66b6f9afbea8bf037997a59ba0b976f83c9825fb
Closes-Bug: #1681843
The os-pci API was never part of the v2.0 API and was added
to the v3 API, but when the v3 API turned into the v2.1 API
which is backward compatible with the v2.0 API, the os-pci
API was removed from v2.1. The original intent was to enable
it in a microversion but that never happened.
We should just delete this API since it has a number of issues
anyway:
1. It's not documented (which makes sense since it's not enabled).
2. The PciHypervisorController just takes the compute_nodes.pci_stats
dict and dumps it to json out of the REST API with no control over
the keys in the response. That means if we ever change the fields
in the PciDevicePool object, we implicitly introduce a backward
incompatible change in the REST API.
3. We don't want to be reporting host stats out of the API [1].
4. To make the os-hypervisors extension work in a multi-cell environment
we'd have to add uuids to the PciDevices model and change the API to
return and take in uuids to identify the devices for GET requests.
5. And last but not least, no one has asked for this in over two years.
As a result of removing this API we can also remove the join on the
pci_devices table when showing details about an instance or listing
instances, which were added years ago because of the PciServerController:
Id3c8a0b187e399ce2acecd4aaa37ac95e731d46c
Id3e60c3c56c2eb4209e8aca8a2c26881ca86b435
[1] https://docs.openstack.org/developer/nova/policies.html?#metrics-gathering
Closes-Bug: #1426241
Closes-Bug: #1673869
Change-Id: I9099744264eeec175672d10d04da69648dec1a9d
In db API when we process filters, we didn't
use deepcopy. In cases of "tags" and "not-tags"
we used pop to get the first tag, filtered out
results, and then joined with other tags for
later filtering. When we did pop(), the original
value was deleted, the key "tags"/"not-tags" remains.
In the cell scenario, both single cell(we will
query cell0 and the other cell) and multicell,
as we have to query all the cells in a loop and
the tags list in the filter will keep popping,
this will lead to either a HTTP 500 error(popping
from an empty list) or incorrect result(when
number of tags in the list is larger than cell
number, no HTTP 500 will show, but the filter
results for each cell will be different as
each loop will pop one tag).
closes-bug: #1682693
Change-Id: Ia2738dd0c7d1842b68c83d0a9e75e26b2f8d492a
Oslo.config deprecated parameter enforce_type and change its
default value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0.
Nova peridic py35 job failure due to the DeprecationWarning: "Using the
'enforce_type' argument is deprecated in version '4.0' and will be
removed in version '5.0': The argument enforce_type has changed its
default value to True and then will be removed completely."[1]
So need clean up usage of enforce_type.
Note this patch also change enforce_type from False to default value
True in test__get_node_console_with_reset_wait_timeout. We should test
as runtime, we can use float type to test when config option
serial_console_state_timeout is float.
[1] http://logs.openstack.org/periodic/periodic-nova-py35-with-oslo-master/6eeea0f/testr_results.html.gz
Related--Bug: #1517839
Change-Id: I94915a5c6abbbb739c597025272dc0e25d3ba2ec
The introduction of this option predates Gerrit [1]. It is
not used consistently, since it's not used for createBackup
or shelve APIs which also create snapshots. And it's not
discoverable.
We need to deprecate this option and anyone that cares to
disable snapshots needs to do it via policy.
[1] 9633e9877c
Change-Id: I321c04376d86ddb1bb3c8f1fa938a7b424e658d0
This patch adds support for a REST API for CRUD operations on traits.
GET /traits: Returns all resource classes.
PUT /traits/{name}: To insert a single custom trait.
GET /traits/{name}: To check if a trait name exists.
DELETE /traits/{name}: To delete the specified trait.
GET /resource_providers/{uuid}/traits: a list of traits associated
with a specific resource provider
PUT /resource_providers/{uuid}/traits: Set all the traits for a
specific resource provider
DELETE /resource_providers/{uuid}/traits: Remove any existing trait
associations for a specific resource provider
Partial implement blueprint resource-provider-traits
Change-Id: Ia027895cbb4f1c71fd9470d8f9281d2bebb6d8a2
As the comments in the code suggest, we can remove this
code now. There was a blocking database migration which
enforced that the online data migrations to generate
uuids for aggregates has been completed:
4d0915568a1011ddee7317ddfb237be0803e7790
So this code is safe to remove now. As a result, we
also remove the online data migration routine which
relies on the object code.
Change-Id: I2050b5bdf906d2d2f8a87c79ca0804e0fc955755
Initial change set introducing the PowerVM compute driver. This change
set supplies the basic ComputeDriver methods to allow the n-cpu process
to start successfully; and no-op spawn & delete methods.
Subsequent change sets will build up to the functional spawn & delete
support found in https://review.openstack.org/#/c/391288
Change-Id: Ic45bb064f4315ea9e63698a7c0e541c5b0de5051
Partially-Implements: blueprint powervm-nova-compute-driver