Bug 675991 - libvirt needs ipv6 support for ssh uris
Summary: libvirt needs ipv6 support for ssh uris
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 785164
TreeView+ depends on / blocked
 
Reported: 2011-02-08 14:38 UTC by Jelle de Jong
Modified: 2018-06-04 11:46 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
: 785164 (view as bug list)
Environment:
Last Closed: 2014-04-17 10:45:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Jelle de Jong 2011-02-08 14:38:23 UTC
ssh -6 root@2a02:58:4:57:7271:bcff:fe86:6ab > works
virt-manager -c qemu+ssh://root@2a02:58:4:57:7271:bcff:fe86:6abe/system > failure

virt-manager --version 
0.8.4

With kind regards,

Jelle de Jong

Comment 1 Cole Robinson 2012-01-25 20:44:19 UTC
I don't have ipv6 setup so not sure how to test, but this sounds like a libvirt issue if anything.

Comment 2 Dave Allan 2012-01-25 21:46:15 UTC
Current libvirt supports ipv6:

http://libvirt.org/remote.html#Remote_IPv6

Can you test the latest libvirt and see if it works for you now?

Comment 3 Cole Robinson 2012-01-25 23:31:11 UTC
Well in this particular case we are just passing off the IP, which as the reporter demonstrated may require a -6 flag to work.

Though I can ssh to ::1 no prob but I assume that's due to /etc/hosts mappings.

Dan I know you are ipv6 savvy, is this an actual bug?

Comment 4 Daniel Berrangé 2012-01-26 10:15:26 UTC
> ssh -6 root@2a02:58:4:57:7271:bcff:fe86:6ab > works
> virt-manager -c qemu+ssh://root@2a02:58:4:57:7271:bcff:fe86:6abe/system >
> failure

Two things here

 - User error - when including raw IPv6 addresses inside a URI, you need to use [] otherwise you have ambiguous parsing wrt the port number. - you'll notice web browsers require "http://[.....]/"  too eg qemu+ssh://root@[2a02:58:4:57:7271:bcff:fe86:6abe]/system

 - Libvirt error - when parsing the URI we need to strip off the [] before passing it down to the sockets layer.

Comment 7 Ján Tomko 2014-04-17 10:45:28 UTC
Fixed upstream by:
commit 9f748277bbd17d031f80d28e6d2fc4b52e8d5715
Author:     Martin Kletzander <mkletzan>
AuthorDate: 2012-02-24 19:48:55 +0100
Commit:     Eric Blake <eblake>
CommitDate: 2012-02-24 16:49:21 -0700

    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

git describe: v0.9.10-44-g9f74827 contains: v0.9.11-rc1~222

Comment 8 Jelle de Jong 2018-06-04 11:46:51 UTC
I think the issue has been fixed for a while. Thank you for the commit.


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