FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 11-23-2007, 01:36 PM
"Richard W.M. Jones"
 
Default virt-clone bug

Richard W.M. Jones wrote:
The Debian maintainer of virt-install found this problem which seems to
be a bug in virt-clone:


# virt-clone -o demo -n demo2 --connect=qemu:///session -f bla2.img
libvir: QEMU error :
libvir: QEMU error :
Cloning from /home/foo/kvm/test/bla.img to bla2.img
ERROR: local variable 'b' referenced before assignment


Judging from the error message, I'm guessing that it happens at the line
I've marked below (in virtinst/CloneManager.py):


while 1:
l = os.read(src_fd, design.clone_bs)
s = len(l)
if s == 0:
meter.end(size)
break
# check sequence of zeros
if sparse_copy_mode == True and zeros == l:
os.lseek(dst_fd, s, 1)
else:
b = os.write(dst_fd, l)
if s != b: <--------
meter.end(i)
break
i += s
if i < size:
meter.update(i)

It's a very strange piece of code. AIUI it seems to be saying that if
we get a short write, then we should just end the copy without any sort
of error indication, which can't be the right thing to do.


Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 05:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org