Deletion of stack containing server fails

Bug #1319499 reported by Paul Van Eck
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Critical
Sergey Kraynev
Icehouse
Fix Released
Critical
Steve Baker

Bug Description

If you try to create a stack containing a server, the deletion of the stack will fail due to an attribute error:

Stack Trace:

2014-05-14 10:33:42.246 ERROR heat.engine.resource [-] Delete Server "Server" [de9a27c0-eddf-44b3-87ff-7074f65ff48f] Stack "tempstack3" [ec50c901-ee37-4c78-8393-4ef035fc32bd]
2014-05-14 10:33:42.246 TRACE heat.engine.resource Traceback (most recent call last):
2014-05-14 10:33:42.246 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 671, in delete
2014-05-14 10:33:42.246 TRACE heat.engine.resource handle_data = self.handle_delete()
2014-05-14 10:33:42.246 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/server.py", line 951, in handle_delete
2014-05-14 10:33:42.246 TRACE heat.engine.resource delete(wait_time=0.2)
2014-05-14 10:33:42.246 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/scheduler.py", line 142, in __call__
2014-05-14 10:33:42.246 TRACE heat.engine.resource self.run_to_completion(wait_time=wait_time)
2014-05-14 10:33:42.246 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/scheduler.py", line 204, in run_to_completion
2014-05-14 10:33:42.246 TRACE heat.engine.resource while not self.step():
2014-05-14 10:33:42.246 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/scheduler.py", line 190, in step
2014-05-14 10:33:42.246 TRACE heat.engine.resource next(self._runner)
2014-05-14 10:33:42.246 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/nova_utils.py", line 306, in delete_server
2014-05-14 10:33:42.246 TRACE heat.engine.resource refresh_server(server)
2014-05-14 10:33:42.246 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/nova_utils.py", line 67, in refresh_server
2014-05-14 10:33:42.246 TRACE heat.engine.resource if exc.code in (500, 503):
2014-05-14 10:33:42.246 TRACE heat.engine.resource AttributeError: 'NotFound' object has no attribute 'code'

This issue is causing neutron-heat-slow jobs to fail, as some test classes cannot be successfully torn down in the tearDownClass.
The cause of this issue stems from a change in a variable name as seen in a recent python-novaclient patch: https://review.openstack.org/#/c/69837/
Here you can see that the attribute 'code' that heat expects was changed to 'http_status'.

Paul Van Eck (pvaneck-z)
Changed in heat:
assignee: nobody → Paul Van Eck (pvaneck-z)
Paul Van Eck (pvaneck-z)
Changed in heat:
assignee: Paul Van Eck (pvaneck-z) → nobody
Changed in heat:
assignee: nobody → Sergey Kraynev (skraynev)
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/93696

Changed in heat:
status: New → In Progress
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

Marking as critical, this is causing race gate failures

Changed in heat:
importance: Undecided → Critical
milestone: none → juno-1
Changed in heat:
assignee: Sergey Kraynev (skraynev) → Steve Baker (steve-stevebaker)
Changed in heat:
assignee: Steve Baker (steve-stevebaker) → Sergey Kraynev (skraynev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/93696
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=32f25e6fdddc66c59a16623e3d23dd09a5e79622
Submitter: Jenkins
Branch: master

commit 32f25e6fdddc66c59a16623e3d23dd09a5e79622
Author: Sergey Kraynev <email address hidden>
Date: Thu May 15 06:58:14 2014 -0400

    Using correct attribute of exception

    Currently patch (https://review.openstack.org/#/c/69837/6) was merged in
    python-novaclient. New exceptions have not attribute 'code' and now we
    should use http_status instead, falling back to the old attribute if
    the new attribute does not exist.

    Change-Id: I16e54c8e19dd93229fd7bcfe124fd4f2595f4e59
    Closes-bug: #1319499

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/95919

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

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

commit e63baf60642a08c6f552b570e850f0df3b21a75d
Author: Sergey Kraynev <email address hidden>
Date: Thu May 15 06:58:14 2014 -0400

    Using correct attribute of exception

    Currently patch (https://review.openstack.org/#/c/69837/6) was merged in
    python-novaclient. New exceptions have not attribute 'code' and now we
    should use http_status instead, falling back to the old attribute if
    the new attribute does not exist.

    Change-Id: I16e54c8e19dd93229fd7bcfe124fd4f2595f4e59
    Closes-bug: #1319499

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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