Trust delete 404 causes DELETE_FAILED

Bug #1266434 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Steven Hardy

Bug Description

When using deferred_auth_method=trusts, we treat an already deleted trust returning 404 on delete_trust as an error, when we should catch the NotFound exception and pass instead:

2014-01-06 11:01:38.314 30745 ERROR heat.engine.parser [-] 61154d5e7a784ad49cabd131a90b793e (HTTP 404)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser Traceback (most recent call last):
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/home/shardy/git/heat/heat/engine/parser.py", line 583, in delete
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser self.clients.keystone().delete_trust(trust_id)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/home/shardy/git/heat/heat/common/heat_keystoneclient.py", line 233, in delete_trust
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser self.client_v3.trusts.delete(trust_id)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/keystoneclient/v3/contrib/trusts.py", line 86, in delete
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser return super(TrustManager, self).delete(trust_id=base.getid(trust))
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 70, in func
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser return f(*args, **kwargs)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 360, in delete
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser self.build_url(dict_args_in_out=kwargs))
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 201, in _delete
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser return self.client.delete(url)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 614, in delete
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser return self._cs_request(url, 'DELETE', **kwargs)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 595, in _cs_request
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser **kwargs)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 560, in request
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser resp = self.session.request(url, method, **kwargs)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 181, in request
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser raise exceptions.from_response(resp, method, url)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser NotFound: 61154d5e7a784ad49cabd131a90b793e (HTTP 404)
2014-01-06 11:01:38.314 30745 TRACE heat.engine.parser

Steven Hardy (shardy)
Changed in heat:
assignee: nobody → Steven Hardy (shardy)
milestone: none → icehouse-2
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Steven Hardy (shardy)
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/65064
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=36ba80820ba7b2693c996283ac1418fefd357b50
Submitter: Jenkins
Branch: master

commit 36ba80820ba7b2693c996283ac1418fefd357b50
Author: Steven Hardy <email address hidden>
Date: Mon Jan 6 11:31:15 2014 +0000

    Tolerate deleted trust on stack delete

    Currently if a trust has already been deleted, the stack delete
    fails and the stack becomes undeletable, so instead catch the
    NotFound exception on trust delete, as there's nothing to do.

    Change-Id: I1346cefdf6c5f2dea2bc9e2fdd4b9e7b14d60c31
    Closes-Bug: #1266434

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-2 → 2014.1
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.