[Pkg-libvirt-maintainers] Bug#748120: Bug#748120: Improper device checking with virt-clone on LVM
Guido Günther
agx at sigxcpu.org
Wed May 14 15:57:27 UTC 2014
Hi,
On Wed, May 14, 2014 at 03:52:47PM +0200, Kwadronaut-debian wrote:
> Package: virtinst
> Version: 0.600.1-3+deb7u1
> Severity: normal
> Tags: patch
>
> Cloning into existing storage volumes is supposedly not supported.
> #706196 marks this as a regression and #745873 as a wishlist item. In
> old-stable it worked, so I feel that calling it a regression is
> correct.
You shouldn't open new reports then.
>
> When looking at what spit out this error, it seemed to me that the check
> is too simplistic and I can actually clone into existing storage
> volumes, if referenced differently:
> virsh pool-dumpxml vg01
>
> <pool type='logical'>
> <name>vg01</name>
> <uuid>2ae3ae6c-7aa0-f7db-f771-183406d653ee</uuid>
> <capacity unit='bytes'>560598089728</capacity>
> <allocation unit='bytes'>157655498752</allocation>
> <available unit='bytes'>402942590976</available>
> <source>
> <device path='/dev/block/104:3'/>
> <name>vg01</name>
> <format type='lvm2'/>
> </source>
> <target>
> <path>/dev/vg01</path>
> <permissions>
> <mode>0700</mode>
> <owner>4294967295</owner>
> <group>4294967295</group>
> </permissions>
> </target>
> </pool>
>
> root at cheetah:/tmp/tmp.oCzq69YIdx# virt-clone -o leap-baseimage -f
> /dev/vg01/review-root -n test
> ERROR Clone onto existing storage volume is not supported:
> '/dev/vg01/review-root'
>
> root at cheetah:/tmp/tmp.oCzq69YIdx# virt-clone -o leap-baseimage -f
> /dev/mapper/vg01-review--root -n test
> Cloning vg01-leap--baseimage
>
> | 10 GB 00:05
>
> Clone 'test' created successfully.
>
> I liked that success, but in both cases it was actually writing to the
> same place:
> root at cheetah:/usr/share/pyshared/virtinst# readlink
> /dev/mapper/vg01-review--root
> ../dm-0
> root at cheetah:/usr/share/pyshared/virtinst# readlink /dev/vg01/review-root
> ../dm-0
> Why this happens? The answer is in CloneManager.py:
> 474 if clone_disk.vol_object:
> 475 # XXX We could do this with vol upload I think
> 476 raise RuntimeError(
> 477 _("Clone onto existing storage volume is not "
> 478 "supported: '%s'") % clone_disk.path)
>
> For both me and #706196 this is sort of fixed upstream when it are local
> storage pools:
> https://git.fedorahosted.org/cgit/virt-manager.git/tree/virtinst/CloneManager.py?id=v0.10.0
> Virt-inst is now merged in virt-manager. With attached patch (which
> comes from upstream) I'm happy. I don't know if this patch should get
> into backports or the other 2 bugs can be closed because of this and/or
> upstream changes, an explanation of bug-flow would be welcome.
Backports would mean backporting the whole virt-manager 1.0 so we can
only onsider a update via a point update. This would mean we need to
fix it in unstable first which we should do by bringing virt-manager
1.0 into sid (currently only in experimental). I try to find the time
to finally package 1.0 (instead of a git snapshot).
Cheers,
-- Guido
More information about the Pkg-libvirt-maintainers
mailing list