Glance service doesn't support ipv6

Bug #1331885 reported by Xiang Hui
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Xiang Hui
Juno
Fix Released
Undecided
Unassigned
glance (Ubuntu)
Fix Released
High
James Page

Bug Description

OS: ubuntu
Version: icehouse

Glance can't listen on the ipv6 address if it is setup on a separate node from nova-controller , and report below error:
******** log_opt_values /usr/lib/python2.7/dist-packages/oslo/config/cfg.py:1951
2014-06-18 16:53:55.567 21489 CRITICAL glance [-] gaierror: (-5, 'No address associated with hostname')
2014-06-18 16:53:55.567 21489 TRACE glance Traceback (most recent call last):
2014-06-18 16:53:55.567 21489 TRACE glance File "/usr/bin/glance-api", line 10, in <module>
2014-06-18 16:53:55.567 21489 TRACE glance sys.exit(main())
2014-06-18 16:53:55.567 21489 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/cmd/api.py", line 63, in main
2014-06-18 16:53:55.567 21489 TRACE glance server.start(config.load_paste_app('glance-api'), default_port=9292)
2014-06-18 16:53:55.567 21489 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 233, in start
2014-06-18 16:53:55.567 21489 TRACE glance self.sock = get_socket(default_port)
2014-06-18 16:53:55.567 21489 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 123, in get_socket
2014-06-18 16:53:55.567 21489 TRACE glance socket.SOCK_STREAM)
2014-06-18 16:53:55.567 21489 TRACE glance File "/usr/lib/python2.7/dist-packages/eventlet/support/greendns.py", line 174, in getaddrinfo
2014-06-18 16:53:55.567 21489 TRACE glance rrset = resolve(host)
2014-06-18 16:53:55.567 21489 TRACE glance File "/usr/lib/python2.7/dist-packages/eventlet/support/greendns.py", line 133, in resolve
2014-06-18 16:53:55.567 21489 TRACE glance raise socket.gaierror(error)
2014-06-18 16:53:55.567 21489 TRACE glance gaierror: (-5, 'No address associated with hostname')

Revision history for this message
Xiang Hui (xianghui) wrote :

I am trying to fix this as the way nova does https://bugs.launchpad.net/nova/+bug/1164822

Changed in glance:
assignee: nobody → Xiang Hui (xianghui)
Revision history for this message
Xiang Hui (xianghui) wrote :
Changed in glance:
status: New → In Progress
Revision history for this message
Xiang Hui (xianghui) wrote :

Hey, really appreciated if someone could review this patch and give comments, thanks.

James Page (james-page)
Changed in glance (Ubuntu):
importance: Undecided → High
status: New → In Progress
assignee: nobody → James Page (james-page)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glance - 1:2014.2~rc1-0ubuntu1

---------------
glance (1:2014.2~rc1-0ubuntu1) utopic; urgency=medium

  * New upstream release candidate:
    - d/p/skip-tests.patch: Dropped, no longer required.
    - d/control: Add python-glance-store to dependencies.
    - d/control: Add dependency on python-keystonemiddleware.
    - d/control: Align versioned depends with upstream.
    - d/p/fix-requirements.patch: Sort out some requirements mismatches
      which cause test failures due to pbr checking.
    - d/p/skip-online-tests.patch: Skip a number of tests that assume
      general internet connectivity.
  * d/watch: Use tarballs.openstack.org for upstream releases.
  * d/rules: Sort out issue with streaming of testr results using subunit
    to ensure that any test failures result in a FTBFS.
  * d/p/ipv6-support.patch: Cherry pick proposed fix to resolve IPv6
    compatiblity issues in glance (LP: #1331885).
 -- James Page <email address hidden> Fri, 03 Oct 2014 12:06:38 +0100

Changed in glance (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/101079
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=bd2a8422d3e8c975d023982c038a59ca0257c6dd
Submitter: Jenkins
Branch: master

commit bd2a8422d3e8c975d023982c038a59ca0257c6dd
Author: Edward Hope-Morley <email address hidden>
Date: Thu Jun 19 10:25:58 2014 +0800

    Fix getaddrinfo if dnspython is installed

    If dnspython is present in the environment then eventlet
    monkeypatches socket.getaddrinfo() with an implementation
    which doesn't work for IPv6.

    This patch has also been applied to other Openstack
    projects such as nova (f2e49ad3) and keystone (3afd9791)
    in order to work around the same problem and is
    intended to be used in the same way.

    Co-authored-by: Hui Xiang <email address hidden>
    Closes-Bug: 1331885
    Change-Id: I795e004eac3f032217ff9cb0047f1976306fbb71

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/140677

tags: added: juno-backport-potential
Louis Taylor (kragniz)
Changed in glance:
milestone: none → kilo-1
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Changed in glance:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/juno)

Reviewed: https://review.openstack.org/140677
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=07a99e1eaace09bdfb77dae2edb40d76de2c545a
Submitter: Jenkins
Branch: stable/juno

commit 07a99e1eaace09bdfb77dae2edb40d76de2c545a
Author: Edward Hope-Morley <email address hidden>
Date: Thu Jun 19 10:25:58 2014 +0800

    Fix getaddrinfo if dnspython is installed

    If dnspython is present in the environment then eventlet
    monkeypatches socket.getaddrinfo() with an implementation
    which doesn't work for IPv6.

    This patch has also been applied to other Openstack
    projects such as nova (f2e49ad3) and keystone (3afd9791)
    in order to work around the same problem and is
    intended to be used in the same way.

    Co-authored-by: Hui Xiang <email address hidden>
    Closes-Bug: 1331885
    (cherry picked from commit bd2a8422d3e8c975d023982c038a59ca0257c6dd)

    Conflicts:
     glance/cmd/__init__.py

    Change-Id: I795e004eac3f032217ff9cb0047f1976306fbb71

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in glance:
milestone: kilo-1 → 2015.1.0
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.