SoftwareDeployments validation error

Bug #1404399 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steven Hardy
Juno
Fix Released
Undecided
Unassigned

Bug Description

Appears to be a regression caused by https://review.openstack.org/#/c/141444/ - the fix is to use self._resource_names instead of referencing the count property directly (as SoftwareDeployments already overrides this and it's directly related to the count we create).

^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00m File "/opt/stack/heat/heat/engine/stack.py", line 477, in validate
^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00m result = res.validate()
^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00m File "/opt/stack/heat/heat/engine/resources/resource_group.py", line 198, in validate
^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00m if self.properties[self.COUNT]:
^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00m File "/opt/stack/heat/heat/engine/properties.py", line 410, in __getitem__
^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00m return self._get_property_value(key)
^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00m File "/opt/stack/heat/heat/engine/properties.py", line 384, in _get_property_value
^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00m {'prefix': self.error_prefix, 'key': key})
^[[01;31m2014-12-19 20:02:46.144 TRACE heat.engine.stack ^[[01;35m^[[00mKeyError: u'allnodes_deployment: Invalid Property count'

Steven Hardy (shardy)
Changed in heat:
assignee: nobody → Steven Hardy (shardy)
importance: Undecided → High
status: New → In Progress
milestone: none → kilo-2
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/143212

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

Reviewed: https://review.openstack.org/143212
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4834443353fab57315040c9de2c7dac19e8a8b51
Submitter: Jenkins
Branch: master

commit 4834443353fab57315040c9de2c7dac19e8a8b51
Author: Steven Hardy <email address hidden>
Date: Fri Dec 19 22:46:27 2014 +0000

    Fix SoftwareDeployments validation

    Fixes a regression caused by https://review.openstack.org/#/c/141444/

    Instead of referencing the COUNT property, use _resource_names(),
    which is already overridden in the SoftwareDeployments subclass
    and is directly related to the count of created resources in
    both resources.

    Change-Id: Iea454f4201990f65633b644bbefe708e5a216885
    Closes-Bug: #1404399

Changed in heat:
status: In Progress → Fix Committed
Zane Bitter (zaneb)
tags: added: juno-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/juno)

Reviewed: https://review.openstack.org/145917
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=94dec9e286a5d881bfaa18083d2406d8b18df784
Submitter: Jenkins
Branch: stable/juno

commit 94dec9e286a5d881bfaa18083d2406d8b18df784
Author: Steven Hardy <email address hidden>
Date: Fri Dec 12 17:49:10 2014 +0000

    Disable nested validation for ResourceGroup with zero count

    Some users (TripleO specifically) want to disable features via a
    count of zero, which is a problem as we always recurse and validate
    the nested stack since c31c34f8dfd0919bf46a975701c139073115debc

    Instead, we only do validation when the count is non-zero, to
    enable, e.g default image names, to be ignored at validation
    time (as we'll never use them) instead of rejected by the nested
    schema (e.g the server.py properties schema which contains a
    custom contraint to always validate the image).

    This should still allow us to fail fast (at validation time before
    creating anything) when we're actually about to create something,
    e.g when the count is non-zero.

    This patch also rolls in the fix for the regression this originally
    caused on master, Iea454f4201990f65633b644bbefe708e5a216885.

    Change-Id: I411ff41a9e0730e9864f5ed4ac54f1d5d0ec02d7
    Closes-Bug: #1401929
    Closes-Bug: #1404399
    (cherry picked from commit 907c0aac79a367d84bdbc26acbf5c4475f9abab7 and 4834443353fab57315040c9de2c7dac19e8a8b51)

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