HEAT - Validation of a template does not display the correct error message

Bug #1262328 reported by Sayaji Patil
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
heat-dashboard
New
Undecided
Unassigned

Bug Description

If the heat template from a file source does not have the right syntax, the error displayed in horizon is
"An unknown problem occurred validating the template."

Heat engine is returning an error with an error message but that message is not propagated to the end user.
This is what I see in the horizon logs

HTTP/1.1 400 Bad Request
date: Wed, 18 Dec 2013 18:55:45 GMT
content-length: 769
content-type: application/json; charset=UTF-8

{"explanation": "At least one Resources member must be defined.", "code": 400, "error": {"message": "At least one Resources member must be defined.", "traceback": " File \"/usr/lib/python2.6/site-packages/heat/common/wsgi.py\", line 661, in __call__\n request, **action_args)\n File \"/usr/lib/python2.6/site-packages/heat/common/wsgi.py\", line 729, in dispatch\n return method(*args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/heat/api/openstack/v1/util.py\", line 30, in handle_stack_method\n return handler(controller, req, **kwargs)\n File \"/usr/lib/python2.6/site-packages/heat/api/openstack/v1/stacks.py\", line 317, in validate_template\n raise exc.HTTPBadRequest(result['Error'])\n", "type": "HTTPBadRequest"}, "title": "Bad Request"}

2013-12-18 18:55:45,328 4601 ERROR openstack_dashboard.dashboards.project.stacks.forms <django.utils.functional.__proxy__ object at 0x7fdf0c4dab50>
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/stacks/forms.py", line 139, in clean
    validated = api.heat.template_validate(self.request, **kwargs)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/heat.py", line 88, in template_validate
    return heatclient(request).stacks.validate(**kwargs)
  File "/usr/lib/python2.6/site-packages/heatclient/v1/stacks.py", line 147, in validate
    resp, body = self.api.json_request('POST', '/validate', body=kwargs)
  File "/usr/lib/python2.6/site-packages/heatclient/common/http.py", line 210, in json_request
    resp, body_str = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.6/site-packages/heatclient/common/http.py", line 175, in _http_request
    raise exc.from_response(resp, body_str)
HTTPBadRequest: ERROR: At least one Resources member must be defined.

In this case horizon should display some message like "ERROR: At least one Resources member must be defined"

Tags: heat
Sayaji Patil (sayaji15)
summary: - HEAT - Error while validating a template does not display the correct
- error
+ HEAT - Validation of a template does not display the correct error
+ message
Sayaji Patil (sayaji15)
description: updated
Changed in horizon:
assignee: nobody → Victor Morales (electrocucaracha)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/63678

Changed in horizon:
status: New → In Progress
Changed in horizon:
importance: Undecided → Medium
Revision history for this message
Ethan Lynn (ethanlynn) wrote :

Is this bug still in progress? I also met this problem. I think it's a horizon's bug.

Changed in horizon:
assignee: Victor Morales (electrocucaracha) → Marcos Lobo (marcos-fermin-lobo)
Changed in horizon:
assignee: Marcos Lobo (marcos-fermin-lobo) → Matthias Runge (mrunge)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Matthias Runge (<email address hidden>) on branch: master
Review: https://review.openstack.org/63678
Reason: no response for a long time, 2 negative votes

Revision history for this message
Matthias Runge (mrunge) wrote :

Re-Assigning after long inactivity

Changed in horizon:
status: In Progress → Confirmed
assignee: Matthias Runge (mrunge) → nobody
Changed in horizon:
assignee: nobody → Sharat Sharma (sharat-sharma)
Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/367254

Changed in horizon:
assignee: Sharat Sharma (sharat-sharma) → nobody
status: In Progress → New
importance: Medium → Undecided
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Rob Cresswell (<email address hidden>) on branch: master
Review: https://review.openstack.org/367254
Reason: Abandoned due to inactivity

tags: added: heat
Revision history for this message
Akihiro Motoki (amotoki) wrote :

heat panel is split out to heat-dashboard. Retargeting to heat-dashboard.

affects: horizon → heat-dashboard
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.