Include parameter name in StackValidationFailed exception

Bug #1324968 reported by Vijendar Komalla
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Vijendar Komalla

Bug Description

When an incorrect parameter is passed, StackValidationFailed exception would be thrown, but this exception does not include parameter name. For example, see the following exception;
{
    "message": "must begin with a letter and contain only alphanumeric characters.",
    "traceback": "Traceback (most recent call last):\n\n File \"/opt/stack/heat/heat/engine/service.py\", line 62, in wrapped\n return func(self, ctx, *args, **kwargs)\n\n File \"/opt/stack/heat/heat/engine/service.py\", line 542, in create_stack\n stack = parser.Stack(cnxt, stack_name, tmpl, env, **common_params)\n\n File \"/opt/stack/heat/heat/engine/parser.py\", line 108, in __init__\n context=context)\n\n File \"/opt/stack/heat/heat/engine/parameters.py\", line 407, in validate\n\n File \"/opt/stack/heat/heat/engine/parameters.py\", line 220, in validate\n self._validate(self.default(), context)\n\n File \"/opt/stack/heat/heat/engine/parameters.py\", line 288, in _validate\n\n File \"/opt/stack/heat/heat/engine/parameters.py\", line 159, in validate_value\n if name == \"name\":\n\n File \"/opt/stack/heat/heat/engine/constraints.py\", line 169, in validate_constraints\n raise exception.StackValidationFailed(message=six.text_type(ex))\n\nStackValidationFailed: must begin with a letter and contain only alphanumeric characters.\n",
    "type": "StackValidationFailed"
}

Including parameter name in error message would be helpful in identifying the issue quickly.

Changed in heat:
assignee: nobody → Vijendar Komalla (vijendar-komalla)
summary: - Include parameter name in StackValidationException
+ Include parameter name in StackValidationFailed
summary: - Include parameter name in StackValidationFailed
+ Include parameter name in StackValidationFailed exception
description: updated
Changed in heat:
status: New → 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/97264

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

Reviewed: https://review.openstack.org/97264
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=7348b5303bfa7fdd31a2f8c3226a3cdf7ada9102
Submitter: Jenkins
Branch: master

commit 7348b5303bfa7fdd31a2f8c3226a3cdf7ada9102
Author: Vijendar Komalla <email address hidden>
Date: Mon Jun 2 10:13:33 2014 -0500

    Include parameter name in error message

    Including parameter name in StackValidationFailed exception
    message.

    Change-Id: I9d8f4e4a1986496d9be96f0e2a272cbc4da92b49
    Closes-Bug: #1324968

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