qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Clarify error messages pertaining to 'node-name'
@ 2021-03-01 23:36 Connor Kuehl
  2021-03-01 23:36 ` [PATCH 1/2] block: " Connor Kuehl
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Connor Kuehl @ 2021-03-01 23:36 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, armbru, qemu-devel, mreitz

Some error messages contain ambiguous representations of the 'node-name'
parameter. This can be particularly confusing when exchanging QMP
messages (C = client, S = server):

C: {"execute": "block_resize", "arguments": { "device": "my_file", "size": 26843545600 }}
S: {"error": {"class": "GenericError", "desc": "Cannot find device=my_file nor node_name="}}
                                                                               ^^^^^^^^^

This error message suggests one could send a message with a key called
'node_name':

C: {"execute": "block_resize", "arguments": { "node_name": "my_file", "size": 26843545600 }}
                                               ^^^^^^^^^

but using the underscore is actually incorrect, the parameter should be
'node-name':

S: {"error": {"class": "GenericError", "desc": "Parameter 'node_name' is unexpected"}}

This behavior was uncovered in bz1651437[1], but I ended up going down a
rabbit hole looking for other areas where this miscommunication might
occur and changing those accordingly as well.

[1] https://bugzilla.redhat.com/1651437

Connor Kuehl (2):
  block: Clarify error messages pertaining to 'node-name'
  blockdev: Clarify error messages pertaining to 'node-name'

 block.c                    |  8 ++++----
 blockdev.c                 | 13 +++++++------
 tests/qemu-iotests/040     |  4 ++--
 tests/qemu-iotests/249.out |  2 +-
 4 files changed, 14 insertions(+), 13 deletions(-)

-- 
2.29.2



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-03 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-01 23:36 [PATCH 0/2] Clarify error messages pertaining to 'node-name' Connor Kuehl
2021-03-01 23:36 ` [PATCH 1/2] block: " Connor Kuehl
2021-03-01 23:36 ` [PATCH 2/2] blockdev: " Connor Kuehl
2021-03-03  9:53 ` [PATCH 0/2] " Kevin Wolf
2021-03-03 13:48   ` Connor Kuehl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).