Can not delete stack with nova server resource

Bug #1463716 reported by huangtianhua
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
huangtianhua
Kilo
Fix Released
Undecided
Unassigned

Bug Description

1. create a stack with resource_group, the template as:
**************************
heat_template_version: 2013-05-23
resources:
  my_resource_group:
    type: OS::Heat::ResourceGroup
    properties:
      resource_def:
        type: OS::Nova::Server
        properties:
          flavor: 1
          image: cirros-0.3.4-x86_64-uec
***************************
2. the stack create failed due to the nova server create failed, the reason is 'no valid hosts'
3. nova list, we can get the server status is 'ERROR'
4. I want to delete the stack, but can't, the reason is the server is in 'ERROR', and the reason is 'no valid hosts', so strange!
   ResourceInError: Went to status ERROR due to "Server OK-my_resource_group-gspgg2w5o4ig-0-n3pyczr5hbsi delete failed: (500) No valid host was found. There are not enough hosts available."
5. I guess the problem is 'race', the delete_complete checking may be faster. I found the reason may be due to the
Change-Id: I4034f48f75aad748ac313c385fa4f6b991cd4128 (* Do not pass rich objects on servers' delete)

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
Revision history for this message
huangtianhua (huangtianhua) wrote :

Also can't delete the stack just contains nova server resource if the server in 'ERROR'.

summary: - Can not delete stack
+ Can not delete stack with nova server resource
Revision history for this message
huangtianhua (huangtianhua) wrote :

I revert to the commit 101ba33853833b5704506b8e07227bf072fd2244, the problem happened still, so let's suppose that: heat
get the describe-server response before nova change the 'delete' state for server.

Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → High
milestone: none → liberty-1
status: New → Triaged
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/190558

Changed in heat:
status: Triaged → In Progress
tags: added: kilo-backport-potential
Changed in heat:
status: In Progress → Fix Committed
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/193428

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

Reviewed: https://review.openstack.org/193428
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=38b47eb30c024e2edb58e9ed5acfede457376e26
Submitter: Jenkins
Branch: stable/kilo

commit 38b47eb30c024e2edb58e9ed5acfede457376e26
Author: huangtianhua <email address hidden>
Date: Thu Jun 11 17:22:57 2015 +0800

    Continue to check if nova task is in progress

    Continue to check whether the nova server is deleted
    completed if nova task is in progress. There is an attribute
    'OS-EXT-STS: task_state' which showing task state in nova.

    Closes-Bug: #1463716
    (cherry picked from commit ab350ce095927037a1d0a8a552fa2b2dfac67d0a)

    Conflicts:
     heat/engine/clients/os/nova.py

    Change-Id: I64e5319bceeeaead064a7ee062906d707d0a333a

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
tags: removed: kilo-backport-potential
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.

Other bug subscribers

Remote bug watches

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