Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is known bug that has been fixed:

Author: Ethan Lynn xjunlin@cn.ibm.com Date: Tue Feb 3 14:15:40 2015 +0800

Catch notfound exception when deleting project

When heat trying to delete a non-exist project, will catch a
notfound error, original code place the catcher in the wrong
place, this patch fixes it.

Change-Id: I68269838d1cef311c3f41f5846deae4ed94aef4c
Closes-Bug: #1410698

diff --git a/heat/common/heat_keystoneclient.py b/heat/common/heat_keystoneclient.py index 3db9652..3c009ff 100644 --- a/heat/common/heat_keystoneclient.py +++ b/heat/common/heat_keystoneclient.py @@ -475,6 +475,8 @@ class KeystoneClientV3(object): # to get the project, so again we should do nothing try: project = self.domain_admin_client.projects.get(project=project_id) + except kc_exception.NotFound: + return except kc_exception.Forbidden: LOG.warning(_LW('Unable to get details for project %s, ' 'not deleting') % project_id)

This is known bug that has been fixed:

Author: Ethan Lynn xjunlin@cn.ibm.com <xjunlin@cn.ibm.com>
Date:   Tue Feb 3 14:15:40 2015 +0800

+0800

    Catch notfound exception when deleting project

 When heat trying to delete a non-exist project, will catch a
 notfound error, original code place the catcher in the wrong
 place, this patch fixes it.

 Change-Id: I68269838d1cef311c3f41f5846deae4ed94aef4c
 Closes-Bug: #1410698

diff --git a/heat/common/heat_keystoneclient.py b/heat/common/heat_keystoneclient.py index 3db9652..3c009ff 100644 --- a/heat/common/heat_keystoneclient.py +++ b/heat/common/heat_keystoneclient.py @@ -475,6 +475,8 @@ class KeystoneClientV3(object): # to get the project, so again we should do nothing try: project = self.domain_admin_client.projects.get(project=project_id) + except kc_exception.NotFound: + return except kc_exception.Forbidden: LOG.warning(_LW('Unable to get details for project %s, ' 'not deleting') % project_id)

project_id)