Bug 655719 - no error pops when change cd to non-exist file
Summary: no error pops when change cd to non-exist file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Luiz Capitulino
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
 
Reported: 2010-11-22 09:43 UTC by Shirley Zhou
Modified: 2015-03-05 00:52 UTC (History)
7 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.163.el6
Doc Type: Bug Fix
Doc Text:
Cause: The monitor's "change" command didn't return error information when opening a file failed. Consequence: The user would get a "undefined error" or no error message when trying to use the "change" command to change or insert a non-existent file into the VM's CDROM drive. Fix: Fix the "change" command to return error information. Result: Now the user gets a proper error message
Clone Of:
Environment:
Last Closed: 2011-12-06 15:43:48 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1531 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2011-12-06 01:23:30 UTC

Description Shirley Zhou 2010-11-22 09:43:21 UTC
Description of problem:

when change cd to a non-exist file, no error happens.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.120.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create one images test1.img 
2. Start qemu with -cdrom test1.img 
3. In the qemu monitor enter 'change ide1-cd0 nofile'

note: "nofile" is not exist. 

  
Actual results:
no error pops, and command execute ok.

Expected results:
Because file is not exist, there should be error happens, like "Could not open 'nofile'"

Additional info:

Comment 8 Luiz Capitulino 2011-06-01 17:01:00 UTC
Shirley,

Just a note: while I appreciate your testing & report, the real reason this BZ is being fixed is that it also affects QMP, otherwise it wouldn't be fixed, because the user monitor is not supported.

I recommend to always test monitor related bugs against QMP.

Thanks.

Comment 10 Qunfang Zhang 2011-07-21 09:29:48 UTC
Can reproduce on qemu-kvm-0.12.1.2-2.160.el6.

(qemu) change ide1-cd0 /non-exsiting-file
(qemu)

{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"change","arguments":{"device":"ide1-cd0","target":"/non-exsiting-file"}} 
{"error": {"class": "UndefinedError", "desc": "An undefined error has ocurred", "data": {}}}


Re-test on qemu-kvm-0.12.1.2-2.171.el6, this issue doesn't exist.

(qemu) change ide1-cd0 /aaa
Could not open '/aaa'

{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"change","arguments":{"device":"ide1-cd0","target":"/aaa"}}
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/aaa'", "data": {"filename": "/aaa"}}}

Comment 13 Luiz Capitulino 2011-11-18 13:03:19 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: QMP's "change" command didn't return error information when opening a file failed.
Consequence: A QMP user would get a "undefined error" when trying to use the "change" command to change or insert a non-existent file into the VM's CDROM drive.
Fix: Fix the "change" command to return error information.
Result: Now the user gets a proper error message instead of "undefined error"

Comment 14 Luiz Capitulino 2011-11-18 13:21:58 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1,4 @@
-Cause: QMP's "change" command didn't return error information when opening a file failed.
-Consequence: A QMP user would get a "undefined error" when trying to use the "change" command to change or insert a non-existent file into the VM's CDROM drive.
+Cause: The monitor's "change" command didn't return error information when opening a file failed.
+Consequence: The user would get a "undefined error" or no error message when trying to use the "change" command to change or insert a non-existent file into the VM's CDROM drive.
 Fix: Fix the "change" command to return error information.
-Result: Now the user gets a proper error message instead of "undefined error"+Result: Now the user gets a proper error message

Comment 15 errata-xmlrpc 2011-12-06 15:43:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1531.html


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