Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1322210 - Fail to hotplug guest agent with libvirt-1.3.2-1.el7
Fail to hotplug guest agent with libvirt-1.3.2-1.el7
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.3
x86_64 Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
: Upstream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-29 23:01 EDT by zhenfeng wang
Modified: 2016-11-03 14:40 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-2.0.0-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:40:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 08:07:06 EDT

  None (edit)
Description zhenfeng wang 2016-03-29 23:01:53 EDT
Description of problem:
Fail to hotplug guest agent with the latest libvirt packet

Version-Release number of selected component (if applicable):
libvirt-1.3.2-1.el7

How reproducible:
100%

Steps to Reproduce:
1.Prepare a running guest without guest agent configured
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 1     virt-tests-vm3                 running

2.Prepare a guest agent xml
# cat agent.xml 
   <channel type='unix'>
      <source mode='bind'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

3.Hotplug the guest agent, will report the following error
# virsh attach-device virt-tests-vm3 agent.xml 
error: Failed to attach device from agent.xml
error: internal error: unable to execute QEMU command 'chardev-add': Invalid parameter type for 'path', expected: string

4.Check the loginfo, found following messages
#cat /var/log/libvirt/libvirtd.log
--
2016-03-25 09:02:22.847+0000: 10269: debug : qemuMonitorJSONCheckError:374 : unable to execute QEMU command {"execute":"chardev-add","arguments":{"id":"charchannel0","backend":{"type":"socket","data":{"addr":{"type":"unix","data":{"path":null}},"wait":false,"server":true}}},"id":"libvirt-12"}: {"id":"libvirt-12","error":{"class":"GenericError","desc":"Invalid parameter type for 'path', expected: string"}}

Actual results:
Fail to hotplug guest agent

Expected results:
Should hotplug guest agent successfully

Additional info:
It works well in RHEL7.2.Z with libvirt-1.2.17-13.el7_2.2.x86_64
Comment 2 Martin Kletzander 2016-03-31 03:16:51 EDT
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2016-March/msg01454.html
Comment 4 Martin Kletzander 2016-06-09 07:30:30 EDT
Fixed upstream with v1.3.5-181-gf670008b58b7..v1.3.5-183-g326e5941cd6a: 

commit f670008b58b7951d0d05c2bd0317cf498bf463c2
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Wed Mar 30 16:34:17 2016 +0200

    qemu: Move channel path generation out of command creation
     

commit f3717047081455e2b46fbf0d25620fe9ade5b19e
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Wed Mar 30 09:01:11 2016 +0200

    qemuhotplugtest: Test live data
    
commit 326e5941cd6ac00a9aa4149872f71c2403f25db4
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Wed Mar 30 16:43:28 2016 +0200

    qemu: Generate channel target paths on hotplug as well
Comment 6 yanqzhan@redhat.com 2016-07-21 03:12:20 EDT
Reproduce this bug with libvirt-1.3.2-1.el7.x86_64
Steps and results are as comment 0.

Verify this bug with libvirt-2.0.0-2.el7.x86_64
Steps to verify:

1.Prepare a running guest without guest agent configured
# virsh list
 Id    Name                           State
----------------------------------------------------
 3     testvm                         running
# virsh domtime testvm
error: argument unsupported: QEMU guest agent is not configured

2.Prepare a guest agent xml
# cat agent1.xml 
    <channel type='unix'>
      <source mode='bind'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

3.Hotplug the guest agent, can be attached successfully, and guest agent works well.
# virsh attach-device testvm agent1.xml
Device attached successfully

# virsh dumpxml testvm|grep agent -A3
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-42-testvm/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel1'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

# virsh domtime testvm
Time: 1469077961

Since the result is as expected, mark this bug verified.
Comment 8 errata-xmlrpc 2016-11-03 14:40:55 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html

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