summaryrefslogtreecommitdiff
path: root/nova/api
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Revert "Debug Nova APIs call failures""Zuul2023-05-091-6/+0
|\
| * Revert "Debug Nova APIs call failures"Sylvain Bauza2023-05-021-6/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts commit afb0f774841d30dcae9c074d524e7fa9be840678. Reason for revert: We unfortunately leak the token in the logs which is considered a security flaw, even if only provided on DEBUG level. Change-Id: I52b52e65b689dadbdb08122c94652c491f850de6 Closes-Bug: #2012993
* | doc: mark the max microversion for 2023.1 AntelopeTakashi Natsume2023-02-191-3/+4
| | | | | | | | | | | | | | Just follows the pattern that we do every release. Signed-off-by: Takashi Natsume <takanattie@gmail.com> Change-Id: Iaba463eedf8ec24303a18d5ba63087cd26ca16d3
* | fup: support evacuate target stateSahid Orentino Ferdjaoui2023-02-061-2/+3
| | | | | | | | | | | | | | This fix minors comments that have been noticed. Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com> Change-Id: Iee6c224aa0f26d8550b38a8f69b28d8648b1da70
* | api: extend evacuate instance to support target stateSahid Orentino Ferdjaoui2023-01-314-3/+37
| | | | | | | | | | | | | | | | Start to v2.95 any evacuated instances will be stopped a destination Implements: bp/allowing-target-state-for-evacuate Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com> Change-Id: I141b6f057cc4eb9c541c2bc6eddae27270ede08d
* | Handle InstanceInvalidState exceptionRajesh Tailor2023-01-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | When instance task state is 'deleting' or 'migrating', then get_vnc_console throws 500 error, as InstanceInvalidState exception is not handled there. This change handles InstanceInvalidState in api layer in get_vnc_console call. Closes-Bug: #1968618 Change-Id: Ia738a0972b050f549f446c85171d3f33e60ada4f
* | Microversion 2.94: FQDN in hostnameArtom Lifshitz2023-01-174-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Extend microversion 2.90 to allow FQDNs in the hostname parameter. Multi-create with --hostname continues to be refused, returning error 400 to the user. This simplifies the code by not needing to handle any sort of suffix or prefix mangling of the FQDN to handle multiple instances. No other changes are made - not Neutron integration, metadata API changes (the FQDN will appear as-is in places where the hostname currently appears), etc. Change-Id: I47e397dc6da8263762479cc8ae4f8777a6d9d811 Implements: bp/fqdn-in-hostname
* | Merge "Remove deleted projects from flavor access list"Zuul2023-01-122-10/+21
|\ \
| * | Remove deleted projects from flavor access listAlexey Stupnikov2022-10-062-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Nova was unable to remove deleted projects from flavor's access lists. This patch lifts described limitation and improves logic of nova/api/openstack/identity.py library by introducing two separate kinds of exceptions: - webob.exc.HTTPInternalServerError is raised when Keystone identity service version 3.0 was not found. - webob.exc.HTTPBadRequest is raised when specified project is not found. Closes-bug: #1980845 Change-Id: Icbf3bdd944f9a6c38f25ddea0b521ca48ee87a7f
* | | Merge "[doc] Fix BFV Rescue trait name in microversion"Zuul2022-12-212-2/+2
|\ \ \
| * | | [doc] Fix BFV Rescue trait name in microversionDmitriy Rabotyagov2022-08-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct name used everywhere in code is COMPUTE_RESCUE_BFV. This should be fixed to not confuse users. Change-Id: I233113283f54c04118689724e18ad29a644dec05
* | | | Merge "Support multiple config file with mod_wsgi"Zuul2022-12-121-1/+4
|\ \ \ \
| * | | | Support multiple config file with mod_wsgiSean Mooney2022-12-071-1/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike uwsgi, apache mod_wsgi does not support passing commandline arguments to the python wsgi script it invokes. As a result while you can pass --config-file when hosting the api and metadata wsgi applications with uwsgi there is no way to use multiple config files with mod_wsgi. This change mirrors how this is supported in keystone today by intoducing a new OS_NOVA_CONFIG_FILES env var to allow operators to optional pass a ';' delimited list of config files to load. This change also add docs for this env var and the existing undocumented OS_NOVA_CONFIG_DIR. Closes-Bug: 1994056 Change-Id: I8e3ccd75cbb7f2e132b403cb38022787c2c0a37b
* | | | Adds check for VM snapshot fail while quiesceAmit Uniyal2022-11-291-0/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | Added check if quiesce fails because libvirt fails to connect with qemu guest agent inside instance Closes-Bug: #1980720 Change-Id: I134a4060ace2678f76ae3606bf117c07194a8d92
* | | doc: mark the max microversion for zedTakashi Natsume2022-09-031-2/+4
| | | | | | | | | | | | | | | | | | | | | Just follows the pattern that we do every release. Change-Id: I6ce6d536290d0126006413aa4b15ba89162d5761 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* | | Merge "libvirt: Add vIOMMU device to guest"Zuul2022-09-011-0/+16
|\ \ \
| * | | libvirt: Add vIOMMU device to guestStephen Finucane2022-09-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation for BP/libvirt-viommu-device. With provide `hw:viommu_model` property to extra_specs or `hw_viommu_model` to image property. will enable viommu to libvirt guest. [1] https://www.berrange.com/posts/2017/02/16/setting-up-a-nested-kvm-guest-for-developing-testing-pci-device-assignment-with-numa/ [2] https://review.opendev.org/c/openstack/nova-specs/+/840310 Implements: blueprint libvirt-viommu-device Change-Id: Ief9c550292788160433a28a7a1c36ba38a6bc849 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | | | Add API support for rebuilding BFV instancesDan Smith2022-08-315-2/+19
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a microversion and API support for triggering a rebuild of volume-backed instances by leveraging cinder functionality to do so. Implements: blueprint volume-backed-server-rebuild Closes-Bug: #1482040 Co-Authored-By: Rajat Dhasmana <rajatdhasmana@gmail.com> Change-Id: I211ad6b8aa7856eb94bfd40e4fdb7376a7f5c358
* | | Add locked_memory extra spec and image propertySean Mooney2022-08-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a new hw:locked_memory extra spec and hw_locked_memory image property to contol preventing guest memory from swapping. This change adds docs and extend the flavor validators for the new extra spec. Also add new image property. Blueprint: libvirt-viommu-device Change-Id: Id3779594f0078a5045031aded2ed68ee4301abbd
* | | Merge "Unify placement client singleton implementations"Zuul2022-08-191-5/+2
|\ \ \
| * | | Unify placement client singleton implementationsDan Smith2022-08-181-5/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have many places where we implement singleton behavior for the placement client. This unifies them into a single place and implementation. Not only does this DRY things up, but may cause us to initialize it fewer times and also allows for emitting a common set of error messages about expected failures for better troubleshooting. Change-Id: Iab8a791f64323f996e1d6e6d5a7e7a7c34eb4fb3 Related-Bug: #1846820
* | | Merge "compute: Update bdms with ephemeral encryption details when requested"Zuul2022-08-181-1/+28
|\ \ \ | |/ / |/| |
| * | compute: Update bdms with ephemeral encryption details when requestedLee Yarwood2022-08-021-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change starts the process of wiring up the new ephemeral encryption control mechanisims in the compute layer. This initial step being to ensure the BlockDeviceMapping objects are correctly updated with the required ephemeral encryption details when requested through the instance flavor extra specs or image metadata properties. Change-Id: Id49cb238f7bbf2b97f018ddbe090ebdc08d762dc
* | | Remove the PowerVM driverStephen Finucane2022-08-021-271/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The PowerVM driver was deprecated in November 2021 as part of change Icdef0a03c3c6f56b08ec9685c6958d6917bc88cb. As noted there, all indications suggest that this driver is no longer maintained and may be abandonware. It's been some time and there's still no activity here so it's time to abandon this for real. This isn't as tied into the codebase as the old XenAPI driver was, so removal is mostly a case of deleting large swathes of code. Lovely. Change-Id: Ibf4f36136f2c65adad64f75d665c00cf2de4b400 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | api: Drop generating a keypair and add special chars to namingSylvain Bauza2022-07-286-7/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As agreed in the spec, we will both drop the generation support for a keypair but we'll also accept @ (at) and . (dot) chars in the keyname, all of them in the same API microversion. Rebased the work from I5de15935e83823afa545a250cf84f6a7a37036b4 APIImpact Implements: blueprint keypair-generation-removal Co-Authored-By: Nicolas Parquet <nicolas.parquet@gandi.net> Change-Id: I6a7c71fb4385348c87067543d0454f302907395e
* | Allow unshelve to a specific host (REST API part)René Ribaud2022-07-224-17/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support to the REST API, in a new microversion, for specifying a destination host to unshelve server action when the server is shelved offloaded. This patch also supports the ability to unpin the availability_zone of an instance that is bound to it. Note that the functional test changes are due to those tests using the "latest" microversion 2.91. Implements: blueprint unshelve-to-host Change-Id: I9e95428c208582741e6cd99bd3260d6742fcc6b7
* | Allow unshelve to a specific host (Compute API part)René Ribaud2022-07-221-3/+4
| | | | | | | | | | | | | | | | | | | | This patch introduce changes to the compute API that will allow PROJECT_ADMIN to unshelve an shelved offloaded server to a specific host. This patch also supports the ability to unpin the availability_zone of an instance that is bound to it. Implements: blueprint unshelve-to-host Change-Id: Ieb4766fdd88c469574fad823e05fe401537cdc30
* | Merge "Debug Nova APIs call failures"Zuul2022-05-081-0/+6
|\ \ | |/
| * Debug Nova APIs call failuresFederico Ressi2022-02-041-0/+6
| | | | | | | | | | | | | | This should help finding out cause of failures happening when performing API requests by reading the log file Change-Id: I02e531c2aaaccae99da9a21ee9268f6fdd0efb3e
* | Fix wrong attribute to find remote addressTakashi Kajinami2022-04-041-1/+1
| | | | | | | | | | | | | | | | | | The webob.Request class does not have the remote_address attribute but the remote_addr attribute. This change fixes usage of the non-existing attribute accordingly. Closes-Bug: #1967683 Change-Id: I874e97ac6ad84daa20997345082cb4d1135699c4
* | objects: Remove 'NovaObjectDictCompat' from 'Migration'Stephen Finucane2022-03-231-1/+1
| | | | | | | | | | | | | | Addresses a long-standing TODO. Change-Id: I57a1c4ca2ab23ca991344e73fb4ab5fbb2922723 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Merge "doc: mark the max microversion for yoga"Zuul2022-02-281-2/+2
|\ \
| * | doc: mark the max microversion for yogaTakashi Natsume2022-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | Just follows the pattern that we do every release. Change-Id: Ia6ea455e50307c515cbade467d32799baaec2d85 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
* | | Merge "Update quota sets APIs"Zuul2022-02-261-6/+17
|\ \ \
| * | | Update quota sets APIsJohn Garbutt2022-02-241-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure the limit related APIs reflect the new reality of enforcing the API and DB limits based on keystone only. For now we skip all updates to the DB, as none mean anything to the new code, as we only look at keystone now. Note: this will need to be updated again once we add limits for cores, ram, instances, etc. blueprint unified-limits-nova Change-Id: I5ef968395b4bdc6f190e239a19a723316b1d5baf
* | | | Merge "Separate flavor extra specs policy for server APIs"Zuul2022-02-261-4/+6
|\ \ \ \
| * | | | Separate flavor extra specs policy for server APIsGhanshyam Mann2022-02-241-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flavor extra specs index policy is used to show flavor extra specs in flavor as well as server APIs response. As per RBAC new guidelines, we are restricting project level respurces APIs to project scoped only. To do that, we are separating the flavor extra specs index policy for server APIs and make them only for project scoped. Partial implement blueprint policy-defaults-refresh-2 Change-Id: I9cfb61dabe6f98cb057aad9702f9d355c415fda6
* | | | | Merge "Update quota_class APIs for db and api limits"Zuul2022-02-261-5/+15
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | Update quota_class APIs for db and api limitsJohn Garbutt2022-02-241-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a unified limits specific version of get_class_quotas as used by the quota_class API. This simply returns the limits defined in keystone that are now enforced when you enable unified limits. Note: this will need to be updated again once we add limits to things that use things like resource_class, etc. blueprint unified-limits-nova Change-Id: If9901662d30d15da13303a3da051e1b9fded72c0
* | | | | Merge "Enforce api and db limits"Zuul2022-02-261-0/+15
|\ \ \ \ \ | |/ / / / | | | / / | |_|/ / |/| | |
| * | | Enforce api and db limitsJohn Garbutt2022-02-241-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using unified limits, we add enforcement of those limits on all related API calls. Note: we do not yet correctly report the configured limits to users via the quota APIs, that is in a future patch. Note the unified limits calls are made alongside the existing legacy quota calls. The old quota calls will be handed by the quota engine driver, that is basically a no-op. This is to make it easier to remove the legacy code paths in the future. Note, over quota exceptions raised with unified limits use the standard (improved) exception message as those raised by oslo.limit. They however do use the existing exception code to ease integration. The user of the API will see the same return codes, no matter which code is enabled to enforce the limits. Finally, this also adds test coverage where it was missing. Coverage for "quota recheck" behavior in KeypairAPI is added where all other KeypairAPI testing is located. Duplicate coverage is removed from nova/api/openstack/compute/test_keypairs.py at the same time. blueprint unified-limits-nova Change-Id: I36e82a17579158063396d7e55b495ccff4959ceb
* | | | Merge "Modify remaining APIs as per RBAC new guidelines"Zuul2022-02-265-4/+18
|\ \ \ \ | | |/ / | |/| |
| * | | Modify remaining APIs as per RBAC new guidelinesGhanshyam Mann2022-02-245-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the RBAC new direction, we will allow project resources operation to be performed by the project scoped token only and system user will be allowed to perform system level operation only not project resources specific. Details about new direction can be found in community-wide goal - https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html This commit modify remaining APIs as per the new guidelines. Also, allow all project admin to list the other project limits. This is what we allowed in legacy policy and until we have domain admin or other way to list other project resources/info, we will keep that behaviour. Also modifying and adding tests for four cases: 1. enforce_scope=False + legacy rule (current default policies) 2. enforce_scope=False + No legacy rule 3. enforce_scope=True + legacy rule 4. enforce_scope=True + no legacy rule (end goal of new RBAC) Partial implement blueprint policy-defaults-refresh-2 Change-Id: I006d47aa2f4678a06c78057bcf407302abbe4907
* | | | Merge "Server actions APIs scoped to project scope"Zuul2022-02-261-2/+4
|\ \ \ \ | |/ / /
| * | | Server actions APIs scoped to project scopeGhanshyam Mann2022-02-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the RBAC new direction, we will allow project resources operation to be performed by the project scoped token only and system user will be allowed to perform system level operation only not project resources specific. Details about new direction can be found in community-wide goal - https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html This commit modify the server action APIs to be scoped to project scope. Fix the shelve-offload policy to pass the instance project id as target. Also modifying and adding tests for four cases: 1. enforce_scope=False + legacy rule (current default policies) 2. enforce_scope=False + No legacy rule 3. enforce_scope=True + legacy rule 4. enforce_scope=True + no legacy rule (end goal of new RBAC) Partial implement blueprint policy-defaults-refresh-2 Change-Id: I5293e9aa9cb3b48f97a5a2cf272939ada1aea2db
* | | | Merge "Move keypair quota error message into exception"Zuul2022-02-251-4/+2
|\ \ \ \ | | |/ / | |/| |
| * | | Move keypair quota error message into exceptionDan Smith2022-02-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The KeypairLimitExceeded exception has a message string which is never used. We raise this exception and then return a different message to the API user. For the unified limit work, we want to move to using oslo.limit's better error messages when available, which means we need to honor the message in the exception. This just moves the legacy string into the exception and makes the API use that instead of overriding it. Related to bp/unified-limits-nova Change-Id: I217b3d0551291498191b556f62d78abf159778c2
* | | | Merge "Make more project level APIs scoped to project only"Zuul2022-02-253-2/+8
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | Make more project level APIs scoped to project onlyGhanshyam Mann2022-02-193-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the RBAC new direction, we will allow project resources operation to be performed by the project scoped token only and system user will be allowed to perform system level operation only not project resources specific. Details about new direction can be found in community-wide goal - https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html This commit modify more projects level APIs to be scoped to project only. Also modifying and adding tests for four cases: 1. enforce_scope=False + legacy rule (current default policies) 2. enforce_scope=False + No legacy rule 3. enforce_scope=True + legacy rule 4. enforce_scope=True + no legacy rule (end goal of new RBAC) Partial implement blueprint policy-defaults-refresh-2 Change-Id: I6731aa6edd0c6bed5edb9eaaaa98b5e43aaeeb74
* | | Merge "Move 'hw:pmu', 'hw_pmu' parsing to nova.virt.hardware"Zuul2022-02-151-1/+0
|\ \ \