Tech Debt: Store stack_id in component after stack create

Bug #1312856 reported by Adrian Otto
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Fix Released
Wishlist
Arati Mahimane

Bug Description

See: [1] https://review.openstack.org/89935

When we create a new heat stack, we create a component to represent it within the assembly. On git push, the trigger workflow gets called. It then then calls the deployer service which currently tries to redeploy the assembly by creating a new heat stack instead of updating the existing one. The review[1] above works around a "stack already exists" error by using the Heat API to look up the Heat stack, and if it exists, to update it.

We should not query Heat. Instead we should store the stack_id in the component resource that is part of the assembly being updated. We should do a select on assembly+components (joined on assembly_id) to determine if we know the stack id, and if we do, then update it. If there is no stack_id yet, then create one.

Tags: tech-debt
Changed in solum:
assignee: nobody → Arati Mahimane (arati-mahimane)
Adrian Otto (aotto)
tags: added: tech-debt
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to solum (master)

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

Changed in solum:
status: Triaged → In Progress
Adrian Otto (aotto)
Changed in solum:
milestone: 2014.1.2 → juno-1
Adrian Otto (aotto)
Changed in solum:
milestone: juno-1 → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to solum (master)

Reviewed: https://review.openstack.org/96928
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=6c9cfe93de3dce164eda9f68d95f6d88b1a3bdd4
Submitter: Jenkins
Branch: master

commit 6c9cfe93de3dce164eda9f68d95f6d88b1a3bdd4
Author: arati.mahimane <email address hidden>
Date: Fri May 30 15:13:23 2014 -0500

    Store heat_stack_id and component_type in component table

    Added two attributes to component - heat_stack_id and
    component_type.

    When we need to update a heat stack (while updating
    an assembly), the stack_id can be obtained from the
    component table rather than querying the Heat API.
    However, during assembly delete we still need to
    query the Heat API to ensure that the stack is
    actually deleted before deleting the assembly.

    Closes-Bug: #1312856

    Change-Id: I6ebf9b32d80d6c9f5f51e7f77d7c5ff344ef29ef

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