Bug 1030174 - blockdev-snapshot-sync/snapshot_blkdev considers file //root/sn1 and file /root/sn1 as different files
blockdev-snapshot-sync/snapshot_blkdev considers file //root/sn1 and file /r...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Jeff Cody
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-13 23:46 EST by Jun Li
Modified: 2013-11-26 14:47 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-26 14:47:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jun Li 2013-11-13 23:46:08 EST
Description of problem:
Host considers //root/sn1 and /root/sn1 as the same file. But blockdev-snapshot-sync/snapshot_blkdev considers //root/sn1 and /root/sn1 as different files. So blockdev-snapshot-sync/snapshot_blkdev will rewrite  file /root/sn1, then qemu-kvm can not do blockdev-snapshot-sync/snapshot_blkdev.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-1.5.3-19.el7.x86_64
3.10.0-48.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot qemu with following cli.
<cli>:
# /usr/libexec/qemu-kvm -S -M pc-i440fx-rhel7.0.0 -cpu SandyBridge -enable-kvm -m 4G -smp 4,sockets=2,cores=2,threads=1 -name juli -uuid 355a2475-4e03-4cdd-bf7b-5d6a59edaa68 -rtc base=localtime,clock=host,driftfix=slew \
-device virtio-scsi-pci,bus=pci.0,addr=0x5,id=scsi0 -drive file=iscsi://10.66.6.82:3260/iqn.2013-11.com.example:storage.disk1.juli.xyz/1,if=none,id=drive-scsi0-0-0,media=disk,cache=none,format=qcow2,werror=stop,rerror=stop,aio=native  -device scsi-hd,drive=drive-scsi0-0-0,bus=scsi0.0,scsi-id=0,lun=0,id=juli,bootindex=0 \
-drive file=iscsi://10.66.6.82:3260/iqn.2013-11.com.example:storage.disk1.juli.xyz/3,if=none,id=drive-virtio0-0-0,media=disk,werror=stop,rerror=stop,cache=none,format=qcow2 \
-device virtio-blk-pci,bus=pci.0,drive=drive-virtio0-0-0,id=virtio0-0-0 \
-drive file=/home/ISO/en_windows_8.1_preview_x86_dvd_2358833.iso,if=none,media=cdrom,format=raw,aio=native,id=drive-ide1-0-0 -device ide-drive,drive=drive-ide1-0-0,id=ide1-0-0,bus=ide.0,unit=0,bootindex=4 -device virtio-balloon-pci,id=ballooning -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -net none -k en-us -boot menu=on,reboot-timeout=-1,strict=on -qmp tcp:0:4477,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :3 -spice port=5939,disable-ticketing  -vga qxl -global qxl-vga.revision=3 -monitor stdio -monitor tcp:0:7777,server,nowait -monitor unix:/tmp/monitor1,server,nowait \
-netdev tap,id=tap1,vhost=on,queues=4,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,ifname=tap-juli \
-device virtio-net-pci,netdev=tap1,id=nic1,mq=on,vectors=17,mac=1a:59:0a:4b:aa:94

2.create snapshot via qmp just like the followings:
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-scsi0-0-0", "snapshot-file": "/root/sn1", "format": "qcow2" } }
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-scsi0-0-0", "snapshot-file": "//root/sn1", "format": "qcow2" } }

3.create a new snapshot via qmp, check the return value.
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-scsi0-0-0", "snapshot-file": "//root/sn2", "format": "qcow2" } }


Actual results:
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-scsi0-0-0", "snapshot-file": "//root/sn2", "format": "qcow2" } }
{"error": {"class": "GenericError", "desc": "Could not open '//root/sn1': Could not set AIO state: Too many open files: Too many open files"}}

Expected results:
blockdev-snapshot-sync/snapshot_blkdev should consider //root/sn1 and /root/sn1 as the same files. Do not rewrite file /root/sn1.

Additional info:
Comment 2 Ademar Reis 2013-11-26 14:47:58 EST
Corner case, libvirt will prevent it from happening and there's no consensus upstream. Closing it as WONTFIX.

BTW, qemu-kvm direct usage won't be supported in RHEL7.

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