Can't delete after failed stack-update

Bug #1494260 reported by Steven Hardy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steven Hardy

Bug Description

1. Create a stack

$ cat start.yaml
heat_template_version: 2013-05-23
parameters:
  value:
    type: string
    default: "foo"
resources:
  test:
    type: OS::Heat::TestResource
    properties:
      value: foo
      fail: False

heat stack-create f1 -f start.yaml

| 6c46d037-0620-475d-9968-51f9d746a655 | f1 | CREATE_COMPLETE | 2015-09-10T10:53:11 |

2. Update the stack, adding a new parameter and a resouce which fails

$ cat fail.yaml
heat_template_version: 2013-05-23
parameters:
  value:
    type: string
    default: "foo"
  fail:
    type: boolean
    default: True
resources:
  test:
    type: OS::Heat::TestResource
    properties:
      value: foo
      fail: False
  fail_rsrc:
    type: OS::Heat::TestResource
    properties:
      fail: {get_param: fail}

heat stack-update f1 -f fail.yaml

| 6c46d037-0620-475d-9968-51f9d746a655 | f1 | UPDATE_FAILED | 2015-09-10T10:53:11 |

3. Try to delete the stack - fails due to error deleting the backup stack

heat stack-delete f1

| 6c46d037-0620-475d-9968-51f9d746a655 | f1 | DELETE_FAILED | 2015-09-10T10:53:11 |

2015-09-10 11:57:16.612 TRACE heat.engine.resource Traceback (most recent call last):
2015-09-10 11:57:16.612 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 600, in _action_recorder
2015-09-10 11:57:16.612 TRACE heat.engine.resource self.state_set(action, self.IN_PROGRESS)
2015-09-10 11:57:16.612 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 1197, in delete
2015-09-10 11:57:16.612 TRACE heat.engine.resource
2015-09-10 11:57:16.612 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/scheduler.py", line 320, in wrapper
2015-09-10 11:57:16.612 TRACE heat.engine.resource step = next(subtask)
2015-09-10 11:57:16.612 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 645, in action_handler_task
2015-09-10 11:57:16.612 TRACE heat.engine.resource if callable(check):
2015-09-10 11:57:16.612 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/openstack/heat/test_resource.py", line 180, in check_delete_complete
2015-09-10 11:57:16.612 TRACE heat.engine.resource return self._check_status_complete(*cookie)
2015-09-10 11:57:16.612 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/openstack/heat/test_resource.py", line 209, in _check_status_complete
2015-09-10 11:57:16.612 TRACE heat.engine.resource fail_prop = self.properties[self.FAIL]
2015-09-10 11:57:16.612 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/properties.py", line 457, in __getitem__
2015-09-10 11:57:16.612 TRACE heat.engine.resource return self._get_property_value(key)
2015-09-10 11:57:16.612 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/properties.py", line 448, in _get_property_value
2015-09-10 11:57:16.612 TRACE heat.engine.resource raise ValueError(six.text_type(e))
2015-09-10 11:57:16.612 TRACE heat.engine.resource ValueError: The Parameter (fail) was not provided.

Steven Hardy (shardy)
Changed in heat:
assignee: nobody → Steven Hardy (shardy)
milestone: none → liberty-rc1
Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit fc77e432978334687e143f0a8e8d69a14df2de1d
Author: Steven Hardy <email address hidden>
Date: Mon Sep 14 11:38:48 2015 +0100

    Work around parameter error deleting backup stack

    There is a problem where restoring a backup resource which references
    a parameter in it's properties that doesn't exist in the backup stack
    will fail to delete, if the property is referenced in the delete path
    of the resource.

    We can work around the problem by always returning the frozen_definition
    properties on delete, provided there are stored properties to refer to.

    Closes-Bug: #1494260
    Change-Id: I462ce7161497306483286b78416f9037ac80d6fa

Changed in heat:
status: In Progress → Fix Committed
Steven Hardy (shardy)
Changed in heat:
importance: Undecided → High
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-rc1 → 5.0.0
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.