RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 876024 - fail to prompt 'No such file or directory' when create live snapshot to a non-existing block device
Summary: fail to prompt 'No such file or directory' when create live snapshot to a non...
Keywords:
Status: CLOSED DUPLICATE of bug 877240
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jeff Cody
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-13 05:13 UTC by Sibiao Luo
Modified: 2012-11-27 16:13 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-27 16:13:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2012-11-13 05:13:22 UTC
Description of problem:
boot a guest with a data disk (lv block device), and create live snapshot to a unexisting block device, but fail to prompt 'No such file or directory'.
btw, if specify the local file, it can give the prompt correctly.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev
2.6.32-340.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.334.el6.x86_64
guest info:
# uname -r
2.6.32-340.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot a guest with a data disk(lv block device).
# lvscan 
  ACTIVE            '/dev/vg_sluo_live_snapshot/lv-luo-live-snapshot-system' [10.00 GiB] inherit
  ACTIVE            '/dev/vg_sluo_live_snapshot/sluo-base' [2.00 GiB] inherit
eg:...-drive file=/dev/vg_sluo_live_snapshot/sluo-base,if=none,id=data-scsi-disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi1,addr=0x7 -device scsi-hd,scsi-id=0,lun=0,bus=scsi1.0,drive=data-scsi-disk,id=data-disk
2.make live snapshot with the data disk to a unexisting block device.
QMP monitor:
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "data-scsi-disk", "snapshot-file": "/dev/vg_sluo_live_snapshot/test", "format": "qcow2" } }
HMP monitor:
(qemu) snapshot_blkdev data-scsi-disk /dev/vg_sluo_live_snapshot/test qcow2

Actual results:
after step 2,
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "data-scsi-disk", "snapshot-file": "/dev/vg_sluo_live_snapshot/test", "format": "qcow2" } }
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/dev/vg_sluo_live_snapshot/test': Invalid argument", "data": {"filename": "/dev/vg_sluo_live_snapshot/test", "__com.redhat_error_message": "Invalid argument"}}}
(qemu) snapshot_blkdev data-scsi-disk /dev/vg_sluo_live_snapshot/test qcow2
Formatting '/dev/vg_sluo_live_snapshot/test', fmt=qcow2 size=2147483648 backing_file='/dev/vg_sluo_live_snapshot/sluo-snap1' backing_fmt='qcow2' encryption=off cluster_size=65536 
Could not open '/dev/vg_sluo_live_snapshot/test': Invalid argument

Expected results:
it should prompt 'No such file or directory', like:
QMP monitor:
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "data-scsi-disk", "snapshot-file": "/dev/vg_sluo_live_snapshot/test", "format": "qcow2" } }
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/dev/vg_sluo_live_snapshot/test': No such file or directory", "data": {"filename": "/dev/vg_sluo_live_snapshot/test", "__com.redhat_error_message": "No such file or directory"}}}
HMP monitor:
(qemu) snapshot_blkdev data-scsi-disk /dev/vg_sluo_live_snapshot/test qcow2
Formatting '/dev/vg_sluo_live_snapshot/test', fmt=qcow2 size=2147483648 backing_file='/dev/vg_sluo_live_snapshot/sluo-snap1' backing_fmt='qcow2' encryption=off cluster_size=65536 
/dev/vg_sluo_live_snapshot/test: error while creating qcow2: No such file or directory
Could not open '/dev/vg_sluo_live_snapshot/test': Invalid argument

Additional info:
btw, if specify the local file, it can give the prompt correctly.
QMP monitor:
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "data-scsi-disk", "snapshot-file": "/test/sluo", "format": "qcow2" } }
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/test/sluo': No such file or directory", "data": {"filename": "/test/sluo", "__com.redhat_error_message": "No such file or directory"}}} 
HMP monitor:
(qemu) snapshot_blkdev data-scsi-disk /test/sluo qcow2
Formatting '/test/sluo', fmt=qcow2 size=2147483648 backing_file='/dev/vg_sluo_live_snapshot/sluo-snap1' backing_fmt='qcow2' encryption=off cluster_size=65536 
/test/sluo: error while creating qcow2: No such file or directory
Could not open '/test/sluo': No such file or directory

Comment 2 Sibiao Luo 2012-11-16 02:36:19 UTC
(In reply to comment #0)
> Description of problem:
> boot a guest with a data disk (lv block device), and create live snapshot to
> a unexisting block device, but fail to prompt 'No such file or directory'.
> btw, if specify the local file, it can give the prompt correctly.
> 
> Expected results:
> it should prompt 'No such file or directory', like:
> QMP monitor:
> { "execute": "blockdev-snapshot-sync", "arguments": { "device":
> "data-scsi-disk", "snapshot-file": "/dev/vg_sluo_live_snapshot/test",
> "format": "qcow2" } }
> {"error": {"class": "OpenFileFailed", "desc": "Could not open
> '/dev/vg_sluo_live_snapshot/test': No such file or directory", "data":
> {"filename": "/dev/vg_sluo_live_snapshot/test",
> "__com.redhat_error_message": "No such file or directory"}}}

The most important thing to check is the more complete 'desc' key. It's very important that add the errno string (as returned by strerror()) and the errno value to OPenFileFailed's error message. please correct me if any error & thx.

Best Regards.
sluo

Comment 3 Jeff Cody 2012-11-27 16:13:02 UTC
I think this is a dupe of bug #877240

*** This bug has been marked as a duplicate of bug 877240 ***


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