Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting a 500 error if any storage pool is stopped when I try to create a new VM. #59

Closed
kimnzl opened this issue May 25, 2013 · 6 comments

Comments

@kimnzl
Copy link

kimnzl commented May 25, 2013

On WebVirtMgr panel v2.0.0 created from a new git clone.

I get a 500 error if any storage pool is stopped when I try to create a new VM.

It might be useful to trap this error and handle it by either telling the user about the problem or by giving the option to start the pool directly from the error page.

Debug:

Environment:

Request Method: GET
Request URL: http://ra.home:81/webvirtmgr/newvm/1/

Django Version: 1.4.5
Python Version: 2.7.4
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'vds')
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/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/var/www81/webvirtmgr/newvm/views.py" in newvm
  140.         all_img = libvirt_func.images_get_storages(conn, all_storages)
File "/var/www81/webvirtmgr/libvirt_func.py" in images_get_storages
  257.         stg.refresh(0)
File "/usr/lib/python2.7/dist-packages/libvirt.py" in refresh
  2441.         if ret == -1: raise libvirtError ('virStoragePoolRefresh() failed', pool=self)

Exception Type: libvirtError at /newvm/1/
Exception Value: Requested operation is not valid: storage pool 'storage' is not active

@retspen
Copy link
Owner

retspen commented May 27, 2013

Need only active storage pool for create VM.

@kimnzl
Copy link
Author

kimnzl commented May 27, 2013

Does that mean you need all the pools active to create VMs?
Or just the one you plan on using for storage?

@retspen
Copy link
Owner

retspen commented May 27, 2013

Need at least one where the VM images will be saved. Got to storage page and click button: "Start" or create new storage pool.

@retspen retspen closed this as completed May 30, 2013
@kimnzl
Copy link
Author

kimnzl commented May 30, 2013

When I have:
storage pool 'default' online (started)
storage pool 'ubuntu1304' offline (stopped)
storage pool 'storage' online (started)
I still get the error. I would expect based on what you have said that this is not what is meant to happen.
As far as I can see from the code all pools would need to be started for it to work and allow for a new VM.
How can a storage location be refreshed 'stg.refresh(0)' if it is not started?

Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/var/www81/webvirtmgr/newvm/views.py" in newvm
  140.         all_img = libvirt_func.images_get_storages(conn, all_storages)
File "/var/www81/webvirtmgr/libvirt_func.py" in images_get_storages
  257.         stg.refresh(0)
File "/usr/lib/python2.7/dist-packages/libvirt.py" in refresh
  2441.         if ret == -1: raise libvirtError ('virStoragePoolRefresh() failed', pool=self)

Exception Type: libvirtError at /newvm/1/
Exception Value: Requested operation is not valid: storage pool 'ubuntu1304' is not active

@retspen
Copy link
Owner

retspen commented May 30, 2013

Fix this bug 86e30ac Need update

@kimnzl
Copy link
Author

kimnzl commented May 30, 2013

Thanks for all your hard work.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants