libvirt / virsh can't connect to remote hosts via IPv6 address

Bug #1007270 reported by Philipp Wollermann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Won't Fix
Medium
Unassigned
Quantal
Fix Released
Medium
Unassigned

Bug Description

Ubuntu 12.04 LTS amd64
libvirt-bin 0.9.8-2ubuntu17.1

Trying to connect to a remote libvirt via qemu+ssh and an IPv6 address fails, because libvirt parses the URL wrong. A fix exists upstream. Please include it in the version shipped in Ubuntu 12.04.

How to reproduce:

root@phil1:~# virsh --connect qemu+ssh://[fd00:c:a:0:1234:1234:1234:1234]/system
: Connection reset by peersh: Could not resolve hostname [fd00:c:a:0:1234:1234:1234:1234]: Temporary failure in name resolution
error: failed to connect to the hypervisor

Red Hat bug regarding this problem: https://bugzilla.redhat.com/show_bug.cgi?id=624626

Supposedly fixed in this upstream commit:

commit 9f748277bbd17d031f80d28e6d2fc4b52e8d5715
Author: Martin Kletzander <email address hidden>
Date: Fri Feb 24 19:48:55 2012 +0100

    Fixed URI parsing

    Function xmlParseURI does not remove square brackets around IPv6
    address when parsing. One of the solutions is making wrappers around
    functions working with xmlURI*. This assures that uri->server will be
    always properly assigned and it doesn't have to be changed when used
    on some new place in the code.
    For this purpose, functions virParseURI and virSaveURI were
    added. These function are wrappers around xmlParseURI and xmlSaveUri
    respectively.
    Also there is one new syntax check function to prohibit these functions
    anywhere else.

    File changes:
     - src/util/viruri.h -- declaration
     - src/util/viruri.c -- definition
     - src/libvirt_private.syms -- symbol export
     - src/Makefile.am -- added source and header files
     - cfg.mk -- added sc_prohibit_xmlURI
     - all others -- ID name and include fixes

Tags: needs-sru
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug and pointing to the patch.

I've marked it confirmed for precise (and fix released for quantal, which has 0.9.12) based on the upstream report.

Changed in libvirt (Ubuntu Precise):
status: New → Confirmed
importance: Undecided → Medium
Changed in libvirt (Ubuntu Quantal):
status: New → Fix Released
importance: Undecided → Medium
tags: added: needs-sru
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in libvirt (Ubuntu Precise):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.