malformed parameter_group fails non-obviously

Bug #1454559 reported by Steven Hardy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Rabi Mishra

Bug Description

A user on rdo-list was having problems due to doing this:

heat_template_version: 2014-10-16

description: Example bad syntax for parameter groups

parameter_groups:
  label: configuration_data
  description: configuration of the instances.
  parameters:
    key_name:
      type: string
      description: Name of keypair to assign to servers
      default: userkey
    image:
      type: string
      description: Name of image to use for servers
      default: cirros
    flavor:
      type: string
      description: Flavor to use for servers
      default: m1.tiny
  label: network_parameters
  description: thse values are used to configure the network
  parameters:
    public_net_id:
      type: string
      description: ID of public network
      default: xyz
    private_net_id:
      type: string
      description: ID of private network
      default: abc

The failure this produces is not at all obvious:

$ heat stack-create p1 -f parameter_groups.yaml
ERROR: 'unicode' object has no attribute 'get'

It'd be good to improve validation so this error is more meaningful, and some better documentation in the hot guide (the user guide not the hot spec which already covers this) and/or a better simple example in heat-templates (only one template currently uses parameter_groups, one of the openshift ones).

Rabi Mishra (rabi)
Changed in heat:
assignee: nobody → Rabi Mishra (rabi)
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/183466

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/183466
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=d3d4f623956ddad386382ff3ace2c6c121af72a6
Submitter: Jenkins
Branch: master

commit d3d4f623956ddad386382ff3ace2c6c121af72a6
Author: Rabi Mishra <email address hidden>
Date: Fri May 15 13:25:41 2015 +0530

    Add validation for parameter_groups

    This fix adds validation to raise error when the parameter_groups
    is not a list and parameters in a parameter_group is not a list.

    Change-Id: I35cdca9ce07522b5dbcfcf02d2c30393a4c15d1f
    Partial-Bug: #1454559

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