Reviewed: https://review.opendev.org/c/openstack/nova/+/849131 Committed: https://opendev.org/openstack/nova/commit/8c6daaacbedc33e738ce85aec0ead5f6947d60bf Submitter: "Zuul (22348)" Branch: master
commit 8c6daaacbedc33e738ce85aec0ead5f6947d60bf Author: Alexey Stupnikov <aleksey.stupni...@gmail.com> Date: Fri Jul 8 17:56:38 2022 +0200 Remove deleted projects from flavor access list 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 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1980845 Title: Impossible to remove deleted project from private flavor's access list Status in OpenStack Compute (nova): Fix Released Bug description: Private flavors have a list of projects which can use them. This list of projects is maintained in flavor_projects table and this list is not updated automatically when some project is removed by Keystone. As a result, OpenStack users may face situations when project associated with private flavor no longer exists and it is impossible to remove it. Steps to reproduce: (overcloud) [stack@undercloud-0 ~]$ openstack project create testproject +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | | | domain_id | default | | enabled | True | | id | e9884959c0ad46f5a9b1dfe9654aa577 | | is_domain | False | | name | testproject | | options | {} | | parent_id | default | | tags | [] | +-------------+----------------------------------+ (overcloud) [stack@undercloud-0 ~]$ openstack flavor create --private --project testproject --ram 64 --disk 1 test_testproj +----------------------------+--------------------------------------+ | Field | Value | +----------------------------+--------------------------------------+ | OS-FLV-DISABLED:disabled | False | | OS-FLV-EXT-DATA:ephemeral | 0 | | description | None | | disk | 1 | | extra_specs | {} | | id | b1a3307c-03d2-4da8-bfa9-d138025d5203 | | name | test_testproj | | os-flavor-access:is_public | False | | properties | | | ram | 64 | | rxtx_factor | 1.0 | | swap | 0 | | vcpus | 1 | +----------------------------+--------------------------------------+ (overcloud) [stack@undercloud-0 ~]$ openstack project delete testproject (overcloud) [stack@undercloud-0 ~]$ openstack flavor unset --project testproject test_testproj Failed to remove flavor access from project: No project with a name or ID of 'testproject' exists. Command Failed: One or more of the operations failed Code: https://github.com/openstack/nova/blob/master/nova/api/openstack/identity.py To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1980845/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp