KeyError on VM or Template Create

16 views
Skip to first unread message

Adam Watkins

unread,
Aug 12, 2014, 2:41:37 PM8/12/14
to ganeti...@googlegroups.com
I can't create a VM or template without getting a key error.  The ganeti version I'm using is 2.5.2 with Ganeti Web Manager 0.10.2.  It makes me enter minmem and maxmem values, which I don't think are present on 2.5.2...  I'm wondering if it is trying to pass a key of maxmem/minmem and failing.  It is hard to tell from the error.  I have seen some errors in the past, but they seem unrelated or fixed by previous tickets.  I can create a template from an existing VM, but it bombs with a different error if I try to edit it.

Environment:


Request Method: POST
Request URL: http://192.168.0.10/template/create/

Django Version: 1.4.13
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.formtools',
 'django.contrib.messages',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.staticfiles',
 'registration',
 'ganeti_web',
 'object_permissions',
 'object_log',
 'south',
 'haystack',
 'muddle',
 'muddle.shots',
 'muddle_users',
 'include_strip_tag',
 'django_tables2')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.transaction.TransactionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'ganeti_web.middleware.PermissionDeniedMiddleware')


Traceback:
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  109.                         response = callback(request, *callback_args, **callback_kwargs)
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/views/generic/base.py" in view
  48.             return self.dispatch(request, *args, **kwargs)
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  25.             return bound_func(*args, **kwargs)
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  20.                 return view_func(request, *args, **kwargs)
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  21.                 return func(self, *args2, **kwargs2)
File "/srv/www/ganeti_webmgr/ganeti_web/views/generic.py" in dispatch
  28.         return super(LoginRequiredMixin, self).dispatch(*args, **kwargs)
File "/srv/www/ganeti_webmgr/ganeti_web/views/generic.py" in dispatch
  84.             **kwargs)
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/contrib/formtools/wizard/views.py" in dispatch
  223.         response = super(WizardView, self).dispatch(request, *args, **kwargs)
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  69.         return handler(request, *args, **kwargs)
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/contrib/formtools/wizard/views.py" in post
  286.                 return self.render_done(form, **kwargs)
File "/srv/www/ganeti_webmgr/venv/lib/python2.7/site-packages/django/contrib/formtools/wizard/views.py" in render_done
  328.         done_response = self.done(final_form_list, **kwargs)
File "/srv/www/ganeti_webmgr/ganeti_web/forms/virtual_machine.py" in done
  1295.         template.iallocator = forms[2].cleaned_data["iallocator"]

Exception Type: KeyError at /template/create/
Exception Value: 'iallocator'

Adam Watkins

unread,
Aug 12, 2014, 3:21:20 PM8/12/14
to ganeti...@googlegroups.com
It got the create to go through by commenting out the offending line:


template.iallocator = forms[2].cleaned_data["iallocator"]

Reply all
Reply to author
Forward
0 new messages