Skip to content

Attempting to create a VM on a read-only cluster throws exception #55

Open
@tschuy

Description

From Nate Aune

When I try to add a new VM, and haven't specified a username/password for the Ganeti cluster, I get the following error:
It should probably prevent me from trying to create a new VM, if I haven't filled out the username/password for the cluster.

Environment:

Request Method: POST
Request URL: http://localhost:8000/vm/add

Django Version: 1.4.8
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 "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
1.                         response = callback(request, _callback_args, *_callback_kwargs)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/views/generic/base.py" in view
2.             return self.dispatch(request, _args, *_kwargs)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
3.             return bound_func(_args, *_kwargs)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
4.                 return view_func(request, _args, *_kwargs)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
5.                 return func(self, _args2, *_kwargs2)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/ganeti_web/views/generic.py" in dispatch
6.         return super(LoginRequiredMixin, self).dispatch(_args, *_kwargs)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/ganeti_web/views/generic.py" in dispatch
7.             **kwargs)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/contrib/formtools/wizard/views.py" in dispatch
8.         response = super(WizardView, self).dispatch(request, _args, *_kwargs)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
9.         return handler(request, _args, *_kwargs)
   File "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/contrib/formtools/wizard/views.py" in post
10.                 return self.render_done(form, **kwargs)
    File "/Users/nateaune/Dropbox/code/ganeti_webmgr/venv/lib/python2.7/site-packages/django/contrib/formtools/wizard/views.py" in render_done
11.         done_response = self.done(final_form_list, **kwargs)
    File "/Users/nateaune/Dropbox/code/ganeti_webmgr/ganeti_web/forms/virtual_machine.py" in done
12.             vm = template_to_instance(template, hostname, owner)
    File "/Users/nateaune/Dropbox/code/ganeti_webmgr/ganeti_web/backend/templates.py" in template_to_instance
13.                                          **kwargs)
    File "/Users/nateaune/Dropbox/code/ganeti_webmgr/ganeti_web/util/client.py" in CreateInstance
14.                                  content=body)
    File "/Users/nateaune/Dropbox/code/ganeti_webmgr/ganeti_web/util/client.py" in _SendRequest
15.             raise GanetiApiError(str(r.status_code), code=r.status_code)

Exception Type: GanetiApiError at /vm/add
Exception Value: 401

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions