IPv6 test are not skipped when ipv6 is disabled

Bug #1263663 reported by mouadino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
mouadino

Bug Description

A platform can still have ipv6 disable for example by doing "sudo sysctl -n net.ipv6.conf.all.disable_ipv6=1" but the ipv6 related test will not be skipped and that is because of the naive way of detecting ipv6 support in the system.

I am proposing in this patch a better way to detect wether ipv6 is enabled or no in a machine.

mouadino (mouadino)
description: updated
Revision history for this message
mouadino (mouadino) wrote :

A bit of context from other OpenStack project:

   * Nova landed recently a change that fix this issue here: https://review.openstack.org/#/c/38070/ and the changes is not good IMHO check below for why.
  * Cinder doesn't take in consideration host that support ipv6 instead it look wether host has an interface with ipv6 address, check class TestWSGIServer in cinder/tests/test_wsgi.py, same thing that was added to nova.

Which basically mean that both nova and cinder end up skipping tests when they shouldn't, the correct way to do this is to check whether we can bind a socket to ::1 if not the ipv6 is not supported, this is the same thing that cPython do: http://hg.python.org/cpython/file/eae6966d9734/Lib/test/support/__init__.py#l613.

But at least both nova and cinder doesn't fail like keystone :)

Revision history for this message
mouadino (mouadino) wrote :
Changed in keystone:
assignee: nobody → mouadino (mouadino)
Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/63722
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=336292e10dc0179cf1019ed5260f9a2cd82840c6
Submitter: Jenkins
Branch: master

commit 336292e10dc0179cf1019ed5260f9a2cd82840c6
Author: mouad benchchaoui <email address hidden>
Date: Mon Dec 23 12:31:13 2013 +0100

    Fix IPv6 check

    IPv6 test should be skipped if both IPv6 address family
    is not recognize and if we can't bind to ::1

    Closes-Bug: #1263663
    Change-Id: I7f70719ffb7cf51ba3100a82da68d1af9a41623f

Changed in keystone:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-2 → 2014.1
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.