Bug 1430228 - [BackPort] Handle catalog backends that don't support all functions.
Summary: [BackPort] Handle catalog backends that don't support all functions.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone
Version: 9.0 (Mitaka)
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: async
: 9.0 (Mitaka)
Assignee: John Dennis
QA Contact: Prasanth Anbalagan
URL:
Whiteboard:
Depends On: 1427684
Blocks: 1444334
TreeView+ depends on / blocked
 
Reported: 2017-03-08 05:40 UTC by Masaki Furuta ( RH )
Modified: 2022-07-09 11:54 UTC (History)
7 users (show)

Fixed In Version: openstack-keystone-9.3.0-1.el7ost.src.rpm
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1444334 (view as bug list)
Environment:
Last Closed: 2017-06-14 15:41:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-1092 0 None None None 2022-07-09 11:54:00 UTC
Red Hat Product Errata RHSA-2017:1461 0 normal SHIPPED_LIVE Moderate: openstack-keystone security, bug fix, and enhancement update 2017-06-14 19:29:03 UTC

Description Masaki Furuta ( RH ) 2017-03-08 05:40:30 UTC
Description of problem:

  - When you delete a project in Keystone, the information on the DB disappears but the API returns an error response.
  - If executed on Horizon, the information disappears, but it seems to be an error.
  - Because of this bug, it is impossible to delete the stack of heat, delete environment of murano.
  - This is a known bug at https://bugs.launchpad.net/keystone/+bug/1579604 and it turned out to occur when managing region (endpoint) information with file.

Version-Release number of selected component (if applicable):

  Red Hat Openstack Platform 9

How reproducible:

  Always

Steps to Reproduce:

 (See Description of problem)

Actual results:

  Using the templated backend for catalogs deleting a project will currently work but it will return an error to the user that is raised in the delete notification code handling.

Expected results:

  Using the templated backend for catalogs deleting a project should work without error.

Additional info:


As for the fix, we already have following upstream fix.
  
  Newton:

  - Change Ie2ecb226: Handle catalog backends that don't support all functions. 
    https://review.openstack.org/#/c/336400/ (master)
    https://review.openstack.org/gitweb?p=openstack/keystone.git;a=commitdiff;h=8232f4f23c1c33a6e45073386f40e79139d9b980

  Mitaka:
  
  - Change Ie2ecb226: Handle catalog backends that don't support all functions. (cherry picked from commit 8232f4f23c1c33a6e45073386f40e79139d9b980)
    https://review.openstack.org/#/c/337913/ (mitaka)
    https://review.openstack.org/gitweb?p=openstack/keystone.git;a=commitdiff;h=ffe584da91d7bac2bf5651bb9efe4c0964661aa1


Upstream (mitaka) already have it.

  $ git branch -a
  * (HEAD detached at origin/stable/mitaka) <======================
    master
    remotes/origin/HEAD -> origin/master
    remotes/origin/master
    remotes/origin/stable/liberty
    remotes/origin/stable/mitaka
    remotes/origin/stable/newton
    remotes/origin/stable/ocata


  $ grep -r 'def load_sample_data(self, create_region_and_endpoints=True):'
  keystone/tests/unit/test_v3.py:    def load_sample_data(self, create_region_and_endpoints=True):
  
  $ git blame  keystone/tests/unit/test_v3.py |grep 'def load_sample_data(self, create_region_and_endpoints=True):'
  ffe584da keystone/tests/unit/test_v3.py (Sam Morrison               2016-07-01 17:25:26 +1000  309)     def load_sample_data(self, create_region_and_endpoints=True):

  $ git log -1 ffe584da
  commit ffe584da91d7bac2bf5651bb9efe4c0964661aa1
  Author: Sam Morrison <sorrison>
  Date:   Fri Jul 1 17:25:26 2016 +1000
  
      Handle catalog backends that don't support all functions.
      
      Using the templated backend for catalogs deleting a project
      will currently work but it will return an error to the user
      that is raised in the delete notification code handling.
      
      Change-Id: Ie2ecb226389a7ee74dc64b28b0e08817e6375801
      Closes-Bug: #1579604
      (cherry picked from commit 8232f4f23c1c33a6e45073386f40e79139d9b980)



 but OSP9 doesn't have fix (yet):


  $ git branch -a
  * (HEAD detached at origin/rhos-9.0-patches) <=======================
    remotes/origin/rh-essex-rhel-6-patches
    remotes/origin/rh-folsom-rhel-6-patches
    remotes/origin/rh-grizzly-rhel-6-nightly-patches
    remotes/origin/rh-grizzly-rhel-6-patches
    remotes/origin/rhos-10.0-patches
    remotes/origin/rhos-11.0-patches
    remotes/origin/rhos-4.0-rhel-6-nightly-patches
    remotes/origin/rhos-4.0-rhel-6-patches
    remotes/origin/rhos-5.0-patches
    remotes/origin/rhos-6.0-patches
    remotes/origin/rhos-7.0-patches
    remotes/origin/rhos-8.0-patches
    remotes/origin/rhos-9.0-patches

  - keystone/catalog/controllers.py
    
    399     def _on_project_or_endpoint_delete(self, service, resource_type, operation,↲
    400                                        payload):↲
    401         project_or_endpoint_id = payload['resource_info']↲
    402         if resource_type == 'project':↲
    403             self.catalog_api.delete_association_by_project(↲                                                                                                                                                                              
    404                 project_or_endpoint_id)↲
    405         else:↲
    
  - keystone/tests/unit/test_v3.py
    
     309     def load_sample_data(self):↲
     310         self._populate_default_domain()↲                                                                                                                                                                                                 
     311         self.domain = unit.new_domain_ref()↲
     312         self.domain_id = self.domain['id']↲
     313         self.resource_api.create_domain(self.domain_id, self.domain)↲
     314 ↲
     315         self.project = unit.new_project_ref(domain_id=self.domain_id)↲
     316         self.project_id = self.project['id']↲
     317         self.project = self.resource_api.create_project(self.project_id,↲
     318                                                         self.project)↲

Comment 2 Red Hat Bugzilla Rules Engine 2017-03-08 13:36:04 UTC
This bugzilla has been removed from the release and needs to be reviewed and Triaged for another Target Release.

Comment 6 Nathan Kinder 2017-03-28 20:45:08 UTC
This is fixed via the rebase to openstack-keystone-9.3.0, which is handled in bug #1427684.  Setting to MODIFIED so we add this to the errata we use for the rebase.

Comment 9 Prasanth Anbalagan 2017-06-12 17:48:54 UTC
Verified as follows,

********
VERSION
********
[heat-admin@controller-0 ~]$ yum list installed | grep openstack-keystone
openstack-keystone.noarch            1:9.3.0-2.el7ost    @rhos-9.0-signed       

*****
LOGS
*****
[heat-admin@controller-0 ~]$ keystone tenant-create --name deleteme
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |                                  |
|   enabled   |               True               |
|      id     | c54c877c2fe74b69869d07948c907158 |
|     name    |             deleteme             |
+-------------+----------------------------------+
[heat-admin@controller-0 ~]$ keystone tenant-delete c54c877c2fe74b69869d07948c907158
[heat-admin@controller-0 ~]$ 
[heat-admin@controller-0 ~]$ keystone tenant-get c54c877c2fe74b69869d07948c907158
No tenant with a name or ID of 'c54c877c2fe74b69869d07948c907158' exists.

Comment 11 errata-xmlrpc 2017-06-14 15:41:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1461


Note You need to log in before you can comment on or make changes to this bug.