Bug 7206

Summary: Downloading cooker log throws an error
Product: [Build System, Metadata & Runtime] Toaster Reporter: Belen Barros Pena <belen.barros.pena>
Component: toasterAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact: Cristina Agurida <cristina-danielax.agurida>
Severity: normal    
Priority: Medium+ CC: alexandru.damian, belen.barros.pena, bluelightning, cristiana.voicu, cristina-danielax.agurida
Version: unspecified   
Target Milestone: 1.8 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: download artifacts
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on: 7220    
Bug Blocks:    

Description Belen Barros Pena 2015-01-20 18:27:26 UTC
To reproduce:

1. Run a failed build with Toaster
2. In the all builds page, click on the download icon that shows next to the number of errors

This should download the build cooker log, but instead throws this error

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/toastergui/build/3/artifact/cookerlog/id/3

Django Version: 1.6
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.staticfiles',
'django.contrib.humanize',
'orm',
'toastermain',
'south',
'bldviewer',
'toastergui',
'bldcontrol')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py"
in get_response
  114.                     response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File "/home/yocto/master/bitbake/lib/toaster/toastergui/views.py" in
build_artifact
  2939.             fsock = b.buildrequest.environment.get_artifact(file_name)
File "/home/yocto/master/bitbake/lib/toaster/bldcontrol/models.py" in
get_artifact
  78.             return open(path, "r")

Exception Type: IOError at /toastergui/build/3/artifact/cookerlog/id/3
Exception Value: [Errno 2] No such file or directory:
u'/home/yocto/master/build/tmp/log/cooker/qemux86/20150120180920.log'
Comment 1 Alexandru Damian 2015-02-17 10:02:16 UTC
Pushed for review

poky-contrib: adamian/201502016_download_bugs_72207206
Comment 2 Alexandru Damian 2015-02-20 13:34:38 UTC
Merged in master.
Comment 3 Cristina Agurida 2015-03-25 09:41:40 UTC
Verified on master: bbc139617637392a9b0fb2e9332a42ad64a4a556