[Kimchi-devel] [PATCH] Bug fix: Allow user creates multiple templates
Crístian Deives
cristiandeives at gmail.com
Thu Jun 11 14:00:03 UTC 2015
Reviewed-by: Crístian Deives <cristiandeives at gmail.com>
On 09-06-2015 11:43, Aline Manera wrote:
> While trying to create multiple templates I got the following error on
> console:
>
> [08/Jun/2015:12:57:23] HTTP Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 670, in respond
> response.body = self.handler()
> File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 217, in __call__
> self.body = self.oldhandler(*args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 61, in __call__
> return self.callable(*self.args, **self.kwargs)
> File "/home/alinefm/kimchi/src/kimchi/control/base.py", line 330, in index
> return self.create(parse_request(), *args)
> File "/home/alinefm/kimchi/src/kimchi/control/base.py", line 262, in create
> name = create(*args)
> File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 48, in create
> user = UserTests().probe_user()
> File "/home/alinefm/kimchi/src/kimchi/kvmusertests.py", line 55, in probe_user
> flags=libvirt.VIR_DOMAIN_START_AUTODESTROY)
> File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3424, in createXML
> if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
> libvirtError: operation failed: domain 'KVMUSERTEST_VM' already exists
> with uuid 2be4b2e8-f57a-4f87-8c24-5ac59d4bb4af
>
> The error happens because of a race condition while trying to get the kvm user
> (to validate the ISO file permissions). To avoid this problem, a lock
> was added to ensure the code is run once at a time.
>
> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
More information about the Kimchi-devel
mailing list