[GH-ISSUE #353] Cloning Failed, Getting 500 errors when attempting to access anything #263

Closed
opened 2026-02-27 16:38:39 +03:00 by kerem · 6 comments
Owner

Originally created by @goshlanguage on GitHub (Jun 30, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/353

I was cloning a VM from the Instance menu and it failed abruptly without any indication of an error.

Now, when I try to access instances I receive a 500 error and cannot remove any instance of the failed VM. I assume I'll need to remove the cloned instance that failed to copy from the database in order to resolve my issue, however here is the stacktrace obtained by running Webvirtmgr in Debug mode and watching the console:

ERROR:django.request:Internal Server Error: /instances/1/
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/var/www/webvirtmgr/instance/views.py", line 429, in instances
return render_to_response('instances.html', locals(), context_instance=RequestContext(request))
File "/usr/lib/python2.6/site-packages/django/shortcuts/init.py", line 29, in render_to_response
return HttpResponse(loader.render_to_string(_args, *_kwargs), **httpresponse_kwargs)
File "/usr/lib/python2.6/site-packages/django/template/loader.py", line 177, in render_to_string
return t.render(context_instance)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 140, in render
return self._render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 134, in _render
return self.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 830, in render
bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 844, in render_node
return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py", line 124, in render
return compiled_parent._render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 134, in _render
return self.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 830, in render
bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 844, in render_node
return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 830, in render
bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 844, in render_node
return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py", line 285, in render
return nodelist.render(context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 830, in render
bit = self.render_node(node, context)
File "/usr/lib/python2.6/site-packages/django/template/base.py", line 844, in render_node
return node.render(context)
File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py", line 196, in render
nodelist.append(node.render(context))
File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py", line 426, in render
raise e
NoReverseMatch: Reverse for 'instance' with arguments '(u'1', 'Git Server')' and keyword arguments '{}' not found.
[30/Jun/2014 05:39:44] "GET /instances/1/ HTTP/1.1" 500 1831
[30/Jun/2014 05:39:44] "GET /static/css/bootstrap.min.css HTTP/1.1" 304 0
[30/Jun/2014 05:39:44] "GET /static/js/jquery-1.10.2.js HTTP/1.1" 304 0
[30/Jun/2014 05:39:44] "GET /static/css/webvirtmgr.css HTTP/1.1" 304 0
[30/Jun/2014 05:39:44] "GET /static/js/bootstrap.min.js HTTP/1.1" 304 0

Can you offer any advice? This occured after trying to clone the instance (powered off from the instance settings tab). Is this a bug?

Originally created by @goshlanguage on GitHub (Jun 30, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/353 I was cloning a VM from the Instance menu and it failed abruptly without any indication of an error. Now, when I try to access instances I receive a 500 error and cannot remove any instance of the failed VM. I assume I'll need to remove the cloned instance that failed to copy from the database in order to resolve my issue, however here is the stacktrace obtained by running Webvirtmgr in Debug mode and watching the console: ERROR:django.request:Internal Server Error: /instances/1/ Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, _callback_args, *_callback_kwargs) File "/var/www/webvirtmgr/instance/views.py", line 429, in instances return render_to_response('instances.html', locals(), context_instance=RequestContext(request)) File "/usr/lib/python2.6/site-packages/django/shortcuts/**init**.py", line 29, in render_to_response return HttpResponse(loader.render_to_string(_args, *_kwargs), **httpresponse_kwargs) File "/usr/lib/python2.6/site-packages/django/template/loader.py", line 177, in render_to_string return t.render(context_instance) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 140, in render return self._render(context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 134, in _render return self.nodelist.render(context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 830, in render bit = self.render_node(node, context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 844, in render_node return node.render(context) File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py", line 124, in render return compiled_parent._render(context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 134, in _render return self.nodelist.render(context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 830, in render bit = self.render_node(node, context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 844, in render_node return node.render(context) File "/usr/lib/python2.6/site-packages/django/template/loader_tags.py", line 63, in render result = block.nodelist.render(context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 830, in render bit = self.render_node(node, context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 844, in render_node return node.render(context) File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py", line 285, in render return nodelist.render(context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 830, in render bit = self.render_node(node, context) File "/usr/lib/python2.6/site-packages/django/template/base.py", line 844, in render_node return node.render(context) File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py", line 196, in render nodelist.append(node.render(context)) File "/usr/lib/python2.6/site-packages/django/template/defaulttags.py", line 426, in render raise e NoReverseMatch: Reverse for 'instance' with arguments '(u'1', 'Git Server')' and keyword arguments '{}' not found. [30/Jun/2014 05:39:44] "GET /instances/1/ HTTP/1.1" 500 1831 [30/Jun/2014 05:39:44] "GET /static/css/bootstrap.min.css HTTP/1.1" 304 0 [30/Jun/2014 05:39:44] "GET /static/js/jquery-1.10.2.js HTTP/1.1" 304 0 [30/Jun/2014 05:39:44] "GET /static/css/webvirtmgr.css HTTP/1.1" 304 0 [30/Jun/2014 05:39:44] "GET /static/js/bootstrap.min.js HTTP/1.1" 304 0 Can you offer any advice? This occured after trying to clone the instance (powered off from the instance settings tab). Is this a bug?
kerem closed this issue 2026-02-27 16:38:39 +03:00
Author
Owner

@goshlanguage commented on GitHub (Jun 30, 2014):

I have attempted to remove the instance from the instance_instance table, however it has been unsuccessful, even after trying to run ./manage syncdb afterward. I probably don't know how ./manage syncdb works.

sqlite> .databases
seq  name             file
---  ---------------  ----------------------------------------------------------
0    main             /var/www/webvirtmgr/webvirtmgr.sqlite3
1    temp
sqlite> select * from main.instance_instance;
2|1|pxe|f162d327-3f65-9ea2-2cd7-ed31883a5a8d
5|1|Centos_6.5_64|9c25d718-455f-c274-1d0b-94c5d47495bf
6|1|Git Server|d2daba11-7efb-d0d8-b863-aa7dcab444d4
sqlite> delete from main.instance_instance where name="Git Server";
sqlite> select * from main.instance_instance;
2|1|pxe|f162d327-3f65-9ea2-2cd7-ed31883a5a8d
5|1|Centos_6.5_64|9c25d718-455f-c274-1d0b-94c5d47495bf

I am still getting the same error message, and if I grep for "Git Server" (the name of the instance I wanted to clone), it's found in the webvirtmgr.sqlite3 file.

Any advice on where this might still be referenced? I search all of the tables I could fine:

sqlite> .tables
auth_group                  create_flavor
auth_group_permissions      django_content_type
auth_permission             django_session
auth_user                   django_site
auth_user_groups            instance_instance
auth_user_user_permissions  servers_compute

I have removed the only instance I found from instance_instance but it seems to still be there.
Thank you in advance for any help.

<!-- gh-comment-id:47492621 --> @goshlanguage commented on GitHub (Jun 30, 2014): I have attempted to remove the instance from the instance_instance table, however it has been unsuccessful, even after trying to run ./manage syncdb afterward. I probably don't know how ./manage syncdb works. ``` ssh sqlite> .databases seq name file --- --------------- ---------------------------------------------------------- 0 main /var/www/webvirtmgr/webvirtmgr.sqlite3 1 temp sqlite> select * from main.instance_instance; 2|1|pxe|f162d327-3f65-9ea2-2cd7-ed31883a5a8d 5|1|Centos_6.5_64|9c25d718-455f-c274-1d0b-94c5d47495bf 6|1|Git Server|d2daba11-7efb-d0d8-b863-aa7dcab444d4 sqlite> delete from main.instance_instance where name="Git Server"; sqlite> select * from main.instance_instance; 2|1|pxe|f162d327-3f65-9ea2-2cd7-ed31883a5a8d 5|1|Centos_6.5_64|9c25d718-455f-c274-1d0b-94c5d47495bf ``` I am still getting the same error message, and if I grep for "Git Server" (the name of the instance I wanted to clone), it's found in the webvirtmgr.sqlite3 file. Any advice on where this might still be referenced? I search all of the tables I could fine: ``` ssh sqlite> .tables auth_group create_flavor auth_group_permissions django_content_type auth_permission django_session auth_user django_site auth_user_groups instance_instance auth_user_user_permissions servers_compute ``` I have removed the only instance I found from instance_instance but it seems to still be there. Thank you in advance for any help.
Author
Owner

@retspen commented on GitHub (Jun 30, 2014):

You use name with space 'Git Server'. Can you rename your server like that 'Git_Server'

<!-- gh-comment-id:47505884 --> @retspen commented on GitHub (Jun 30, 2014): You use name with space 'Git Server'. Can you rename your server like that 'Git_Server'
Author
Owner

@goshlanguage commented on GitHub (Jun 30, 2014):

How can I, I can't access anything from the dashboard? Also, I have removed it from the Database in instance_instance, have I done that correctly and are there other places where I need to do so?

<!-- gh-comment-id:47533245 --> @goshlanguage commented on GitHub (Jun 30, 2014): How can I, I can't access anything from the dashboard? Also, I have removed it from the Database in instance_instance, have I done that correctly and are there other places where I need to do so?
Author
Owner

@goshlanguage commented on GitHub (Jun 30, 2014):

I have tracked the issue through line 429 of webvirtmgr/instance/views.py and it looks like it's pulling the data from virsh through qemu:///system using the provided credentials.

I'm not able to delete this instance through virsh:
http://serverfault.com/questions/609026/virsh-domain-has-space-in-it-can-not-remove

Do you know how I might remove this and resolve this issue? Also, I'd recommend that the clone server field in settings check for spaces and throw an error if illegal characters are present, preferably before it clones a vm and causes this issue.

<!-- gh-comment-id:47547314 --> @goshlanguage commented on GitHub (Jun 30, 2014): I have tracked the issue through line 429 of webvirtmgr/instance/views.py and it looks like it's pulling the data from virsh through qemu:///system using the provided credentials. I'm not able to delete this instance through virsh: http://serverfault.com/questions/609026/virsh-domain-has-space-in-it-can-not-remove Do you know how I might remove this and resolve this issue? Also, I'd recommend that the clone server field in settings check for spaces and throw an error if illegal characters are present, preferably before it clones a vm and causes this issue.
Author
Owner

@goshlanguage commented on GitHub (Jun 30, 2014):

I was able to fix this through the answer in my serverfault question. For any other affected parties you can stop libvirt and remove the offending server clone from /etc/libvirt/qemu/ and then start libvirt to resolve this problem.

<!-- gh-comment-id:47549838 --> @goshlanguage commented on GitHub (Jun 30, 2014): I was able to fix this through the answer in my serverfault question. For any other affected parties you can stop libvirt and remove the offending server clone from /etc/libvirt/qemu/ and then start libvirt to resolve this problem.
Author
Owner

@retspen commented on GitHub (Jun 30, 2014):

You can do that (input \ after first word):
$ virsh stop GIt\ Server

<!-- gh-comment-id:47567226 --> @retspen commented on GitHub (Jun 30, 2014): You can do that (input \ after first word): $ virsh stop GIt\ Server
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#263
No description provided.