qmp commands get rejected
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc": "The command qom-set has not been found"}}'
It seems that the command mode (qmp_capabilities) gets resets by the welcome banner?
Greets,
Stefan
Quoted 15 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
Quoted 6 lines
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc": "The command qom-set has not been found"}}'
It seems that the command mode (
qmp_capabilities) gets resets by the welcome banner?
It looks like you got disconnected before qom-set was issued.
Can you share more details on how those commands are being issued?
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino <[email protected]>:
Quoted 18 lines
Quoted 15 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
Quoted 8 lines
Quoted 6 lines
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc": "The command qom-set has not been found"}}'
It seems that the command mode (
qmp_capabilities) gets resets by the welcome banner?It looks like you got disconnected before qom-set was issued.
No its the same socket connection. No disconnect had happened.
Quoted 2 lines
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
Stefan
Quoted 27 lines · On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino <[email protected]>:
Quoted 25 lines
Quoted 21 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc": "The command qom-set has not been found"}}'
It seems that the command mode (
qmp_capabilities) gets resets by the welcome banner?
Quoted 8 lines
Quoted 1 line
It looks like you got disconnected before qom-set was issued.
No its the same socket connection. No disconnect had happened.
Quoted 2 lines
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
That perl script maybe? I can't reproduce the problem.
Am 24.05.2013 um 16:02 schrieb Luiz Capitulino <[email protected]>:
Quoted 32 lines
Quoted 29 lines · On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino <[email protected]>:
Quoted 26 lines
Quoted 15 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
Quoted 6 lines
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc": "The command qom-set has not been found"}}'
It seems that the command mode (
qmp_capabilities) gets resets by the welcome banner?It looks like you got disconnected before qom-set was issued.
Quoted 8 lines
Quoted 6 lines
No its the same socket connection. No disconnect had happened.
Quoted 2 lines
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
That perl script maybe? I can't reproduce the problem.
I would try to create a small example script. Am this be due to the fact that I don't wait for the welcome banner right now?
Stefan
Quoted 37 lines · On Fri, 24 May 2013 16:36:26 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 16:02 schrieb Luiz Capitulino <[email protected]>:
Quoted 35 lines
Quoted 32 lines · On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino <[email protected]>:
Quoted 18 lines
Quoted 15 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
Quoted 8 lines
Quoted 6 lines
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc": "The command qom-set has not been found"}}'
It seems that the command mode (
qmp_capabilities) gets resets by the welcome banner?It looks like you got disconnected before qom-set was issued.
No its the same socket connection. No disconnect had happened.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
That perl script maybe? I can't reproduce the problem.
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 1 line
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when you read your first response. But qom-set shouldn't fail because of that.
Hi,
i can easily reproduce this with the following script:
http://pastebin.com/raw.php?i=JYZyJ8Hn
Example output (sometimes it fails for qmp_capabilities and sometimes for qom-set):
[cloud1-1202: ~]# perl sock.pl
{"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} [cloud1-1202: ~]# perl sock.pl
{"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}} {"id": "12125:1", "error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}}
Stefan
Am 24.05.2013 17:21, schrieb Luiz Capitulino:
Quoted 55 lines
Quoted 37 lines · On Fri, 24 May 2013 16:36:26 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 16:02 schrieb Luiz Capitulino <[email protected]>:
Quoted 35 lines
Quoted 32 lines · On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino <[email protected]>:
Quoted 18 lines
Quoted 15 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
Quoted 8 lines
Quoted 6 lines
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc": "The command qom-set has not been found"}}'
It seems that the command mode (
qmp_capabilities) gets resets by the welcome banner?It looks like you got disconnected before qom-set was issued.
No its the same socket connection. No disconnect had happened.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
That perl script maybe? I can't reproduce the problem.
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 1 line
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when you read your first response. But qom-set shouldn't fail because of that.
Quoted 61 lines
Am 24.05.2013 17:21, schrieb Luiz Capitulino:
Quoted 60 lines
Quoted 41 lines · On Fri, 24 May 2013 16:36:26 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 16:02 schrieb Luiz Capitulino <[email protected]>:
Quoted 39 lines
Quoted 36 lines · On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino
<[email protected]>:Quoted 25 lines
Quoted 22 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc":
"The
command qom-set has not been found"}}'Quoted 4 lines
Quoted 2 lines
It seems that the command mode (
qmp_capabilities) gets resets by the welcome banner?It looks like you got disconnected before qom-set was issued.
No its the same socket connection. No disconnect had happened.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
That perl script maybe? I can't reproduce the problem.
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.
I can workaround it by adding this patch:
monitor.c +2 -1
@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); +return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }/*
Stefan
Mit freundlichen Grüßen
Stefan Priebe
Bachelor of Science in Computer Science (BSCS)
Vorstand (CTO)
-------------------------------
Profihost AG
Am Mittelfelde 29
30519 Hannover
Deutschland
Tel.: +49 (511) 5151 8181 | Fax.: +49 (511) 5151 8282
URL: http://www.profihost.com | E-Mail: [email protected]
Sitz der Gesellschaft: Hannover, USt-IdNr. DE813460827
Registergericht: Amtsgericht Hannover, Register-Nr.: HRB 202350
Vorstand: Cristoph Bluhm, Sebastian Bluhm, Stefan Priebe
Aufsichtsrat: Prof. Dr. iur. Winfried Huck (Vorsitzender)
Am 24.05.2013 23:37, schrieb Stefan Priebe:
Quoted 72 lines
Quoted 65 lines
Am 24.05.2013 17:21, schrieb Luiz Capitulino:
Quoted 64 lines
Quoted 44 lines · On Fri, 24 May 2013 16:36:26 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 16:02 schrieb Luiz Capitulino
<[email protected]>:Quoted 41 lines
Quoted 38 lines · On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino
<[email protected]>:Quoted 26 lines
Quoted 23 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc":
"The
command qom-set has not been found"}}'Quoted 5 lines
Quoted 3 lines
It seems that the command mode (
qmp_capabilities) gets resets by the
welcome banner?It looks like you got disconnected before qom-set was issued.
No its the same socket connection. No disconnect had happened.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
That perl script maybe? I can't reproduce the problem.
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +0
-0
monitor.c static int monitor_can_read(void *opaque) · line 4246
Quoted 9 lines
monitor.c +2
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); +return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }/*
It fixes it for the moment... but not in general. Still seeing failing commands...
Stefan
Am 24.05.2013 23:37, schrieb Stefan Priebe:
Quoted 72 lines
Quoted 65 lines
Am 24.05.2013 17:21, schrieb Luiz Capitulino:
Quoted 64 lines
Quoted 44 lines · On Fri, 24 May 2013 16:36:26 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 16:02 schrieb Luiz Capitulino
<[email protected]>:Quoted 41 lines
Quoted 38 lines · On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino
<[email protected]>:Quoted 26 lines
Quoted 23 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc":
"The
command qom-set has not been found"}}'Quoted 5 lines
Quoted 3 lines
It seems that the command mode (
qmp_capabilities) gets resets by the
welcome banner?It looks like you got disconnected before qom-set was issued.
No its the same socket connection. No disconnect had happened.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
That perl script maybe? I can't reproduce the problem.
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +0
-0
monitor.c static int monitor_can_read(void *opaque) · line 4246
Quoted 9 lines
monitor.c +2
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); +return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }/*
It fixes it for the moment... but not in general. Still seeing failing commands...
Stefan
Quoted 68 lines · Stefan Priebe
Quoted 61 lines
Am 24.05.2013 17:21, schrieb Luiz Capitulino:
Quoted 60 lines
Quoted 41 lines · On Fri, 24 May 2013 16:36:26 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 16:02 schrieb Luiz Capitulino <[email protected]>:
Quoted 39 lines
Quoted 36 lines · On Fri, 24 May 2013 15:57:59 +0200 Stefan Priebe - Profihost AG…
Am 24.05.2013 um 15:23 schrieb Luiz Capitulino
<[email protected]>:Quoted 25 lines
Quoted 22 lines · On Fri, 24 May 2013 07:50:33 +0200 Stefan Priebe <[email protected]> wrote:
Hello list,
since upgrading from qemu 1.4.1 to 1.5.0 i've problems with qmp commands.
With Qemu 1.5 i've the following socket communication:
'{"execute":"qmp_capabilities","id":"12125:1","arguments":{}}'
'{"return": {}, "id": "12125:1"}'
'{"execute":"qom-set","id":"12125:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}}'
'{"QMP": {"version": {"qemu": {"micro": 0, "minor": 5, "major": 1}, "package": ""}, "capabilities": []}}'
'{"id": "12125:2", "error": {"class": "CommandNotFound", "desc":
"The
command qom-set has not been found"}}'Quoted 4 lines
Quoted 2 lines
It seems that the command mode (
qmp_capabilities) gets resets by the welcome banner?It looks like you got disconnected before qom-set was issued.
No its the same socket connection. No disconnect had happened.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Can you share more details on how those commands are being issued?
They're send through socket with a perl script. What do you need?
That perl script maybe? I can't reproduce the problem.
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +0
-0
monitor.c static int monitor_can_read(void *opaque) · line 4244
Quoted 7 lines
monitor.c +2
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); +return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }
I think this is unrelated to your original issue. If you issue 'qmp_capabilities' command more than once you will get CommandNotFound, and that behavior seems to be present even with v1.3.0. This patch seems to be masking the problem you're having (which seems to be state from previous monitor sessions/connections leaking into subsequent ones).
It's possible the GSource-based mechanism for handling I/O for chardev backends is causing a difference in behavior. Still not sure exactly what's going on though.
Quoted 5 lines
monitor.c +0
-0/* Stefan
Am 25.05.2013 00:09, schrieb mdroth:
Quoted 22 lines
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +1
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap);
Quoted 8 lines
monitor.c static int monitor_can_read(void *opaque) · line 4244
Quoted 2 lines
monitor.c +1
-0+return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }I think this is unrelated to your original issue. If you issue '
qmp_capabilities' command more than once you will get CommandNotFound, and that behavior seems to be present even with v1.3.0. This patch seems to be masking the problem you're having (which seems to be state from previous monitor sessions/connections leaking into subsequent ones).
That sounds reasonable. I'm using proxmox / PVE which does a lot of qmp queries in the background. So i might see situations where X connections in parallel do qmp queries.
Quoted 3 lines
It's possible the GSource-based mechanism for handling I/O for chardev backends is causing a difference in behavior. Still not sure exactly what's going on though.
Can i revert some patches to test?
Stefan
Quoted 32 lines · Stefan Priebe
Am 25.05.2013 00:09, schrieb mdroth:
Quoted 22 lines
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +1
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); Quoted 8 lines
monitor.c static int monitor_can_read(void *opaque) · line 4244
Quoted 2 lines
monitor.c +1
-0+return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }I think this is unrelated to your original issue. If you issue '
qmp_capabilities' command more than once you will get CommandNotFound, and that behavior seems to be present even with v1.3.0. This patch seems to be masking the problem you're having (which seems to be state from previous monitor sessions/connections leaking into subsequent ones).
Quoted 8 lines
That sounds reasonable. I'm using proxmox / PVE which does a lot of qmp queries in the background. So i might see situations where X connections in parallel do qmp queries.
Quoted 3 lines
It's possible the GSource-based mechanism for handling I/O for chardev backends is causing a difference in behavior. Still not sure exactly what's going on though.
Can i revert some patches to test?
I think somewhere prior to this one should be enough to test:
2ea5a7af7bfa576a5936400ccca4144caca9640b
Quoted 3 lines
Stefan
Am 25.05.2013 00:32, schrieb mdroth:
Quoted 37 lines · Stefan Priebe
Quoted 36 lines
Am 25.05.2013 00:09, schrieb mdroth:
Quoted 22 lines
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +1
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); Quoted 8 lines
monitor.c static int monitor_can_read(void *opaque) · line 4244
Quoted 2 lines
monitor.c +1
-0+return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }I think this is unrelated to your original issue. If you issue '
qmp_capabilities' command more than once you will get CommandNotFound, and that behavior seems to be present even with v1.3.0. This patch seems to be masking the problem you're having (which seems to be state from previous monitor sessions/connections leaking into subsequent ones).That sounds reasonable. I'm using proxmox / PVE which does a lot of qmp queries in the background. So i might see situations where X connections in parallel do qmp queries.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
It's possible the GSource-based mechanism for handling I/O for chardev backends is causing a difference in behavior. Still not sure exactly what's going on though.
Can i revert some patches to test?
I think somewhere prior to this one should be enough to test:
2ea5a7af7bfa576a5936400ccca4144caca9640b
YES! I used 2ea5a7af7bfa576a5936400ccca4144caca9640b~1 for my tests and this works absoluty fine.
Stefan
Quoted 41 lines · Stefan Priebe
Am 25.05.2013 00:32, schrieb mdroth:
Quoted 40 lines · Stefan Priebe
Quoted 39 lines
Am 25.05.2013 00:09, schrieb mdroth:
Quoted 22 lines
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +1
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); Quoted 8 lines
monitor.c static int monitor_can_read(void *opaque) · line 4244
Quoted 2 lines
monitor.c +1
-0+return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }I think this is unrelated to your original issue. If you issue '
qmp_capabilities' command more than once you will get CommandNotFound, and that behavior seems to be present even with v1.3.0. This patch seems to be masking the problem you're having (which seems to be state from previous monitor sessions/connections leaking into subsequent ones).That sounds reasonable. I'm using proxmox / PVE which does a lot of qmp queries in the background. So i might see situations where X connections in parallel do qmp queries.
Quoted 3 lines
It's possible the GSource-based mechanism for handling I/O for chardev backends is causing a difference in behavior. Still not sure exactly what's going on though.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Can i revert some patches to test?
I think somewhere prior to this one should be enough to test:
2ea5a7af7bfa576a5936400ccca4144caca9640bYES! I used 2ea5a7af7bfa576a5936400ccca4144caca9640b~1 for my tests and this works absoluty fine.
Turns out the real culprit was a few commits later:
9f939df955a4152aad69a19a77e0898631bb2c18
I've sent a workaround this fixes things for QMP, but we may need a more general fix. Please give it a shot and see if it fixes your issues:
http://article.gmane.org/gmane.comp.emulators.qemu/213106
Quoted 3 lines
Stefan
Am 26.05.2013 03:23, schrieb mdroth:
Quoted 51 lines · Stefan Priebe
Quoted 41 lines
Am 25.05.2013 00:32, schrieb mdroth:
Quoted 40 lines · Stefan Priebe
Quoted 39 lines
Am 25.05.2013 00:09, schrieb mdroth:
Quoted 22 lines
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +1
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); Quoted 8 lines
monitor.c static int monitor_can_read(void *opaque) · line 4244
Quoted 2 lines
monitor.c +1
-0+return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }I think this is unrelated to your original issue. If you issue '
qmp_capabilities' command more than once you will get CommandNotFound, and that behavior seems to be present even with v1.3.0. This patch seems to be masking the problem you're having (which seems to be state from previous monitor sessions/connections leaking into subsequent ones).That sounds reasonable. I'm using proxmox / PVE which does a lot of qmp queries in the background. So i might see situations where X connections in parallel do qmp queries.
Quoted 3 lines
It's possible the GSource-based mechanism for handling I/O for chardev backends is causing a difference in behavior. Still not sure exactly what's going on though.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Can i revert some patches to test?
I think somewhere prior to this one should be enough to test:
2ea5a7af7bfa576a5936400ccca4144caca9640bYES! I used 2ea5a7af7bfa576a5936400ccca4144caca9640b~1 for my tests and this works absoluty fine.
Quoted 8 lines
Turns out the real culprit was a few commits later:
9f939df955a4152aad69a19a77e0898631bb2c18I've sent a workaround this fixes things for QMP, but we may need a more general fix. Please give it a shot and see if it fixes your issues:
no i got again:
The command qom-set has not been found JSON Reply: {"id": "21677:2", "error": {"class": "CommandNotFound", "desc": "The command qom-set has not been found"}} JSON Query: {"execute":"qom-set","id":"21677:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}} at /usr/share/perl5/PVE/QMPClient.pm line 101.
Stefan
Quoted 59 lines · Stefan Priebe
Am 26.05.2013 03:23, schrieb mdroth:
Quoted 58 lines · Stefan Priebe
Quoted 41 lines
Am 25.05.2013 00:32, schrieb mdroth:
Quoted 40 lines · Stefan Priebe
Quoted 39 lines
Am 25.05.2013 00:09, schrieb mdroth:
Quoted 22 lines
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +1
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); Quoted 8 lines
monitor.c static int monitor_can_read(void *opaque) · line 4244
Quoted 2 lines
monitor.c +1
-0+return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }I think this is unrelated to your original issue. If you issue '
qmp_capabilities' command more than once you will get CommandNotFound, and that behavior seems to be present even with v1.3.0. This patch seems to be masking the problem you're having (which seems to be state from previous monitor sessions/connections leaking into subsequent ones).That sounds reasonable. I'm using proxmox / PVE which does a lot of qmp queries in the background. So i might see situations where X connections in parallel do qmp queries.
Quoted 3 lines
It's possible the GSource-based mechanism for handling I/O for chardev backends is causing a difference in behavior. Still not sure exactly what's going on though.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Can i revert some patches to test?
I think somewhere prior to this one should be enough to test:
2ea5a7af7bfa576a5936400ccca4144caca9640bYES! I used 2ea5a7af7bfa576a5936400ccca4144caca9640b~1 for my tests and this works absoluty fine.
Turns out the real culprit was a few commits later:
9f939df955a4152aad69a19a77e0898631bb2c18I've sent a workaround this fixes things for QMP, but we may need a more general fix. Please give it a shot and see if it fixes your issues:
Quoted 7 lines
no i got again:
The command qom-set has not been found JSON Reply: {"id":
"21677:2", "error": {"class": "CommandNotFound", "desc": "The
command qom-set has not been found"}} JSON Query: {"execute":"qom-set","id":"21677:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}} at/usr/share/perl5/PVE/QMPClient.pmline 101.
Darn, I noticed another potential race after I sent the patch. Hadn't been able to trigger it on my end, but it might be what you're hitting.
Just sent a v2, can you give that a shot?
http://article.gmane.org/gmane.comp.emulators.qemu/213147
Quoted 3 lines
Stefan
Am 26.05.2013 17:36, schrieb mdroth:
Quoted 68 lines · Stefan Priebe
Quoted 59 lines
Am 26.05.2013 03:23, schrieb mdroth:
Quoted 58 lines · Stefan Priebe
Quoted 41 lines
Am 25.05.2013 00:32, schrieb mdroth:
Quoted 40 lines · Stefan Priebe
Quoted 39 lines
Am 25.05.2013 00:09, schrieb mdroth:
Quoted 22 lines
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I would try to create a small example script.
I use qmp-shell and other little scripts very often.
Quoted 2 lines
Am this be due to the fact that I don't wait for the welcome banner right now?
If you're not reading from the socket, then you'll get the banner back when
you read your first response. But qom-set shouldn't fail because of that.I can workaround it by adding this patch:
monitor.c +1
-1@@ -4239,7 +4239,8 @@ static int monitor_can_read(void *opaque)static int invalid_qmp_mode (const Monitor *mon,const char *cmd_name) {int is_cap =compare_cmd (cmd_name,"qmp_capabilities" ); -return (qmp_cmd_mode (mon) ? is_cap : !is_cap); +// return (qmp_cmd_mode(mon) ? is_cap : !is_cap); Quoted 8 lines
monitor.c static int monitor_can_read(void *opaque) · line 4244
Quoted 2 lines
monitor.c +1
-0+return ((is_cap >0 ) ?0 : (qmp_cmd_mode (mon) ? is_cap : !is_cap)); }I think this is unrelated to your original issue. If you issue '
qmp_capabilities' command more than once you will get CommandNotFound, and that behavior seems to be present even with v1.3.0. This patch seems to be masking the problem you're having (which seems to be state from previous monitor sessions/connections leaking into subsequent ones).That sounds reasonable. I'm using proxmox / PVE which does a lot of qmp queries in the background. So i might see situations where X connections in parallel do qmp queries.
Quoted 3 lines
It's possible the GSource-based mechanism for handling I/O for chardev backends is causing a difference in behavior. Still not sure exactly what's going on though.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Can i revert some patches to test?
I think somewhere prior to this one should be enough to test:
2ea5a7af7bfa576a5936400ccca4144caca9640bYES! I used 2ea5a7af7bfa576a5936400ccca4144caca9640b~1 for my tests and this works absoluty fine.
Turns out the real culprit was a few commits later:
9f939df955a4152aad69a19a77e0898631bb2c18I've sent a workaround this fixes things for QMP, but we may need a more general fix. Please give it a shot and see if it fixes your issues:
Quoted 7 lines
no i got again:
The command qom-set has not been found JSON Reply: {"id":
"21677:2", "error": {"class": "CommandNotFound", "desc": "The
command qom-set has not been found"}} JSON Query: {"execute":"qom-set","id":"21677:2","arguments":{"value":2,"path":"machine/peripheral/balloon0","property":"guest-stats-polling-interval"}} at/usr/share/perl5/PVE/QMPClient.pmline 101.
Quoted 6 lines
Darn, I noticed another potential race after I sent the patch. Hadn't been able to trigger it on my end, but it might be what you're hitting.
Just sent a v2, can you give that a shot?
Thanks! This one works fine.
Stefan