[UI] Savanna-dashboard shows traceback on 'Upload Template'

Bug #1200245 reported by Alexander Ignatov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
High
Nikolay Makhotkin

Bug Description

Savanna-dashboard plugin throws an exception if user tries to upload file via 'Upload Template' button for Plugin which doesn't support convert() method.
=================================
RuntimeError at /savanna/cluster_templates/upload_file
Failed to upload template file for plugin "vanilla" and version "1.1.2"
Request Method: POST
Request URL: http://172.18.79.175:8080/savanna/cluster_templates/upload_file
Django Version: 1.4.5
Exception Type: RuntimeError
Exception Value:
Failed to upload template file for plugin "vanilla" and version "1.1.2"
Exception Location: /home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/savannadashboard/api/plugins.py in convert_to_cluster_template, line 51
Python Executable: /home/ubuntu/horizon/.venv/bin/python
Python Version: 2.7.3
Python Path:
['/home/ubuntu/horizon',
 '/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg',
 '/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/savannadashboard-0.2.a3.gccddfa7-py2.7.egg',
 '/home/ubuntu/horizon/.venv/lib/python2.7/site-packages/savannadashboard-0.2.a3.gccddfa7-py2.7.egg',
 '/home/ubuntu/horizon/.venv/lib/python2.7',
 '/home/ubuntu/horizon/.venv/lib/python2.7/plat-linux2',
 '/home/ubuntu/horizon/.venv/lib/python2.7/lib-tk',
 '/home/ubuntu/horizon/.venv/lib/python2.7/lib-old',
 '/home/ubuntu/horizon/.venv/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages',
 '/home/ubuntu/horizon/openstack_dashboard']
Server time: Thu, 11 Jul 2013 14:06:57 +0000
============================================
Traceback:
============================================
Environment:

Request Method: POST
Request URL: http://172.18.79.175:8080/savanna/cluster_templates/upload_file

Django Version: 1.4.5
Python Version: 2.7.3
Installed Applications:
('savannadashboard',
 'openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'compressor',
 'horizon',
 'horizon.dashboards.nova',
 'horizon.dashboards.syspanel',
 'horizon.dashboards.settings',
 'openstack_auth')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware')

Traceback:

File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111. response = callback(request, *callback_args, **callback_kwargs)
File "/home/ubuntu/horizon/horizon/decorators.py" in dec
  40. return view_func(request, *args, **kwargs)
File "/home/ubuntu/horizon/horizon/decorators.py" in dec
  55. return view_func(request, *args, **kwargs)
File "/home/ubuntu/horizon/horizon/decorators.py" in dec
  40. return view_func(request, *args, **kwargs)
File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py" in view
  48. return self.dispatch(request, *args, **kwargs)
File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  69. return handler(request, *args, **kwargs)
File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/edit.py" in post
  138. return self.form_valid(form)
File "/home/ubuntu/horizon/horizon/forms/views.py" in form_valid
  69. exceptions.handle(self.request)
File "/home/ubuntu/horizon/horizon/forms/views.py" in form_valid
  66. handled = form.handle(self.request, form.cleaned_data)
File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/savannadashboard/cluster_templates/forms.py" in handle
  52. exceptions.handle(request)
File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/savannadashboard/cluster_templates/forms.py" in handle
  49. filecontent)
File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/savannadashboard/api/plugins.py" in convert_to_cluster_template
  51. (plugin_name, hadoop_version))

Exception Type: RuntimeError at /savanna/cluster_templates/upload_file
Exception Value: Failed to upload template file for plugin "vanilla" and version "1.1.2"
========================================================

description: updated
Changed in savanna:
status: New → Triaged
tags: added: 0.2.1
Changed in savanna:
assignee: nobody → Nikita Konovalov (nkonovalov)
summary: - Savanna-dashboard shows traceback on 'Upload Template'
+ [UI] Savanna-dashboard shows traceback on 'Upload Template'
Changed in savanna:
assignee: Nikita Konovalov (nkonovalov) → Nikolay Makhotkin (nmakhotkin)
Changed in savanna:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to savanna (master)

Reviewed: https://review.openstack.org/37249
Committed: http://github.com/stackforge/savanna/commit/c23227411b98ab561a9d80b568ce932f073b0d46
Submitter: Jenkins
Branch: master

commit c23227411b98ab561a9d80b568ce932f073b0d46
Author: Nikolay Mahotkin <email address hidden>
Date: Tue Jul 16 19:22:15 2013 +0400

    REST API returns traceback fix

    Fixes: bug #1200245

    Change-Id: Ie23e1d6910892c55f729153cf5a3b238a4d3c605

Changed in savanna:
status: In Progress → Fix Committed
Changed in savanna:
milestone: 0.2.1 → 0.2.1-rc1
Changed in savanna:
status: Fix Committed → Fix Released
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.