← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1262328] [NEW] HEAT - Validation of a template does not display the correct error message

 

Public bug reported:

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.

** Affects: horizon
     Importance: Undecided
         Status: New

** Summary changed:

- HEAT - Error while validating a template does not display the correct error
+ HEAT - Validation of a template does not display the correct error message

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1262328

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

Status in OpenStack Dashboard (Horizon):
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1262328/+subscriptions


Follow ups

References