heat-manage reset_stack_status XXX doesn't work

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

Bug Description

Now we support the cmd to reset stack status to XXX_FAILED for some cases, but we can't delete the stack in following steps:

convergence is true
1. create a stack with some resources
2. the db service down due to some reason
3. one minute later, we restart the db service
4. stack-list, we can find the stack is in CREATE_IN_PROGRESS
5. try to delete the stack, but stack is always in DELETE_IN_PROGRESS
6. so execute the cmd: heat-manage reset_stack_status stack_id , then the stack is in DELETE_FAILED
7. try to delete the stack again, then the stack turn to DELETE_IN_PROGRESS again, and the status always in IN_PROGRESS

We can find that there is an error log: Error acquiring lock for resource id:1505 with atomic_key:1, engine_id:41c4815d-ca47-4790-b99b-7a5f9e677fdc/41c4815d-ca47-4790-b99b-7a5f9e677fdc

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
importance: Undecided → Medium
description: updated
Revision history for this message
Thomas Herve (therve) wrote :

You should have the following message beforehand: "It is advised to shutdown all Heat engines beforehand." If you do so, I don't think you'll get the error message.

Changed in heat:
status: New → Won't Fix
Revision history for this message
huangtianhua (huangtianhua) wrote :

@Thomas, sometimes user don't want to restart the engine service, so and hope to reset the stack to FAILED, then can operate it again. I registered a but before: https://bugs.launchpad.net/heat/+bug/1493655, and wanted to reset the stack but the idea was not accepted, but your change merged :)

The problem of this bug is that we don't release resource lock when executing the cmd 'reset_stack_status'.
We can fix it out.

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

Changed in heat:
status: Won't Fix → In Progress
Changed in heat:
milestone: none → newton-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit 4bd9b81fbbaaf3bd3e0294a2143cb4e61b34ece8
Author: huangtianhua <email address hidden>
Date: Mon Sep 12 18:19:59 2016 +0800

    Release resource lock when executing reset_stack_status

    The heat cmd "heat-manage reset_stack_status {stack_id}" does
    not work, because we don't release resource lock, so this change
    to release lock to make sure it works.

    Change-Id: Ic42ad40e279c4e40da95d9aee35125767e747124
    Closes-Bug: #1622533

Changed in heat:
status: In Progress → Fix Released
Thomas Herve (therve)
Changed in heat:
milestone: newton-rc1 → ocata-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/396558

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 8.0.0.0b1

This issue was fixed in the openstack/heat 8.0.0.0b1 development milestone.

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

Reviewed: https://review.openstack.org/396558
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=f0549e7348efa36b0b287c58505b896fc2ce3bab
Submitter: Jenkins
Branch: stable/newton

commit f0549e7348efa36b0b287c58505b896fc2ce3bab
Author: huangtianhua <email address hidden>
Date: Mon Sep 12 18:19:59 2016 +0800

    Release resource lock when executing reset_stack_status

    The heat cmd "heat-manage reset_stack_status {stack_id}" does
    not work, because we don't release resource lock, so this change
    to release lock to make sure it works.

    Change-Id: Ic42ad40e279c4e40da95d9aee35125767e747124
    Closes-Bug: #1622533
    (cherry picked from commit 4bd9b81fbbaaf3bd3e0294a2143cb4e61b34ece8)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 7.0.2

This issue was fixed in the openstack/heat 7.0.2 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.