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 694196 - RHEL 6.1 qemu-kvm: Specifying ipv6 addresses breaks migration
Summary: RHEL 6.1 qemu-kvm: Specifying ipv6 addresses breaks migration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Juan Quintela
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-06 17:33 UTC by Lucas Meneghel Rodrigues
Modified: 2015-10-18 22:41 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.156.el6
Doc Type: Bug Fix
Doc Text:
[NOTE: it is a fix to a bug introduced after 6.0 so the bug was never present on a RHEL release] Cause: getaddrinfo() changes introduced in the migration code post-RHEL-6.0were incomplete. Consequence: using a IPv6 address as migration target (e.g. if 'localhost' has an IPv6 address on /etc/hosts) could fail. Fix: getaddrinfo() changes reverted to the RHEL 6.0 code (that doesn't have the ability to do live migration through IPv6). Result: migration to 'localhost' will use the IPv4 address even if it had an associated IPv6 address in addition to IPv4 addresses, making migration work again.
Clone Of:
Environment:
Last Closed: 2011-05-19 11:22:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 11:20:36 UTC

Description Lucas Meneghel Rodrigues 2011-04-06 17:33:54 UTC
Description of problem: When trying to do migration referencing ipv6 addresses in RHEL 6.1 (such as localhost), migration will fail.

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

gpxe-roms-qemu.noarch 0:0.9.7-6.7.el6
qemu-img.x86_64 2:0.12.1.2-2.155.el6
qemu-kvm.x86_64 2:0.12.1.2-2.155.el6
qemu-kvm-tools.x86_64 2:0.12.1.2-2.155.el6
seabios.x86_64 0:0.6.1.2-3.el6
spice-server.x86_64 0:0.8.0-1.el6
vgabios.noarch 0:0.6b-3.5.el6
kernel-2.6.32-128.el6.x86_64

How reproducible: Always

Steps to Reproduce:
1. Start qemu-kvm source VM

/usr/local/autotest/tests/kvm/qemu -name 'vm1' -monitor unix:'/tmp/monitor-humanmonitor1-20110406-080942-JLHW',server,nowait -qmp unix:'/tmp/monitor-qmpmonitor1-20110406-080942-JLHW',server,nowait -serial unix:'/tmp/serial-20110406-080942-JLHW',server,nowait -drive file='/tmp/kvm_autotest_root/images/rhel6-64.qcow2',index=0,if=virtio,cache=none -device virtio-net-pci,netdev=idTaumhN,mac='9a:d8:60:23:c5:98',id='idN6l85e' -netdev tap,id=idTaumhN,ifname='t0-080942-JLHW',script='/usr/local/autotest/tests/kvm/scripts/qemu-ifup',downscript='no' -m 2048 -smp 2 -vnc :0

2. Start vm with -incoming as the destination VM
3. Migrate using qemu monitor

04/06 08:10:18 DEBUG|kvm_monito:0243| (human monitor humanmonitor1) - cmd 'migrate -d tcp:localhost4:5200'
  
Actual results: Qemu monitor will respond 

04/06 07:55:12 DEBUG|kvm_monito:0260| (human monitor humanmonitor1) - response to cmd 'info migrate': 'Migration status: failed'

Expected results: Qemu will migrate the VM:

04/06 08:10:20 DEBUG|kvm_monito:0260| (human monitor humanmonitor1) - response to cmd 'info migrate': 'Migration status: active
transferred ram: 902084 kbytes
remaining ram: 1212344 kbytes
total ram: 2113920 kbytes'

Additional info: We have a lead of the problem, it's a naming resolution issue. Looking at /etc/hosts:

[root@virtlab105 debug]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

If we change the reference from localhost to localhost4 the migration will work fine.

Comment 1 Lucas Meneghel Rodrigues 2011-04-06 17:46:42 UTC
It is important to note that this is a regression from RHEL 6.0. No such problem happens under 6.0.

Comment 2 Lucas Meneghel Rodrigues 2011-04-06 17:50:37 UTC
Correction - on the steps, where I wrote

04/06 08:10:18 DEBUG|kvm_monito:0243| (human monitor humanmonitor1) - cmd
'migrate -d tcp:localhost4:5200'

Should be


04/06 08:10:18 DEBUG|kvm_monito:0243| (human monitor humanmonitor1) - cmd
'migrate -d tcp:localhost:5200'

cut and paste and rushing... sorry.

Comment 7 Mike Cao 2011-04-11 06:09:49 UTC
(In reply to comment #1)
> It is important to note that this is a regression from RHEL 6.0. No such
> problem happens under 6.0.

FYI.I think this one is dup of Bug #680356

# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

The patch include ipv6 support .but "localhost" was used both on ipv4 address (127.0.0.1   localhost)and ipv6 address(::1         localhost) in /etc/hosts .When we use localhost in migration,qemu-kvm parsed to ipv6 address ,it should be same as I tested in bug 680356 which is failedQA .

same thing happened if we add a alias in /etc/hosts on both ipv4 and ipv6 at the same time ,it also failed.
eg: 
# cat /etc/hosts
::1        mike
127.0.0.1  mike
then (qemu)migrate -d tcp:mike:5888 ,it also failed.

workaround :
change /etc/hosts to 
# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost_TT localhost.localdomain localhost6 localhost6.localdomain6

then (qemi) migrate -d tcp:localhost:5888 ,it will work fine

Comment 8 Mike Cao 2011-04-11 10:26:08 UTC
Reproduced the issue described in qemu-kvm-0.12.1.2-2.154.el6.

Verified this issue on qemu-kvm-0.12.1.2-2.156.el6 

steps:
1.start VM 
2.start listening port at the same host
3(qemu) migrate -d tcp:localhost:5888

Actual Results: 
with qemu-kvm-0.12.1.2-2.154.el6 ,migrate failed
with qemu-kvm-0.12.1.2-2.156.el6 ,migrate success


Based on above ,this issue has been fixed.

Comment 9 Eduardo Habkost 2011-04-11 13:59:07 UTC
(In reply to comment #7)
> (In reply to comment #1)
> > It is important to note that this is a regression from RHEL 6.0. No such
> > problem happens under 6.0.
> 
> FYI.I think this one is dup of Bug #680356

It is not a duplicate, it is a regression caused by the fix to Bug #680356 (that was reverted now). Bug #680356 is about not having any ipv6 support, this one was about a problem found after we have added ipv6 support.

Comment 10 Mike Cao 2011-04-14 08:21:01 UTC
Base on comment #8 ,change status to VERIFIED.

Comment 11 Eduardo Habkost 2011-05-05 12:23:00 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
[NOTE: it is a fix to a bug introduced after 6.0 so the bug was never present on a RHEL release]

Cause: getaddrinfo() changes introduced in the migration code post-RHEL-6.0were incomplete.

Consequence: using a IPv6 address as migration target (e.g. if 'localhost' has an IPv6 address on /etc/hosts) could fail.

Fix: getaddrinfo() changes reverted to the RHEL 6.0 code (that doesn't have the ability to do live migration through IPv6).

Result: migration to 'localhost' will use the IPv4 address even if it had an associated IPv6 address in addition to IPv4 addresses, making migration work again.

Comment 12 errata-xmlrpc 2011-05-19 11:22:03 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Comment 13 errata-xmlrpc 2011-05-19 13:02:38 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html


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