← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1980845] [NEW] Impossible to remove deleted project from private flavor's access list

 

Public bug reported:

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

** Affects: nova
     Importance: Undecided
     Assignee: Alexey Stupnikov (astupnikov)
         Status: New


** Tags: api

-- 
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):
  New

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



Follow ups