RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1320470 - Migrating guest with default guest agent socket path from 1.3.x to 1.2.17 failed
Summary: Migrating guest with default guest agent socket path from 1.3.x to 1.2.17 failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-23 09:56 UTC by Fangge Jin
Modified: 2016-11-03 18:40 UTC (History)
6 users (show)

Fixed In Version: libvirt-2.0.0-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:40:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd log on source host (309.57 KB, text/plain)
2016-03-23 09:57 UTC, Fangge Jin
no flags Details
libvirtd log on target host (305.95 KB, text/plain)
2016-03-23 09:58 UTC, Fangge Jin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Fangge Jin 2016-03-23 09:56:31 UTC
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.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 09:57:55 UTC
Created attachment 1139446 [details]
libvirtd log on source host

Comment 2 Fangge Jin 2016-03-23 09:58:41 UTC
Created attachment 1139447 [details]
libvirtd log on target host

Comment 4 Jiri Denemark 2016-07-08 15:40:30 UTC
Patches sent for review upstream: https://www.redhat.com/archives/libvir-list/2016-July/msg00239.html

Comment 5 Jiri Denemark 2016-07-18 07:24:07 UTC
This is now fixed upstream by

commit b1305a6b8fcb807296a00458c5495ef321553cd0
Refs: v2.0.0-148-gb1305a6
Author:     Jiri Denemark <jdenemar>
AuthorDate: Fri Jul 8 16:44:02 2016 +0200
Commit:     Jiri Denemark <jdenemar>
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>

commit 08d566a0cf7ed052b6ab3c9bd93f04156999d80b
Refs: v2.0.0-149-g08d566a
Author:     Jiri Denemark <jdenemar>
AuthorDate: Fri Jul 8 17:25:03 2016 +0200
Commit:     Jiri Denemark <jdenemar>
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>

Comment 8 yafu 2016-08-11 04:35:55 UTC
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.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 18:40:24 UTC
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.