Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1320470 - Migrating guest with default guest agent socket path from 1.3.x to 1.2.17 failed
Migrating guest with default guest agent socket path from 1.3.x to 1.2.17 failed
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Jiri Denemark
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-23 05:56 EDT by Fangge Jin
Modified: 2016-11-03 14:40 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-2.0.0-3.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:40:24 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)
libvirtd log on source host (309.57 KB, text/plain)
2016-03-23 05:57 EDT, Fangge Jin
no flags Details
libvirtd log on target host (305.95 KB, text/plain)
2016-03-23 05:58 EDT, Fangge Jin
no flags Details


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 Fangge Jin 2016-03-23 05:56:31 EDT
Created attachment 1139445 [details]
qemu log on target

Description of problem:
Try to migrate a guest with default guest agent socket path from 1.3.x to 1.2.17, it failed.

# virsh migrate rhel7.2-raw-2 qemu+ssh://10.66.82.251/system --live --verbose --unsafe
root@10.66.82.251's password:
error: internal error: process exited while connecting to monitor: 2016-03-22T12:28:10.951511Z qemu-kvm: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-1-rhel7.2-raw-2/org.qemu.guest_agent.0,server,nowait: Failed to bind socket to /var/lib/libvirt/qemu/channel/target/domain-1-rhel7.2-raw-2/org.qemu.guest_agent.0: No such file or directory


Version-Release number of selected component:
# git describe
v1.3.2-229-g0c72459


How reproducible:
100%

Steps to Reproduce:
0.On host A, install libvirt v1.3.2-229-g0c72459, and start a guest with default guest agent socket path:
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-1-rhel7.2-raw-2/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

1.On host B, install libvirt-1.2.17-13.el7.x86_64

2. Migrate guest to host B.

Actual results:
Migration failed.

Expected results:
Migration succeed.

Additional info:
Comment 1 Fangge Jin 2016-03-23 05:57 EDT
Created attachment 1139446 [details]
libvirtd log on source host
Comment 2 Fangge Jin 2016-03-23 05:58 EDT
Created attachment 1139447 [details]
libvirtd log on target host
Comment 4 Jiri Denemark 2016-07-08 11:40:30 EDT
Patches sent for review upstream: https://www.redhat.com/archives/libvir-list/2016-July/msg00239.html
Comment 5 Jiri Denemark 2016-07-18 03:24:07 EDT
This is now fixed upstream by

commit b1305a6b8fcb807296a00458c5495ef321553cd0
Refs: v2.0.0-148-gb1305a6
Author:     Jiri Denemark <jdenemar@redhat.com>
AuthorDate: Fri Jul 8 16:44:02 2016 +0200
Commit:     Jiri Denemark <jdenemar@redhat.com>
CommitDate: Mon Jul 18 09:05:12 2016 +0200

    qemu: Copy complete domain def in qemuDomainDefFormatBuf

    Playing directly with our live definition, updating it, and reverting it
    back once we are done is very nice and it's quite dangerous too. Let's
    just make a copy of the domain definition if needed and do all tricks on
    the copy.

    https://bugzilla.redhat.com/show_bug.cgi?id=1320470

    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>

commit 08d566a0cf7ed052b6ab3c9bd93f04156999d80b
Refs: v2.0.0-149-g08d566a
Author:     Jiri Denemark <jdenemar@redhat.com>
AuthorDate: Fri Jul 8 17:25:03 2016 +0200
Commit:     Jiri Denemark <jdenemar@redhat.com>
CommitDate: Mon Jul 18 09:05:12 2016 +0200

    qemu: Drop default channel path during migration

    Migration to an older libvirt (pre v1.3.0-175-g7140807) is broken
    because older versions of libvirt generated different channel paths and
    they didn't drop the default paths when parsing domain XMLs. We'd get
    such a nice error message:

        internal error: process exited while connecting to monitor:
        2016-07-08T15:28:02.665706Z qemu-kvm: -chardev socket,
        id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/
        domain-3-nest/org.qemu.guest_agent.0,server,nowait: Failed to bind
        socket to /var/lib/libvirt/qemu/channel/target/domain-3-nest/
        org.qemu.guest_agent.0: No such file or directory

    That said, we should not even format the default paths when generating a
    migratable XML.

    https://bugzilla.redhat.com/show_bug.cgi?id=1320470

    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Comment 8 yafu 2016-08-11 00:35:55 EDT
I can reproduce the bug with libvirt-1.3.5-1.el7.x86_64.

Verified pass with libvirt-2.0.0-5.el7.x86_64:

1.On source host,start a guest with default guest agent socket path:
   <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-4-mig1/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='2'/>
    </channel>

2.Do migration to a host installed libvirt-1.2.17-13.el7:
 #virsh migrate mig1 qemu+ssh://10.66.144.76/system --live --verbose
  root@10.66.144.76's password: 
  Migration: [100 %]

3.Check the guest agent socket of the guest after migration completed:
      <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-mig1/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='2'/>
    </channel>
Comment 10 errata-xmlrpc 2016-11-03 14:40:24 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.