test_evnetlet_no_dnspython fails to import glance.cmd

Bug #1555304 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned

Bug Description

The following test is failing during ubuntu package builds for mitaka b3:

======================================================================
FAIL: glance.tests.unit.common.test_wsgi_ipv6.IPv6ServerTest.test_evnetlet_no_dnspython
glance.tests.unit.common.test_wsgi_ipv6.IPv6ServerTest.test_evnetlet_no_dnspython
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/glance/tests/unit/common/test_wsgi_ipv6.py", line 61, in test_evnetlet_no_dnspython
    self.assertEqual(0, rc)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 0 != 1

The mismatch error results when the import of glance.cmd fails and an ImportError is raised. If I comment out the following line, then the import of glance.cmd is successful but I'm not sure why:

os.environ['EVENTLET_NO_GREENDNS'] = '%s'

description: updated
Changed in glance:
status: New → Incomplete
Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :

HI Corey,

I tried this on a ubuntu and it worked just fine. May I ask for the following info on this:

1. Does the system use IPv6 ?
2. Which environment does this fail on python27 or python 34 or both?
3. Do you have dnspython installed ?

The commit bd2a8422d3e8c975d023982c038a59ca0257c6dd is adding these tests is addressing issue for systems that have dnspython installed and have IPv6.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Nikhil,

Thanks for taking a look. I have to figure it's a dependency issue where perhaps running from pip installed packages is getting different version than debian packages, which are at least at the min versions specified in global requirements.

> 1. Does the system use IPv6 ?

Yes, and the tests used to work.

> 2. Which environment does this fail on python27 or python 34 or both?

We're only running py27 right now.

> 3. Do you have dnspython installed ?

No

Changed in glance:
status: Incomplete → New
Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

I cannot reproduce this bug either. I love how reproducible and isolated our tests are!

Could you re-raise the import error instead of calling sys.exit(), so that we have more details?

Changed in glance:
status: New → Invalid
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.