Bug 951525

Summary: Executing "system_reset" command in qmp, two RESET events are reported
Product: Red Hat Enterprise Linux 7 Reporter: xhan
Component: qemu-kvmAssignee: Laszlo Ersek <lersek>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 7.0CC: acathrow, hhuang, juzhang, michen, qzhang, sluo, virt-maint
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-16 17:23:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xhan 2013-04-12 11:41:31 UTC
Description of problem:

Executing "system_reset" command in qmp, two RESET events are reported.

Version-Release number of selected component (if applicable):

qemu-kvm-1.4.0-2.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. boot up a vm.
/root/autotest/autotest-devel/client/tests/kvm/qemu -monitor stdio -enable-kvm -chardev socket,id=seabioslog_id_20130410-113920-4uZvymfO,path=/tmp/seabios-20130410-113920-4uZvymfO,server,nowait -device isa-debugcon,chardev=seabioslog_id_20130410-113920-4uZvymfO,iobase=0x402 -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 -drive file=./RHEL-Server-6.4-64-virtio.qcow2,if=none,id=drive-virtio-disk1,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idiJsfiK,mac=9a:d9:da:db:dc:dd,bus=pci.0,addr=0x3,id=idbJLUxv -netdev tap,id=idiJsfiK,vhost=on -m 4096 -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 -cpu SandyBridge -M pc -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :0 -vga cirrus -rtc base=utc,clock=host,driftfix=slew -qmp tcp:0:5234,server,nowait -drive file=./Windows8-ReleasePreview-64bit-English.iso,if=none,id=drive-virtio-disk2,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-virtio-disk2,id=virtio-disk2

2. telnet host_ip 5234
3.
{"execute":"qmp_capabilities"}
{"return": {}}
{ "execute": "system_reset" }
{"return": {}}
{"timestamp": {"seconds": 1365752070, "microseconds": 703225}, "event": "RESET"}
{"timestamp": {"seconds": 1365752070, "microseconds": 783227}, "event": "RESET"}


Actual results:

Two pieces of RESET event are reported.

Expected results:
One piece of RESET event is reported.


Additional info:

Host kernel
3.9.0-0.rc6.50.el7.x86_64

Comment 2 Hai Huang 2013-04-16 18:54:30 UTC
Please feel free to reassign this BZ as appropriate. Thanks.

Comment 3 Luiz Capitulino 2013-04-17 12:20:39 UTC
This is already fixed upstream, will backport the fix shortly.

Comment 4 Luiz Capitulino 2013-04-18 20:09:16 UTC
It turns out that we'll rebase qemu to 1.5, so there's no need to backport the fixes. Moving this to ON_QA.

Comment 5 Luiz Capitulino 2013-04-19 17:53:23 UTC
I was wrong about this, it turns out it still exists upstream. Moving back to NEW.

Comment 6 Ademar Reis 2013-11-28 17:11:21 UTC
QMP usage is not going to be supported in RHEL7 and this bug is harmless when using libvirt. Closing as WONTFIX.

Comment 7 Sibiao Luo 2014-01-16 10:15:48 UTC
(In reply to Ademar Reis from comment #6)
> QMP usage is not going to be supported in RHEL7 and this bug is harmless
> when using libvirt. Closing as WONTFIX.
Why QMP not be support in rhel7? The libvirt must call for from QMP monitor, maybe you mistaked it to HMP, so reopen it to fix it. Please correct me if any mistake.

Best Regards,
sluo

Comment 8 Laszlo Ersek 2014-01-16 15:29:43 UTC
Hi Sluo,

I can only repeat Ademar's comment 6:
- *direct* QMP usage (ie. talking directly to the qemu monitor over QMP) is not supported in RHEL-7,
- libvirt of course talks to the qemu monitor, using QMP, and that is supported. But libvirt can already handle the duplicate RESET event (this is what Ademar meant with "harmless".

Please consider re-closing. Thanks.

Comment 9 Ademar Reis 2014-01-16 17:23:29 UTC
(In reply to Laszlo Ersek from comment #8)
> Hi Sluo,
> 
> I can only repeat Ademar's comment 6:
> - *direct* QMP usage (ie. talking directly to the qemu monitor over QMP) is
> not supported in RHEL-7,
> - libvirt of course talks to the qemu monitor, using QMP, and that is
> supported. But libvirt can already handle the duplicate RESET event (this is
> what Ademar meant with "harmless".
> 

Yep, sorry for not being clear before and thanks Laszlo for explaining.