Impossible to remove deleted project from private flavor's access list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Alexey Stupnikov |
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 | e9884959c0ad46f
| 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-
| OS-FLV-
| description | None |
| disk | 1 |
| extra_specs | {} |
| id | b1a3307c-
| name | test_testproj |
| os-flavor-
| 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:/
Fix proposed to branch: master /review. opendev. org/c/openstack /nova/+ /849131
Review: https:/