Bug 596015 - virt-v2v | didn't umount the export domain after convert finished
Summary: virt-v2v | didn't umount the export domain after convert finished
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-v2v
Version: 5.7
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Matthew Booth
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-26 06:36 UTC by Mohua Li
Modified: 2013-04-30 23:13 UTC (History)
8 users (show)

Fixed In Version: virt-v2v-0.6.1-1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-27 19:47:50 UTC
Target Upstream Version:


Attachments (Terms of Use)
log with libguestfs_trace=1 (6.22 MB, text/plain)
2010-06-04 03:47 UTC, Mohua Li
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0566 0 normal SHIPPED_LIVE virt-v2v bug fix update 2010-07-27 19:47:38 UTC

Description Mohua Li 2010-05-26 06:36:57 UTC
Description of problem:
virt-v2v | didn't umount the export domain after convert finished


before conversion,


[root@dhcp-66-70-148 v2v]# mount

/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
10.66.90.115:/vol/v2vrwu/rwuv2v on /mnt/iscsi type nfs (rw,addr=10.66.90.115)
10.66.70.129:/virt-v2v/v2v-convert on /mnt/kvm-xen type nfs (rw,addr=10.66.70.129)
/dev/sdb1 on /media/disk type ext3 (rw,noexec,nosuid,nodev)


after conversion,


[root@dhcp-66-70-148 ~]# mount

/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/JUrjXt6ZGU type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v on /mnt/iscsi type nfs (rw,addr=10.66.90.115)
10.66.70.129:/virt-v2v/v2v-convert on /mnt/kvm-xen type nfs (rw,addr=10.66.70.129)
10.66.90.115:/vol/v2vrwu/rwuv2v/ on /tmp/KifAvP7RrS type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v/ on /tmp/hUlJoBvp1V type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v/ on /tmp/ea2462N2vu type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v/ on /tmp/yJAZQqMtuj type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v/ on /tmp/aDHKhhcWJB type nfs (rw,addr=10.66.90.115)
/dev/sdb1 on /media/disk type ext3 (rw,noexec,nosuid,nodev)

Version-Release number of selected component (if applicable):


How reproducible:
sometimes,

Steps to Reproduce:
1.convert the guest with below command,
echo $export 
10.66.90.115:/vol/v2vrwu/rwuv2v/

virt-v2v -f $config  -ic xen:///system -o rhev -osd  $export  rhel3u9-32b-hv-raw-intel

2. after convert finished, check mount,

3.
  
Actual results:
didn't umount the export domain, 

Expected results:
umount the export domain after convert finished,

Additional info:

Comment 1 Mohua Li 2010-06-04 03:45:47 UTC
virt-v2v-0.6.0.3

after convert finished, the export won't be umounted, although there is no any unmount error in convert process, detail pls see the log with LIBGUESTFS_TRACE=1 on, 

[root@dhcp-66-70-148 v2v]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
10.66.90.115:/vol/v2vrwu/rwuv2v on /mnt/iscsi type nfs (rw,addr=10.66.90.115)
10.66.70.129:/virt-v2v/v2v-convert on /mnt/kvm-xen type nfs (rw,addr=10.66.70.129)
/dev/sdb1 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
10.66.90.115:/vol/iso/isotree on /mnt/iso type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vwulinglu/wulingluv2v/export on /mnt/v2v/nfs type nfs (rw,addr=10.66.90.115)
/mnt/v2v/test.img on /mnt/img type ext3 (rw,loop=/dev/loop0,offset=32256)
10.66.90.115:/vol/v2vwulinglu/wulingluv2v/fcp_export on /tmp/GVnRVFI7VN type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/CPIwDrfozv type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/r0TgwKMrDl type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/0UVv4MFefG type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/TYO2IqD6VZ type nfs (rw,addr=10.66.90.115)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/baBknnJjVM type nfs (rw,addr=10.66.90.115)

Comment 2 Mohua Li 2010-06-04 03:47:07 UTC
Created attachment 421111 [details]
log with libguestfs_trace=1

Comment 3 Matthew Booth 2010-06-08 15:20:36 UTC
Fix posted: https://www.redhat.com/archives/libguestfs/2010-June/msg00065.html

Comment 4 Matthew Booth 2010-06-08 17:34:07 UTC
Fixed in 0.6.0-4.el5

Comment 5 Matthew Booth 2010-06-09 08:57:20 UTC
Just noticed that there's still a failure if a user does Ctrl-C during conversion, rather than transfer.

Comment 6 Matthew Booth 2010-06-09 09:42:43 UTC
Fixed in 0.6.0-5.el5

Comment 7 Mohua Li 2010-06-09 12:55:11 UTC
test on virt-v2v-0.6.0-5.el5, check 3 scenario, notice the third scenario fail,and the guest is not register to the rhn,  modify the pv guest by local software,  


1), quit the convert when transferring the image, pass
2), quit the convert during conversion, pass
3), check the mount after convert finished successfully, fail 


1,quit the convert when transferring the image,

[root@dhcp-66-70-76 /]# ps -ef | grep v2v
root     23227  1890  2 19:39 pts/5    00:00:08 /usr/bin/perl /usr/bin/virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd 10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
36       23240 23227  0 19:39 pts/5    00:00:01 dd obs 2097152 oflag direct of /tmp/byqhQwFeBo/5c2ed18c-3d03-4261-a146-b086883c8c37/v2v.EVSiecXm/df913d3c-7bd6-4b00-8f29-bfd59340e892/ee0f0967-0079-47d5-b0c3-d84821d99135
root     23287  4705  0 19:45 pts/1    00:00:00 grep v2v


before quit,
[root@dhcp-66-70-76 /]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
none on /var/lib/xenstored type tmpfs (rw)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/byqhQwFeBo  type nfs (rw,addr=10.66.90.115)

after quit,

[root@dhcp-66-70-76 v2v]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
none on /var/lib/xenstored type tmpfs (rw)



2) quit the convert process during conversion,

[root@dhcp-66-70-76 5c2ed18c-3d03-4261-a146-b086883c8c37]# ps -ef | grep v2v
root     23227  1890  2 19:39 pts/5    00:00:12 /usr/bin/perl /usr/bin/virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd 10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
36       23341 23227 54 19:47 pts/5    00:00:23 /usr/libexec/qemu-kvm -drive file=/tmp/GuteyKoTyG/5c2ed18c-3d03-4261-a146-b086883c8c37/v2v.EVSiecXm/df913d3c-7bd6-4b00-8f29-bfd59340e892/ee0f0967-0079-47d5-b0c3-d84821d99135,cache=off,if=ide -drive file=/var/lib/virt-v2v/transfer.iso,snapshot=on,if=ide -nographic -serial stdio -m 500 -no-reboot -no-hpet -rtc-td-hack -net user,vlan=0,ip=169.254.2.0 -net nic,model=virtio,vlan=0 -kernel /tmp/libguestfsPIAG5h/kernel -initrd /tmp/libguestfsPIAG5h/initrd -append panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_vmchannel=tcp:169.254.2.2:48367  TERM=xterm 
36       23342 23227  0 19:47 pts/5    00:00:00 /usr/bin/perl /usr/bin/virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd 10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel

before 

before quit,
[root@dhcp-66-70-76 /]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
none on /var/lib/xenstored type tmpfs (rw)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/GuteyKoTyG type nfs (rw,addr=10.66.90.115)

after quit,

[root@dhcp-66-70-76 v2v]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
none on /var/lib/xenstored type tmpfs (rw)



3),convert finished successfully, could unmount the export domain successfully, 

during the conversion,

[root@dhcp-66-70-76 /]# ps -ef | grep v2v
root     23365  1890  0 19:51 pts/5    00:00:11 /usr/bin/perl /usr/bin/virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd 10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
36       23432 23365 34 20:07 pts/5    00:01:38 /usr/libexec/qemu-kvm -drive file=/tmp/Rb2XhfsD3k/5c2ed18c-3d03-4261-a146-b086883c8c37/v2v.kqkmUttj/2d425d39-3b9f-47b6-a349-60dc1ad18bc4/65ea89aa-a6d7-467f-8779-bdc87d374db1,cache=off,if=ide -drive file=/var/lib/virt-v2v/transfer.iso,snapshot=on,if=ide -nographic -serial stdio -m 500 -no-reboot -no-hpet -rtc-td-hack -net user,vlan=0,ip=169.254.2.0 -net nic,model=virtio,vlan=0 -kernel /tmp/libguestfs9faxk4/kernel -initrd /tmp/libguestfs9faxk4/initrd -append panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_vmchannel=tcp:169.254.2.2:45662  TERM=xterm 
36       23433 23365  0 20:07 pts/5    00:00:00 /usr/bin/perl /usr/bin/virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd 10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
root     23446  4705  0 20:12 pts/1    00:00:00 grep v2v
[root@dhcp-66-70-76 /]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
none on /var/lib/xenstored type tmpfs (rw)
10.66.90.115:/vol/v2vrwu/rwuv2v on /tmp/Rb2XhfsD3k type nfs (rw,addr=10.66.90.115)
[root@dhcp-66-70-76 /]# 


after the conversion,

[root@dhcp-66-70-76 v2v]# virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd  10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
virt-v2v: WARNING: No mapping found for bridge interface xenbr1 in config file. The converted guest may not start until its network interface is updated.
virt-v2v: rhel5u4-64b-pv-raw-intel configured with virtio drivers
virt-v2v: Failed to unmount 10.66.90.115:/vol/v2vrwu/rwuv2v. Command exited with status 1. Output was: umount: /tmp/Rb2XhfsD3k: device is busy
umount: /tmp/Rb2XhfsD3k: device is busy

virt-v2v: Failed to remove mount directory /tmp/Rb2XhfsD3k: Device or resource busy
	(in cleanup) umount: /transferO0k0Tk: umount: /sysroot/transferO0k0Tk: not found at /usr/lib/perl5/vendor_perl/5.8.8/Sys/VirtV2V/Config.pm line 508.


but manually unmount the directory successfully, and i could reproduce this error, 

umount /tmp/Rb2XhfsD3k

Comment 8 Matthew Booth 2010-06-09 16:40:14 UTC
A fix for the above is in 0.6.0-6

Comment 9 Mohua Li 2010-06-10 03:01:04 UTC
test on virt-v2v-0.6.0-6, with pv guest didn't register to the rhn,notice the first, third scenario pass, but the second fail, 

3),after convert success, 

[root@dhcp-66-70-76 etc]# virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd  10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
virt-v2v: rhel5u4-64b-pv-raw-intel configured with virtio drivers

check with mount ,umount successfully, 

2), quit during conversion,


[root@dhcp-66-70-76 ~]# ps -ef | grep v2v
root      8062  4505  3 10:46 pts/1    00:00:12 /usr/bin/perl /usr/bin/virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd 10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
36        8095  8062 41 10:51 pts/1    00:00:21 /usr/libexec/qemu-kvm -drive file=/tmp/QXtYztHvcn/5c2ed18c-3d03-4261-a146-b086883c8c37/v2v.ibniAMMz/410cf476-e12b-4de9-a7a0-06e0402e7a06/cc43dc93-2bbd-4a81-a9fc-cb9107e55686,cache=off,if=ide -drive file=/var/lib/virt-v2v/transfer.iso,snapshot=on,if=ide -nographic -serial stdio -m 500 -no-reboot -no-hpet -rtc-td-hack -net user,vlan=0,ip=169.254.2.0 -net nic,model=virtio,vlan=0 -kernel /tmp/libguestfshyJzFl/kernel -initrd /tmp/libguestfshyJzFl/initrd -append panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_vmchannel=tcp:169.254.2.2:58679  TERM=xterm
36        8096  8062  0 10:51 pts/1    00:00:00 /usr/bin/perl /usr/bin/virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd 10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
root      8102  7842  0 10:52 pts/3    00:00:00 grep v2v



at this time, quit with ctrl+c,

[root@dhcp-66-70-76 vms]# virt-v2v -f /etc/virt-v2v.conf -ic xen:///system -o rhev -osd  10.66.90.115:/vol/v2vrwu/rwuv2v rhel5u4-64b-pv-raw-intel
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
virt-v2v: Error cleaning up guest handle: guestfs_umount_all: call launch before using this function
(in guestfish, don't forget to use the 'run' command) at /usr/bin/virt-v2v line 443.

virt-v2v: Failed to unmount 10.66.90.115:/vol/v2vrwu/rwuv2v. Command exited with status 1. Output was: umount: /tmp/QXtYztHvcn: device is busy
umount: /tmp/QXtYztHvcn: device is busy

virt-v2v: Failed to remove mount directory /tmp/QXtYztHvcn: Device or resource busy



also the temp directory during conversion it not cleared,

[root@dhcp-66-70-76 ~]# ls /mnt/iscsi/5c2ed18c-3d03-4261-a146-b086883c8c37/
dom_md  images  master  v2v.ibniAMMz


manually try to umount /tmp/QXtYztHvcn, success,

[root@dhcp-66-70-76 vms]# umount /tmp/QXtYztHvcn

Comment 11 Mohua Li 2010-07-16 09:32:51 UTC
test on 

libguestfs-1.2.7-1.el5.6
virt-v2v-0.6.1-1.el5



1), quit the convert when transferring the image, umount successfully,pass
2), quit the convert during conversion, umount successfully,pass
3), check the mount after convert finished successfully,umount successfully, pass

so set the status to verified,

Comment 13 errata-xmlrpc 2010-07-27 19:47:50 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0566.html


Note You need to log in before you can comment on or make changes to this bug.