Error deleting deleted stack project

Bug #1308812 reported by Steve Baker
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steve Baker
Icehouse
Fix Released
High
Steve Baker

Bug Description

If heat-engine is terminated mid-delete, a stack could become undeletable because of NotFound exceptions being raised on keystone delete stack domain operations.

Attempting to delete the project in delete_stack_domain_project should tolerate 404s

2014-04-17 13:44:39.654 ERROR heat.engine.parser [-] Could not find project, e2f4b78a560a4a3d9ee6df7e313ad160. (HTTP 404)
2014-04-17 13:44:39.654 TRACE heat.engine.parser Traceback (most recent call last):
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/heat/heat/engine/parser.py", line 682, in delete
2014-04-17 13:44:39.654 TRACE heat.engine.parser project_id=self.stack_user_project_id)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/heat/heat/common/heat_keystoneclient.py", line 395, in delete_stack_domain_project
2014-04-17 13:44:39.654 TRACE heat.engine.parser self.domain_admin_client.projects.delete(project=project_id)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/v3/projects.py", line 98, in delete
2014-04-17 13:44:39.654 TRACE heat.engine.parser project_id=base.getid(project))
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/base.py", line 66, in func
2014-04-17 13:44:39.654 TRACE heat.engine.parser return f(*args, **new_kwargs)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/base.py", line 360, in delete
2014-04-17 13:44:39.654 TRACE heat.engine.parser self.build_url(dict_args_in_out=kwargs))
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/base.py", line 197, in _delete
2014-04-17 13:44:39.654 TRACE heat.engine.parser return self.client.delete(url)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/httpclient.py", line 605, in delete
2014-04-17 13:44:39.654 TRACE heat.engine.parser return self._cs_request(url, 'DELETE', **kwargs)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/httpclient.py", line 582, in _cs_request
2014-04-17 13:44:39.654 TRACE heat.engine.parser return self.request(url, method, **kwargs)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/httpclient.py", line 564, in request
2014-04-17 13:44:39.654 TRACE heat.engine.parser resp = super(HTTPClient, self).request(url, method, **kwargs)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/baseclient.py", line 21, in request
2014-04-17 13:44:39.654 TRACE heat.engine.parser return self.session.request(url, method, **kwargs)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/utils.py", line 318, in inner
2014-04-17 13:44:39.654 TRACE heat.engine.parser return func(*args, **kwargs)
2014-04-17 13:44:39.654 TRACE heat.engine.parser File "/home/steveb/dev/localstack/python-keystoneclient/keystoneclient/session.py", line 251, in request
2014-04-17 13:44:39.654 TRACE heat.engine.parser raise exceptions.from_response(resp, method, url)
2014-04-17 13:44:39.654 TRACE heat.engine.parser NotFound: Could not find project, e2f4b78a560a4a3d9ee6df7e313ad160. (HTTP 404)
2014-04-17 13:44:39.654 TRACE heat.engine.parser

Changed in heat:
status: New → Triaged
importance: Undecided → High
milestone: none → juno-1
Changed in heat:
assignee: nobody → Steve Baker (steve-stevebaker)
description: updated
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/88490

Changed in heat:
status: Triaged → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/88490
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=7752f649248bb1d31ad5629a9b66f2884004d192
Submitter: Jenkins
Branch: master

commit 7752f649248bb1d31ad5629a9b66f2884004d192
Author: Steve Baker <email address hidden>
Date: Fri Apr 18 15:52:40 2014 +1200

    Catch NotFound for keystone delete operations

    If heat-engine is terminated mid-delete, a stack could become
    undeletable because of NotFound exceptions being raised on keystone
    delete stack domain operations.

    This change wraps all keystone delete calls and ignores any NotFound
    exceptions raised.

    Change-Id: I032b04b1391590a6f9493b65bddff331b07722f0
    Closes-Bug: #1308812

Changed in heat:
status: In Progress → Fix Committed
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/95921

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/icehouse)

Reviewed: https://review.openstack.org/95921
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=3c560c6bacc4b25b9303aed23ddd6205c6ee7e4c
Submitter: Jenkins
Branch: stable/icehouse

commit 3c560c6bacc4b25b9303aed23ddd6205c6ee7e4c
Author: Steve Baker <email address hidden>
Date: Fri Apr 18 15:52:40 2014 +1200

    Catch NotFound for keystone delete operations

    If heat-engine is terminated mid-delete, a stack could become
    undeletable because of NotFound exceptions being raised on keystone
    delete stack domain operations.

    This change wraps all keystone delete calls and ignores any NotFound
    exceptions raised.

    Change-Id: I032b04b1391590a6f9493b65bddff331b07722f0
    Closes-Bug: #1308812

tags: added: in-stable-icehouse
Alan Pevec (apevec)
tags: removed: icehouse-backport-potential in-stable-icehouse
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.