Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1357814 - The name of QMP'parameter for chardev_add is not consistency with cli's
Summary: The name of QMP'parameter for chardev_add is not consistency with cli's
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: All
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-19 09:29 UTC by Min Deng
Modified: 2016-07-22 08:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-21 10:14:09 UTC


Attachments (Terms of Use)

Description Min Deng 2016-07-19 09:29:09 UTC
Description of problem:
The name of QMP'parameter for charddev_add is not consistency with cli's

Version-Release number of selected component (if applicable):
kernel-3.10.0-470.el7.ppc64le.rpm
qemu-kvm-rhev-2.6.0-13.el7.ppc64le
How reproducible:
always

Steps to Reproduce:
0.boot up guest with the 
  -chardev socket,id=channel0,path=/tmp/port0,server,nowait...
1.hot plug a new chardev with socket backend
  a.{"execute":"chardev-add","arguments":{'id': 'manual', 'backend': {'data': {'nowait': true, 'addr': {'data': {'path': '/tmp/33'}, 'type': 'unix'},'server': true}, 'type': 'socket'}}}
  b.{"execute":"chardev-add","arguments":{'id': 'manual', 'backend': {'data': {'wait': false, 'addr': {'data': {'path': '/tmp/33'}, 'type': 'unix'},'server': true}, 'type': 'socket'}}}
2.
3.

Actual results:
a command will fail because of the following error
{"error": {"class": "GenericError", "desc": "QMP input object member 'nowait' is unexpected"}}
b command worked well as QE changed "nowait" with "true" to "wait" with "false"

Expected results:
We had better keep cli's and QMP object'name are the same.
Currently,
"nowait" is for cli
"wait" is for QMP


Additional info:

Comment 2 Ademar Reis 2016-07-19 16:37:34 UTC
QMP is not supported in RHEL, so we could close this BZ. But I'm reassigning to Markus for him to decide what to do, as he's the upstream maintainer of QMP.

Comment 3 Markus Armbruster 2016-07-21 10:14:09 UTC
Correction: *HMP* is not supported in RHEL, QMP is.

As to the bug report: I'm afraid you got deceived by HMP's syntactic
sugar.  The parameter name is actually "wait" both in QMP and HMP.
QMP's "wait": false is "wait=off" in HMP.  However, in HMP, "nowait"
is sugar for "wait=off".

Thus, there's no inconsistency, only sugar, and confusion caused by
it.  Closing NOTABUG.

In my personal opinion, there's too much syntactic sugar in HMP and
the command line.  But once it's there, you can't remove it.

Comment 4 Min Deng 2016-07-22 07:57:46 UTC
(In reply to Markus Armbruster from comment #3)
> Correction: *HMP* is not supported in RHEL, QMP is.
> 
> As to the bug report: I'm afraid you got deceived by HMP's syntactic
> sugar.  The parameter name is actually "wait" both in QMP and HMP.
> QMP's "wait": false is "wait=off" in HMP.  However, in HMP, "nowait"
> is sugar for "wait=off".
> 
> Thus, there's no inconsistency, only sugar, and confusion caused by
> it.  Closing NOTABUG.
> 
> In my personal opinion, there's too much syntactic sugar in HMP and
> the command line.  But once it's there, you can't remove it.

  Thanks for your reply but it is still an issue because of such an inconsistency.It is more suitable for closing it as WONTFIX if developer do have plan to fix it.Many thanks !

Comment 5 Markus Armbruster 2016-07-22 08:24:09 UTC
It's definitely NOTABUG, because #1 it works as designed (the fact that neither you nor me like it doesn't matter), and #2 there's no way this is going to get changed upstream.


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