stacks still hung in IN_PROGRESS when error happen

Bug #1521881 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
huangtianhua
Kilo
Fix Released
Undecided
Unassigned

Bug Description

The change Ic948c2fe5baf23c9c4ced33060f672ca9c278a19 "Ensure that stacks can't get stuck IN_PROGRESS"(bug #1492433), when anything wrong happen, if the stack is in IN_PROGRESS, which wants to reset the stack to FAILED, but there are several errors of the "finally" code, such as:

finally:
            if stack.state == stack.IN_PROGRESS: -----should be : if stack.status == stack.IN_PROGRESS
                stack.set_state(stack.action, stack.FAILED, errmsg) ------should be: stack.state_set(stack.action, stack.FAILED, errmsg)
                assert errmsg is not None, "Returned while IN_PROGRESS"

let's fix them. And also I will backport to kilo and liberty.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
importance: Undecided → High
description: updated
description: updated
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/252243

Changed in heat:
status: New → In Progress
description: updated
description: updated
description: updated
Changed in heat:
assignee: huangtianhua (huangtianhua) → Zane Bitter (zaneb)
Changed in heat:
assignee: Zane Bitter (zaneb) → huangtianhua (huangtianhua)
Zane Bitter (zaneb)
tags: added: kilo-backport-potential liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit 63141b20bcb5fe0b7941a6d8578936e42c485242
Author: huangtianhua <email address hidden>
Date: Wed Dec 2 16:02:41 2015 +0800

    Correct reset_state_on_error() handling

    The change Ic948c2fe5baf23c9c4ced33060f672ca9c278a19 aim
    to prevent the stacks hanging in IN_PROGRESS, but the code
    is incorrect, this patch fix them.

    Change-Id: I0e9655b5a931452d810c38b7ddf6a2ce742bb7ed
    Closes-Bug: #1521881
    Related-Bug: #1492433

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

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/253388

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

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

Reviewed: https://review.openstack.org/253390
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=5f8c16887455b6228ca8eec4a600c06c696fb334
Submitter: Jenkins
Branch: stable/kilo

commit 5f8c16887455b6228ca8eec4a600c06c696fb334
Author: huangtianhua <email address hidden>
Date: Wed Dec 2 16:02:41 2015 +0800

    Correct reset_state_on_error() handling

    The change Ic948c2fe5baf23c9c4ced33060f672ca9c278a19 aim
    to prevent the stacks hanging in IN_PROGRESS, but the code
    is incorrect, this patch fix them.

    Closes-Bug: #1521881
    Related-Bug: #1492433
    (cherry picked from commit 63141b20bcb5fe0b7941a6d8578936e42c485242)

    Conflicts:
     heat/tests/test_stack.py
    Change-Id: I0e9655b5a931452d810c38b7ddf6a2ce742bb7ed

tags: added: in-stable-kilo
Changed in heat:
milestone: none → mitaka-2
Revision history for this message
Sergey Kraynev (skraynev) wrote :
Changed in heat:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/253388
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=1012e890117d2a0c0ecee1b4af4c996808acb2fd
Submitter: Jenkins
Branch: stable/liberty

commit 1012e890117d2a0c0ecee1b4af4c996808acb2fd
Author: huangtianhua <email address hidden>
Date: Wed Dec 2 16:02:41 2015 +0800

    Correct reset_state_on_error() handling

    The change Ic948c2fe5baf23c9c4ced33060f672ca9c278a19 aim
    to prevent the stacks hanging in IN_PROGRESS, but the code
    is incorrect, this patch fix them.

    Closes-Bug: #1521881
    Related-Bug: #1492433
    (cherry picked from commit 63141b20bcb5fe0b7941a6d8578936e42c485242)

    Conflicts:
     heat/tests/test_stack.py
    Change-Id: I0e9655b5a931452d810c38b7ddf6a2ce742bb7ed

tags: added: in-stable-liberty
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b2

This issue was fixed in the openstack/heat 6.0.0.0b2 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

This issue was fixed in the openstack/heat 6.0.0.0b2 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/heat 5.0.1

This issue was fixed in the openstack/heat 5.0.1 release.

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.