Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
URI parsing/formating in qemuMigrationPrepareDirect is not ready for IPv6
addresses:
/* Get the port number. */
p = strrchr (uri_in, ':');
if (p == strchr(uri_in, ':')) {
/* Generate a port */
this_port = QEMUD_MIGRATION_FIRST_PORT + port++;
if (port == QEMUD_MIGRATION_NUM_PORTS)
port = 0;
/* Caller frees */
if (virAsprintf(uri_out, "%s:%d", uri_in, this_port) < 0) {
virReportOOMError();
goto cleanup;
}
} else {
p++; /* definitely has a ':' in it, see above */
this_port = virParseNumber (&p);
if (this_port == -1 || p-uri_in != strlen (uri_in)) {
virReportError(VIR_ERR_INVALID_ARG,
"%s", _("URI ended with incorrect ':port'"));
goto cleanup;
}
}
}
if (*uri_out)
VIR_DEBUG("Generated uri_out=%s", *uri_out);
/* QEMU will be started with -incoming tcp:0.0.0.0:port */
snprintf(migrateFrom, sizeof(migrateFrom), "tcp:0.0.0.0:%d", this_port);
Version-Release number of selected component (if applicable):
libvirt-0.10.0-0rc0.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1. virsh migrate qemu qemu+tcp://host2/system tcp:[fec0::2]
Actual results:
virsh # migrate qemu qemu+tcp://host2/system tcp:[fec0::2]
error: invalid argument: URI ended with incorrect ':port'
Additional info:
Using IPv4 address, migration works as expected:
virsh # migrate qemu qemu+tcp://host2/system tcp:192.168.123.12
The last line from the code snippet
snprintf(migrateFrom, sizeof(migrateFrom), "tcp:0.0.0.0:%d", this_port);
reveals another issue we have in IPv6 migrations. We tell qemu to listen on 0.0.0.0, that is, IPv4 only. We should allow it to listen on IPv6 as well, however, we need to do something more clever than tcp:[::]:%d since this wouldn't work if IPv6 was explicitly disabled on the host.
Fixed upstream by:
commit f03dcc5df141370c09da93135ad2f921c0af55b9
Author: Ján Tomko <jtomko>
AuthorDate: 2013-03-22 14:52:25 +0100
Commit: Ján Tomko <jtomko>
CommitDate: 2013-04-02 11:23:47 +0200
qemu: Allow migration over IPv6
Allow migration over IPv6 by listening on [::] instead of 0.0.0.0
when QEMU supports it (QEMU_CAPS_IPV6_MIGRATION) and there is
at least one v6 address configured on the system.
Use virURIParse in qemuMigrationPrepareDirect to allow parsing
IPv6 addresses, which would cause an 'incorrect :port' error
message before.
Move setting of migrateFrom from qemuMigrationPrepare{Direct,Tunnel}
after domain XML parsing, since we need the QEMU binary path from it
to get its capabilities.
Comment 20Fabio Massimo Di Nitto
2013-04-10 13:03:02 UTC
Packages have been delivered to customer.
Waiting on customer testing feedback
Test on
qemu-kvm-rhev-0.12.1.2-2.377.el6.x86_64
kernel-2.6.32-396.el6.x86_64
libvirt-0.10.2-19.el6.x86_64
When do migration with
#virsh migrate mig qemu+tcp://test2/system tcp:[3ffe::102]
error: End of file while reading data: Input/output error
The target libvirtd crash
the dumping log will be attached
This is the same crash as in bug 982544.
As Jiri Denemark said there:
> The backtrace shows libvirtd crashed as a result of a bug introduced by a
> patch for 977961. This regression is fixed by a follow-up patch mentioned in
> https://bugzilla.redhat.com/show_bug.cgi?id=977961#c8
Verify pass on
libvirt-0.10.2-21.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.379.el6.x86_64
kernel-2.6.32-398.el6.x86_64
Migration with
#virsh migrate mig qemu+tcp://test2/system tcp:[3ffe::102]
can succeed without error
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.
http://rhn.redhat.com/errata/RHBA-2013-1581.html
Description of problem: URI parsing/formating in qemuMigrationPrepareDirect is not ready for IPv6 addresses: /* Get the port number. */ p = strrchr (uri_in, ':'); if (p == strchr(uri_in, ':')) { /* Generate a port */ this_port = QEMUD_MIGRATION_FIRST_PORT + port++; if (port == QEMUD_MIGRATION_NUM_PORTS) port = 0; /* Caller frees */ if (virAsprintf(uri_out, "%s:%d", uri_in, this_port) < 0) { virReportOOMError(); goto cleanup; } } else { p++; /* definitely has a ':' in it, see above */ this_port = virParseNumber (&p); if (this_port == -1 || p-uri_in != strlen (uri_in)) { virReportError(VIR_ERR_INVALID_ARG, "%s", _("URI ended with incorrect ':port'")); goto cleanup; } } } if (*uri_out) VIR_DEBUG("Generated uri_out=%s", *uri_out); /* QEMU will be started with -incoming tcp:0.0.0.0:port */ snprintf(migrateFrom, sizeof(migrateFrom), "tcp:0.0.0.0:%d", this_port); Version-Release number of selected component (if applicable): libvirt-0.10.0-0rc0.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. virsh migrate qemu qemu+tcp://host2/system tcp:[fec0::2] Actual results: virsh # migrate qemu qemu+tcp://host2/system tcp:[fec0::2] error: invalid argument: URI ended with incorrect ':port' Additional info: Using IPv4 address, migration works as expected: virsh # migrate qemu qemu+tcp://host2/system tcp:192.168.123.12