[virt-tools-list] [virt-manager PATCH] diskbackend: make sure path existed before checking vol info
chenhanxiao at cn.fujitsu.com
chenhanxiao at cn.fujitsu.com
Fri Jun 13 09:33:38 UTC 2014
> -----Original Message-----
> From: Giuseppe Scrivano [mailto:gscrivan at redhat.com]
> Sent: Friday, June 13, 2014 5:24 PM
> To: Chen, Hanxiao/陈 晗霄
> Cc: virt-tools-list at redhat.com
> Subject: Re: [virt-tools-list] [virt-manager PATCH] diskbackend: make sure path
> existed before checking vol info
>
> Chen Hanxiao <chenhanxiao at cn.fujitsu.com> writes:
>
> > https://bugzilla.redhat.com/show_bug.cgi?id=1108922
> >
> > Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> > ---
> > virtinst/diskbackend.py | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py
> > index 5f72d00..5725e1f 100644
> > --- a/virtinst/diskbackend.py
> > +++ b/virtinst/diskbackend.py
> > @@ -65,7 +65,8 @@ def check_if_path_managed(conn, path):
> > def lookup_vol_by_path():
> > try:
> > vol = conn.storageVolLookupByPath(path)
> > - vol.info()
> > + if os.path.exists(vol.path()):
> > + vol.info()
>
> I think that "check_if_path_managed" is used also in the case of a
> remote connection so os.path.exists is not correct as it checks for a
> local file.
>
>
> > return vol, None
> > except libvirt.libvirtError, e:
> > if (hasattr(libvirt, "VIR_ERR_NO_STORAGE_VOL")
>
> I have tried several times by using a similar command line as in the bug
> report but I wasn't able to reproduce the problem here (both
> virt-install-1.0.1-3.fc20.noarch and upstream version), what arguments
> did you feed to virt-install to get this failure?
>
a) mkdir -p /home/rjones/d/libguestfs/builder/website/
b) ./virt-install --connect qemu:///system --virt-type kvm --name demo --memory 500 --cdrom /home/ISO/Fedora-20-x86_64-DVD.iso --os-variant fedora20 --disk /home/rjones/d/libguestfs/builder/website/fedora-20,size=6
c) run and run again.
> Thanks,
> Giuseppe
More information about the virt-tools-list
mailing list