Bug 1036021 - Guest agent won't work if excute the "guest-sync-delimited"'s qemu-guest-agent command twice
Summary: Guest agent won't work if excute the "guest-sync-delimited"'s qemu-guest-agen...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.5
Hardware: All
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1036017
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-29 08:28 UTC by zhenfeng wang
Modified: 2013-12-03 08:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1036017
Environment:
Last Closed: 2013-12-03 08:11:44 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description zhenfeng wang 2013-11-29 08:28:38 UTC
+++ This bug was initially created as a clone of Bug #1036017 +++

Description of problem:
Guest agent won't work if excute the "guest-sync-delimited"'s qemu-guest-agent command twice

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-1.5.3-19.el7.x86_64
libvirt-1.1.1-13.el7.x86_64
kernel-3.10.0-47.el7.x86_64
qemu-guest-agent-1.5.3-19.el7.x86_64.rpm
virtio-win-1.6.7-2.el7.noarch
How reproducible:
100%

Steps to Reproduce:
1.Prepare a running guest with the following xml
# vrish dumpxml rhel7
--
<pm>
    <suspend-to-mem enabled='yes'/>
    <suspend-to-disk enabled='yes'/>
  </pm>
--
<channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/rhel7.agent'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <alias name='channel1'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

2.Install the qemu-guest-agent packet in the guest, then start the qemu-guest-agent service
#systemctl start qemu-guest-agent

3.Excute the following qemu-guest-agent command twice, the guest agent won't work
# virsh qemu-agent-command --domain rhel7 '{ "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }'
error: internal error: cannot parse json �{"return": 123456}: lexical error: invalid char in json text.
                                       �{"return": 123456}
                     (right here) ------^

# virsh qemu-agent-command --domain rhel7 '{ "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }'
error: Guest agent is not responding: QEMU guest agent is not available due to an error

4.Shutdown the guest with the guest-agent, it report error // normally, the guest can be shutdown successfully with the guest-agent

# virsh shutdown rhel7 --mode agent
error: Failed to shutdown domain rhel7
error: Guest agent is not responding: QEMU guest agent is not available due to an error

5.Both the windows and rhel's guest can hit the issue 

6.It works well with qemu-kvm command
# nc -U /tmp/qga.sock 
{"execute":"guest-ping"}
{"return": {}}
{ "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }
�{"return": 123456}
{ "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }
�{"return": 123456}
{ "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }
�{"return": 123456}

Actual results:
Guest agent won't work if excute the "guest-sync-delimited"'s qemu-guest-agent command twice

Expected results:
The guest agent should work well

Additional info:

Comment 2 Michal Privoznik 2013-12-02 16:01:58 UTC
As I mentioned in the parent bug, I don't think is a bug at all. But I'll wait for the reporter's confirmation prior closing this one.

Comment 3 Michal Privoznik 2013-12-03 08:11:44 UTC
This bug is not a bug. Read the parent bug for more info.


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