"/nova/image/glance.py" could not parse ipv6 address correctly

Bug #1182830 reported by Wang Bo on 2013-05-22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Dazhao Yu

Bug Description

Version of Nova: Grizzly.

I tried to configure controller node and compute node work together using pure IPv6.

 Edit nova.conf file and quantum.conf file,
 Set the host-address( for example: qpid_hostname, glance_api_servers ...) to [2001:db8::22](the ip-address of the controller node)

 When to boot an instance then the compute node to get images, there was an ERROR in
     file: nova/image/glance.py ,
     function: get_api_servers():
                           o = urlparse.urlparse(api_server)
                           port = o.port or 80
                           host = o.netloc.split(":", 1)[0]

     It reported an ERROR if the argument "api_server" is a ipv6 address( for example: [2001:db8::22])

In /nova/openstack/common/network_utils.py, there is a function parse_host_port() which could pares the ipv6 address correctly.
So I tried to use this function instead of the current bug code.
But after that the variable "host" is "2001:db8::22" without '[]' that caused other problems, for example in
   file: /glanceclient/common/http/py
   Class HTTPClient()
       _init_(self, endpoint, **kwargs)

   the endpoint is "http://2001:db8::22:9292" without '[]'

Anyway, The current code could not parse ipv6 address correctly. There were also similar problems in other places of the code.

Wang Bo (chestack) on 2013-05-22
description: updated
description: updated
Changed in nova:
assignee: nobody → Kanthi Pavu (pavuluri-kanthi-w)
status: New → In Progress
Dirk Mueller (dmllr) on 2013-06-01
summary: - "/nova/image/glance.py" could not parse ipv6 address correclty
+ "/nova/image/glance.py" could not parse ipv6 address correctly
Dazhao Yu (dzyu) wrote :

In my env, I also found this issue, this issue blocked our test on IPv6, pls help us to resolve this issue.

Dazhao Yu (dzyu) wrote :

Assign this bug to me, since the bug had not been updated for a long time.

Changed in nova:
assignee: Kanthi Pavuluri (pavuluri-kanthi-w) → Dazhao Yu (dzyu)

Reviewed: https://review.openstack.org/42607
Committed: http://github.com/openstack/nova/commit/cdfb7891492c219c786b5b38ac1b598f0d2edd50
Submitter: Jenkins
Branch: master

commit cdfb7891492c219c786b5b38ac1b598f0d2edd50
Author: dzyu <email address hidden>
Date: Mon Aug 19 18:30:39 2013 +0800

    Code change for nova support glance ipv6 address

    This code change is for nova can parse glance api servers which is
    IPv6 address correctly, also make sure nova commands can be run
    successfully in pure ipv6 environment, such as 'nova image-list'
    and 'nova boot' command.

    Fixes bug 1182830

    Change-Id: Ia71002c7038b820db7a63f7d6892e76de4743d8d

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → havana-rc1
Thierry Carrez (ttx) on 2013-10-03
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in nova:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers