HOT has no equivalent to DependsOn

Bug #1271008 reported by Steve Baker
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Thomas Spatzier

Bug Description

The HOT spec has no equivalent to DependsOn. I would suggest that we add a depends_on property, and enforce that it only take effect at the "resource-type" level.

Changed in heat:
status: New → Triaged
importance: Undecided → High
milestone: none → icehouse-3
Revision history for this message
Thomas Spatzier (thomas-spatzier) wrote :

Agree that this needs to be added to HOT. Can you clarify what you mean with 'take effect at the "resource-type" level'?

From a syntax perspective, it would look like the following right?

resources:
  resource1:
    type: some::type
    properties:
      prop1: foo
      # more props
    depends_on: [ resource2 ]

  resource2:
    type: ...

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

I think so yes, maybe we can be more strict and require that it is a list.

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

Right, I would make it a list. The snippet above would be a list with just one entry.

Revision history for this message
Zane Bitter (zaneb) wrote :

I think the 'enforce that it only take effect at the "resource-type" level' part was probably a reference to https://review.openstack.org/#/c/44733/

Changed in heat:
assignee: nobody → Thomas Spatzier (thomas-spatzier)
Changed in heat:
status: Triaged → In Progress
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/73580

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

Patch has been submitted but some tempest test cases will fail until [1] is fixed, i.e. [2] is merged.

[1] https://bugs.launchpad.net/tempest/+bug/1288114
[2] https://review.openstack.org/#/c/78136/

Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-3 → icehouse-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/73580
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=18bd01638849febfcaffa1da27591e52054c6a1d
Submitter: Jenkins
Branch: master

commit 18bd01638849febfcaffa1da27591e52054c6a1d
Author: Thomas Spatzier <email address hidden>
Date: Mon Jan 27 19:43:59 2014 +0100

    Fix HOT inconsistencies in resource sections

    This patch fixes inconsistencies between keywords in resource
    definitions in a HOT template as documented in the HOT specification
    and the way they are processed by the code.

    So far it was possible to use CFN like syntax or HOT syntax inside
    resource definitions (e.g. both 'properties' and 'Properties' were
    accepted) since the HOT processing code did tolerant processing.
    Consequently, users had been able to produce CFN/HOT mixed templates.

    This patch introduces strict enforcement of allowed keywords to
    make HOT templates consistent with the spec by providing concrete
    validation errors in case of invalid keywords.

    This patch also adds a DB migration step to update existing templates
    in the Heat database with potentially legacy keywords to comply with
    the new strict syntax checking rules.

    Change-Id: I44309acda86a930030cb70493f409e3ea4740130
    Closes-Bug: #1274288
    Closes-Bug: #1271008

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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