Defect: Assembly delete must remove the stacks created by each component

Bug #1314626 reported by Noorul Islam K M
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Solum
Fix Released
High
Devdatta Kulkarni

Bug Description

For each component there could be a heat stack associated with it. These stacks should be removed when an assembly gets destroyed.

Tags: defects
Changed in solum:
milestone: none → 2014.1.2
importance: Undecided → Critical
tags: added: feature
Changed in solum:
assignee: nobody → Devdatta (devdatta-kulkarni)
tags: removed: feature
Revision history for this message
Adrian Otto (aotto) wrote :

Good Catch Noorul. I am adjusting the priority from to Critical to High. This is definitely an important bug to fix.

Changed in solum:
importance: Critical → High
status: New → Triaged
summary: - Assembly delete must remove the stacks created by each component
+ Defect: Assembly delete must remove the stacks created by each component
tags: added: defects
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to solum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/91488

Changed in solum:
status: Triaged → In Progress
Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

After discussion with Noorul we have decided that the work being done in the patch below

https://review.openstack.org/91488

partially fixes this bug.

For reference see the comments here:

https://review.openstack.org/#/c/91488/6/solum/deployer/handlers/heat.py

When I upload new patch I will change the commit message to indicate it as such.

Revision history for this message
Adrian Otto (aotto) wrote :

I reproduced the symptom without a Heat failure.

vagrant@devstack:~$ solum assembly list
+--------------------------------------+------+-------------+--------+
| uuid | name | description | status |
+--------------------------------------+------+-------------+--------+
| 3b17a311-36b0-4891-933e-109fb1a4a248 | ex3 | None | ERROR |
| 67054f22-9090-4349-b12d-658502301344 | ex1 | None | READY |
| c03b2264-a80c-4070-bc5e-24996573c830 | ex2 | None | READY |
+--------------------------------------+------+-------------+--------+
vagrant@devstack:~$ solum assembly delete 3b17a311-36b0-4891-933e-109fb1a4a248
vagrant@devstack:~$ solum assembly delete 67054f22-9090-4349-b12d-658502301344
vagrant@devstack:~$ solum assembly delete c03b2264-a80c-4070-bc5e-24996573c830
vagrant@devstack:~$ heat stack-list
+--------------------------------------+------------+-----------------+----------------------+
| id | stack_name | stack_status | creation_time |
+--------------------------------------+------------+-----------------+----------------------+
| 9dcb24e5-3c79-417f-a924-860f947d1555 | ex1 | CREATE_COMPLETE | 2014-05-07T03:45:20Z |
| 7d2a07b2-5833-4e75-b0a9-af6700a84e33 | ex2 | CREATE_COMPLETE | 2014-05-07T03:47:31Z |
| 63c0af6b-e77e-43e2-8ced-0a21f39add1b | ex3 | CREATE_FAILED | 2014-05-07T03:49:50Z |
+--------------------------------------+------------+-----------------+----------------------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to solum (master)

Reviewed: https://review.openstack.org/91488
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=86100900715b38403070da8b3eefea6142536916
Submitter: Jenkins
Branch: master

commit 86100900715b38403070da8b3eefea6142536916
Author: Devdatta Kulkarni <email address hidden>
Date: Wed Apr 30 23:40:47 2014 +0000

    Deleting heat stack when deleting assembly

    - Setting assembly status to DELETING
    - Asynchronously calling heat stack delete
    - Destroying the assembly object only if heat
      stack successfully got deleted.
      If stack delete errors out, setting the
      assembly status to ERROR_HEAT_STACK_DELETE
    - Added sleep to functionaltests to allows for
      children assemblies to be deleted before
      delete_plan is called.

    Notes:
    1) If Heat stack-delete errors out, a stack with
       name = assembly_name will exist in the system
       (most likely in an indeterminate state). If
       Solum receives a subsequent call to create a
       new assembly with the same assembly name then
       Heat stack-creation most likely would error out
       because of the clashing stack name.

       One approach to solve this issue will be to append
       assembly_id to the assembly_name when creating a
       heat stack

       Created bug for this: #1316304

    2) Once we start storing stack_id in the component
       table we can avoid the call to heat to get
       the stack id.

    Change-Id: I353de389a88385c9660bcbec4fc20463d2f0c8ee
    Partial-bug: #1314626
    Co-Authored-By: Arati Mahimane (<email address hidden>)
     (Helped with testing functional test changes)

Adrian Otto (aotto)
Changed in solum:
status: In Progress → Fix Committed
Revision history for this message
Noorul Islam K M (noorul) wrote :

This is only partially fixed. So I think this should have status as "In Progress"

Revision history for this message
Adrian Otto (aotto) wrote :

Adjusted.

Changed in solum:
milestone: 2014.1.2 → juno-1
status: Fix Committed → In Progress
Adrian Otto (aotto)
Changed in solum:
milestone: juno-1 → juno-2
Revision history for this message
Melissa Kam (melissa-kam) wrote :

This issue is still occurring. When an assembly is deleted, its status is changed to DELETING, but is never actually deleted.

Adrian Otto (aotto)
Changed in solum:
status: In Progress → Fix Released
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.