report errors if the bundle does not exist

Bug #1267032 reported by Neil Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Server
Confirmed
Medium
Georgy Redkozubov

Bug Description

Over the holiday period, the OOM killer caused processes to terminate on validation.linaro.org. One of the results was that bundle files were not written. When the job completed, the XMLRPC failed with an unclear error message:
https://validation.linaro.org/scheduler/job/93624/log_file#L_584_8

As this marks the job as incomplete, it took certain boards offline. (vexpress-a9-02 in this case)

The error message needs to be clearer by handling this traceback from the uwsgi log inside _get_sanitized_bundle:

ERROR:django.request:Internal Server Error: /dashboard/ajax/bundle-viewer/658/
Traceback (most recent call last):
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/srv/lava/.cache/git-cache/exports/lava-server/2013-12-17-b0f6c1c/dashboard_app/views/__init__.py", line 452, in ajax_bundle_viewer
    RequestContext(request))
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/shortcuts/__init__.py", line 20, in render_to_response
    return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/loader.py", line 176, in render_to_string
    return t.render(context_instance)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/base.py", line 140, in render
    return self._render(context)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/base.py", line 134, in _render
    return self.nodelist.render(context)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/base.py", line 823, in render
    bit = self.render_node(node, context)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/base.py", line 837, in render_node
    return node.render(context)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/defaulttags.py", line 474, in render
    self.extra_context.iteritems()])
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/base.py", line 571, in resolve
    obj = self.var.resolve(context)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/base.py", line 721, in resolve
    value = self._resolve_lookup(context)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/template/base.py", line 772, in _resolve_lookup
    current = current()
  File "/srv/lava/.cache/git-cache/exports/lava-server/2013-12-17-b0f6c1c/dashboard_app/models.py", line 544, in get_sanitized_bundle
    self.content.open()
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/fields/files.py", line 76, in open
    self.file.open(mode)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/fields/files.py", line 46, in _get_file
    self._file = self.storage.open(self.name, 'rb')
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/core/files/storage.py", line 33, in open
    return self._open(name, mode)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/core/files/storage.py", line 156, in _open
    return File(open(self.path(name), mode))
IOError: [Errno 2] No such file or directory: u'/srv/lava/instances/production/var/lib/lava-server/media/bundles/bundle-658'

Instead of reporting a 502 Bad Gateway XMLRPC error, a more useful and more informative XMLRPC error should be used.

Changed in lava-server:
assignee: nobody → Senthil Kumaran S (stylesen)
status: New → Confirmed
Changed in lava-server:
status: Confirmed → In Progress
Changed in lava-server:
status: In Progress → Confirmed
Changed in lava-server:
assignee: Senthil Kumaran S (stylesen) → Georgy Redkozubov (gesha)
Revision history for this message
Tyler Baker (tyler-baker) wrote :

Any update on this Georgy?

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.