Number parameter doesn't catch all exceptions

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

Bug Description

See the following template:

heat_template_version: pike

parameters:
  a_param:
    type: number
    default: [3, 4]

resources:
  val:
    type: OS::Heat::Value
    properties:
      value: {get_param: a_param}

The default of a_param is wrong, but instead of failing the validation, trying to create a stack returns a server error.

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

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

Reviewed: https://review.openstack.org/474959
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=98c89e0f4b87093bdcab2e8e26e85596de21997c
Submitter: Jenkins
Branch: master

commit 98c89e0f4b87093bdcab2e8e26e85596de21997c
Author: Thomas Herve <email address hidden>
Date: Fri Jun 16 14:39:56 2017 +0200

    Catch type errors when casting to int

    Casting a parameter to a number can fail with a type error as well as a
    value error. Let's catch it to get a proper validation error.

    Change-Id: I63779a6227b834cedeeed1c4d5d49271e15e4ea9
    Closes-Bug: #1698365

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 9.0.0.0b3

This issue was fixed in the openstack/heat 9.0.0.0b3 development milestone.

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.