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

integrety: storage pool deactivate/undefine needs to consider vm usage #355

Open
lvroyce opened this issue Mar 21, 2014 · 4 comments
Open
Milestone

Comments

@lvroyce
Copy link
Contributor

lvroyce commented Mar 21, 2014

  1. How to reproduce:
    (1) create a template using nfs pool
    (2) create a vm from this template
    (3) delete template
    (4) deactivate the nfs pool
  2. expected result:
    storage pool return error: vm is using this pool
  3. actual result:
    backend pass this deactivate request to libvirt and libvirt returns with error:
    INFO:cherrypy.access.47688656:127.0.0.1 - - [21/Mar/2014:16:05:08] "GET /storagepools/nfs-pool/storagevolumes HTTP/1.1" 200 270 "http://localhost:8000/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0"
    libvirt: error : internal error: Child process (/bin/umount /var/lib/kimchi/nfs_mount/nfs-pool) unexpected exit status 16: umount.nfs: /var/lib/kimchi/nfs_mount/nfs-pool: device is busy
    umount.nfs: /var/lib/kimchi/nfs_mount/nfs-pool: device is busy
    127.0.0.1 - - [21/Mar/2014:16:05:10] "POST /storagepools/nfs-pool/deactivate HTTP/1.1" 500 1290 "http://localhost:8000/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0"
@lvroyce
Copy link
Contributor Author

lvroyce commented Mar 21, 2014

Another case related this one is:
(1) create a vm from nfs pool
(2) stop vm
(3) deactivate and delete the pool-->this should have been forbiden because of a vm is using it
(4) delete the vm

Result:
ERROR:cherrypy.error.47688656:[21/Mar/2014:16:10:06] HTTP Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 656, in respond
response.body = self.handler()
File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 188, in call
self.body = self.oldhandler(_args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 34, in call
return self.callable(_self.args, *_self.kwargs)
File "/home/royce/lvroyce/kimchi/kimchi/src/kimchi/control/base.py", line 125, in index
'PUT': self.update}method
File "/home/royce/lvroyce/kimchi/kimchi/src/kimchi/control/base.py", line 108, in delete
fn(_self.model_args)
File "/home/royce/lvroyce/kimchi/kimchi/src/kimchi/model/vms.py", line 359, in delete
vol = conn.storageVolLookupByPath(path)
File "/home/royce/lvroyce/kimchi/kimchi/src/kimchi/model/libvirtconnection.py", line 62, in wrapper
ret = f(_args, **kwargs)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3592, in storageVolLookupByPath
if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self)
libvirtError: Storage volume not found: no storage vol with matching path /var/lib/kimchi/nfs_mount/nfs-pool/09fb9502-4371-42a7-91bb-a53a740e7254-0.img

@alinefm alinefm added the bug label Mar 25, 2014
@alinefm alinefm added this to the 1.2.1 GA milestone Apr 1, 2014
@Truja
Copy link
Contributor

Truja commented May 7, 2014

Please, assign to me.
@lvroyce have you worked on this bug ? if not, let me fix it... thanks

@shaohef
Copy link

shaohef commented May 9, 2014

@lvroyce ?

@lvroyce
Copy link
Contributor Author

lvroyce commented May 12, 2014

On 2014年05月08日 04:41, Rodrigo Trujillo wrote:

Please, assign to me.
@lvroyce https://github.com/lvroyce have you worked on this bug ? if
not, let me fix it... thanks


Reply to this email directly or view it on GitHub
#355 (comment).

Yeah, Rodrigo, please go ahead. I'm dealing with some UI bug now.

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

No branches or pull requests

4 participants