Stack can't be updated if creation fails on validation step

Bug #1459719 reported by Anastasia Kuznetsova
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Rico Lin
Kilo
Fix Released
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. I was trying to create stack, using this template https://github.com/openstack/heat-templates/blob/67301b6ff45b9f1c220ee0a0ab3aecd3a415032b/cfn/F17/AutoScalingCeilometer.yaml
2. I uploaded F17-x64_86-cfntools and started to create stack
3. Creation failed with:
Resource Create Failed: Stackvalidationfailed: Property Error : Lb Instance: Imageid Error Validating Value U'F20-X86 64-Cfntools': The Image (F20-X86 64-Cfntools) Could Not Be Found.
4. I uploaded new image: Fedora 20
5. Selected already created stack and change stack template (specify new default image)

Observed result:
Stack update failed with:
WebServerGroup Update Failed TypeError: 'NoneType' object has no attribute '__getitem__'
ElasticLoadBalancer Update Failed TypeError: 'NoneType' object has no attribute '__getitem__'

Here is a peace of heat-engine logs:
INFO heat.engine.resource [-] UPDATE: LoadBalancer "ElasticLoadBalancer" Stack "wordpress" [35d72fb8-ceec-4b0a-ab8a-7817adbfe9e1]
TRACE heat.engine.resource Traceback (most recent call last):
TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 439, in _action_recorder
TRACE heat.engine.resource yield
TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 694, in update
TRACE heat.engine.resource args=[after, tmpl_diff, prop_diff])
TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/scheduler.py", line 286, in wrapper
TRACE heat.engine.resource step = next(subtask)
TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 480, in action_handler_task
TRACE heat.engine.resource handler_data = handler(*args)
TRACE heat.engine.resource File "/usr/lib/python2.7/dist-packages/heat/engine/resources/loadbalancer.py", line 498, in handle_update
TRACE heat.engine.resource md = self.nested()['LB_instance'].metadata_get()
TRACE heat.engine.resource TypeError: 'NoneType' object has no attribute '__getitem__'

Rico Lin (rico-lin)
Changed in heat:
assignee: nobody → Rico Lin (rico-lin)
Changed in heat:
status: New → Triaged
importance: Undecided → Medium
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/190039

Changed in heat:
status: Triaged → In Progress
Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/226221

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

Reviewed: https://review.openstack.org/226221
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=382d038892be3df4ea984a000c18182e749abea5
Submitter: Jenkins
Branch: stable/kilo

commit 382d038892be3df4ea984a000c18182e749abea5
Author: Rico Lin <email address hidden>
Date: Wed Jun 10 14:14:54 2015 +0800

    Stack updated error if creation fails

    template https://github.com/openstack/heat-templates/blob/
    67301b6ff45b9f1c220ee0a0ab3aecd3a415032b/cfn/F17/
    AutoScalingCeilometer.yaml
    can have update error when execute on some resources
    which did not even created due to creation failed.

    Add check logic in _needs_update to make sure even resource still
    stay in init complete state can proceed update process by
    raise resource.UpdateReplace.

    For nested stack, StackResource should have the same status check
    logic in _needs_update method to avoid this error occur(nested()
    is None due to resource in failed state after create failed).

    Change-Id: I3fa6a61436e79409fe7f28cf66dfdfd9f609b576
    Closes-Bug: #1459719
    (cherry picked from commit 878473d92280a1c1823bb3318e4bf89d6df1f87f)

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-1 → 5.0.0
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.