Ask Your Question
0

Heat stack delete fails but all the resources have been deleted

asked 2015-03-13 12:58:55 -0500

Jet gravatar image

I have a heat template that I've used to create stacks of resources and delete several times. However it looks like one time when it was deleting my horizon session expired and the delete failed. Now in Horizon or via the command line I'm not able to delete this stack. When I try I see the below error in the logs

2015-03-13 17:48:09.372 5920 INFO heat.engine.service [req-8f555b3f-31ad-460e-b964-ed03de3d714d None] Deleting stack jetspviptest1
2015-03-13 17:48:09.407 5920 INFO heat.engine.stack [-] Stack DELETE IN_PROGRESS (jetspviptest1): Stack DELETE started
2015-03-13 17:48:14.529 5920 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.200.2
2015-03-13 17:48:14.705 5920 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 192.168.200.2
2015-03-13 17:48:14.730 5920 ERROR heat.engine.stack [-] Could not find project: 27c1023fb7ad4b3bbe663c85e6594574 (HTTP 404)
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack Traceback (most recent call last):
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/heat/engine/stack.py", line 942, in delete
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack     project_id=self.stack_user_project_id)
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/heat/common/heat_keystoneclient.py", line 506, in delete_stack_domain_project
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack     project = self.domain_admin_client.projects.get(project=project_id)
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/keystoneclient/v3/projects.py", line 83, in get
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack     project_id=base.getid(project))
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/keystoneclient/base.py", line 71, in func
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack     return f(*args, **new_kwargs)
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/keystoneclient/base.py", line 333, in get
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack     self.key)
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/keystoneclient/base.py", line 135, in _get
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack     resp, body = self.client.get(url, **kwargs)
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/keystoneclient/httpclient.py", line 629, in get
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack     return self._cs_request(url, 'GET', **kwargs)
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/keystoneclient/httpclient.py", line 621, in _cs_request
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack     return self.request(url, method, **kwargs)
2015-03-13 17:48:14.730 5920 TRACE heat.engine.stack   File "/usr/lib/python2.6/site-packages/keystoneclient/httpclient.py", line 596, in request
2015-03-13 17:48:14.730 5920 TRACE heat ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-14 02:37:35 -0500

Qiming gravatar image

updated 2015-03-14 02:40:10 -0500

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)
edit flag offensive delete link more

Comments

Thanks I added those 2 lines and I'm now able to delete the stack.

Jet gravatar imageJet ( 2015-03-16 08:57:41 -0500 )edit

@Qiming,

Could you please let me know that bug number that is causing this?

remya gravatar imageremya ( 2015-05-18 06:56:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-03-13 12:58:55 -0500

Seen: 4,310 times

Last updated: Mar 14 '15