template validate returns 500

Bug #1336740 reported by Removed by request
6
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Thomas Herve

Bug Description

template validation usually returns 400 or errors, but on this case it returns 500.
Tested with python-heatclient-0.2.9-1.el7ost.noarch

Template:
--------------------
heat_template_version: 2013-05-23

description: >
  this should fail horribly

parameters:
  public_net_id:
    type: string
      this is where the error is
    default: error

resources:
  router:
    type: OS::Neutron::Router
  router_gateway:
    type: OS::Neutron::RouterGateway
    properties:
      router_id: { get_resource: router }
      network_id: { get_param: public_net_id }
--------------------

DEBUG:

http://10.35.160.79:8004/v1/b2876028bc2d48d591c71e27641337ea/validate
DEBUG (http:122)
HTTP/1.1 500 Internal Server Error
date: Wed, 02 Jul 2014 10:56:45 GMT
content-length: 297
content-type: application/json; charset=UTF-8

{"explanation": "The server has either erred or is incapable of performing the requested operation.", "code": 500, "error": {"message": "Remote error: InvalidSchemaError Invalid type (string this is where the error is)", "traceback": null, "type": "RemoteError"}, "title": "Internal Server Error"}

Traceback (most recent call last):
  File "/usr/bin/heat", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 432, in main
    HeatShell().main(args)
  File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 388, in main
    args.func(client, args)
  File "/usr/lib/python2.7/site-packages/heatclient/v1/shell.py", line 556, in do_template_validate
    validation = hc.stacks.validate(**fields)
  File "/usr/lib/python2.7/site-packages/heatclient/v1/stacks.py", line 160, in validate
    resp, body = self.client.json_request('POST', '/validate', data=kwargs)
  File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 235, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 196, in _http_request
    raise exc.from_response(resp)
heatclient.exc.HTTPInternalServerError: ERROR: Remote error: InvalidSchemaError Invalid type (string this is where the error is)

Thomas Herve (therve)
Changed in heat:
importance: Undecided → High
assignee: nobody → Thomas Herve (therve)
milestone: none → juno-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/104189

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

commit 4503154c1241b73f8efd483b41c111fefe3aaa6e
Author: Thomas Herve <email address hidden>
Date: Wed Jul 2 15:12:46 2014 +0200

    Fix serialization of InvalidSchemaError

    Move InvalidSchemaError to heat.common.exception and pass a keyword
    argument so that it can be serialized properly.

    Change-Id: Iada3273b2b0b129bc0125b68fecf1e0efc081611
    Closes-Bug: #1336740

Changed in heat:
status: In Progress → Fix Committed
Changed in heat:
status: Fix Committed → Fix Released
tags: added: icehouse-backport-potential
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-2 → 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.