SoftwareDeployment does not invoke all actions defined in SoftwareComponent

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

Bug Description

A SoftwareComponent may define a list of configs to applied to a server for different lifecycle events. According to the design of SoftwareComponent, those configs define that actions to which they apply and this overrides the 'actions' property of the associated SoftwareDeployment resource.
When a SoftwareDeployment is associated to a SoftwareComponent, it should always invoke the in-instance hook and let the in-instance hook decide whether to do something or not. Currently, however, the special handling for SoftwareComponent seems to be missing in places in the SoftwareDeployment resource.

See also this review for reference:
https://review.openstack.org/#/c/151615

Revision history for this message
Thomas Spatzier (thomas-spatzier) wrote :

I can look into this but will probably not have the chance to look into it this week (traveling). If anyone wants to grab it, feel free. Otherwise, I will provide a fix next week.

Changed in heat:
importance: Undecided → Medium
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

So the current workaround is that the deployment resource must explicitly specify the lificycle actions that the component requires?

Revision history for this message
Thomas Spatzier (thomas-spatzier) wrote :

Right, that's what Qiming found out during some debugging. That workaround is there, but it's really poor user experience.

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

Changed in heat:
assignee: nobody → Thomas Spatzier (thomas-spatzier)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/153604
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=0f58b65e19b2dc1546239da24cc7fde927f2a727
Submitter: Jenkins
Branch: master

commit 0f58b65e19b2dc1546239da24cc7fde927f2a727
Author: Thomas Spatzier <email address hidden>
Date: Fri Feb 6 16:33:29 2015 +0100

    Always check for 'component' in SoftwareDeployment

    When SoftwareDeployment is associated to a SoftwareComponent, config
    hooks in the instance should always be trigger and the in-instance
    logic will decide whether or not anything has to be done.

    The check whether the SoftwareDeployment resource is associated to a
    SoftwareComponent resource is implemented in _handle_action which is
    called by all handle_ methods.
    For handle_delete, however, the 'actions' property of
    SoftwareDeployment was evaluated first and only if it contained
    DELETE the _handle_action method was invoked.
    This patch make handle_delete also directly call _handle_action to
    check for presence of a SoftwareComponent like all other lifecycle
    hooks do.

    Change-Id: Ibb813db23fa7c9ab20435887f6cc49deaaf51de2
    Closes-Bug: #1416994

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-3 → 2015.1.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.