glanceclient tests failing on fake_host

Bug #1185178 reported by Adam Gandelman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Adam Gandelman
Grizzly
Fix Released
Low
Walt Boring
cinder (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Our builds (with test suite enabled) have been plagued by the following error recently, using trunk python-glanceclient. Looks like glanceclient v2 needs further stubbing to avoid going out to the network for 'fake_host'

======================================================================
ERROR: cinder.tests.image.test_glance.TestGlanceClientVersion.test_glance_version_by_arg
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/��BUILDDIR��/cinder-2013.2+git201305281542~saucy/cinder/tests/image/test_glance.py", line 576, in test_glance_version_by_arg
    9292, version=2)
  File "/��BUILDDIR��/cinder-2013.2+git201305281542~saucy/cinder/image/glance.py", line 103, in __init__
    use_ssl, version)
  File "/��BUILDDIR��/cinder-2013.2+git201305281542~saucy/cinder/image/glance.py", line 117, in _create_static_client
    self.use_ssl, self.version)
  File "/��BUILDDIR��/cinder-2013.2+git201305281542~saucy/cinder/image/glance.py", line 73, in _create_glance_client
    return glanceclient.Client(str(version), endpoint, **params)
  File "/usr/lib/python2.7/dist-packages/glanceclient/client.py", line 22, in Client
    return client_class(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/client.py", line 40, in __init__
    self._get_member_model())
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/client.py", line 47, in _get_member_model
    schema = self.schemas.get('member')
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/schemas.py", line 53, in get
    _, raw_schema = self.http_client.json_request('GET', uri)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 237, in json_request
    resp, body_iter = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 203, in _http_request
    raise exc.InvalidEndpoint(message=message)
InvalidEndpoint: Error finding address for fake_host: [Errno -2] Name or service not known

======================================================================
ERROR: cinder.tests.image.test_glance.TestGlanceClientVersion.test_glance_version_by_flag
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/��BUILDDIR��/cinder-2013.2+git201305281542~saucy/cinder/tests/image/test_glance.py", line 564, in test_glance_version_by_flag
    9292)
  File "/��BUILDDIR��/cinder-2013.2+git201305281542~saucy/cinder/image/glance.py", line 103, in __init__
    use_ssl, version)
  File "/��BUILDDIR��/cinder-2013.2+git201305281542~saucy/cinder/image/glance.py", line 117, in _create_static_client
    self.use_ssl, self.version)
  File "/��BUILDDIR��/cinder-2013.2+git201305281542~saucy/cinder/image/glance.py", line 73, in _create_glance_client
    return glanceclient.Client(str(version), endpoint, **params)
  File "/usr/lib/python2.7/dist-packages/glanceclient/client.py", line 22, in Client
    return client_class(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/client.py", line 40, in __init__
    self._get_member_model())
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/client.py", line 47, in _get_member_model
    schema = self.schemas.get('member')
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/schemas.py", line 53, in get
    _, raw_schema = self.http_client.json_request('GET', uri)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 237, in json_request
    resp, body_iter = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 203, in _http_request
    raise exc.InvalidEndpoint(message=message)
InvalidEndpoint: Error finding address for fake_host: [Errno -2] Name or service not known

----------------------------------------------------------------------

Related branches

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/30795

Changed in cinder:
assignee: nobody → Adam Gandelman (gandelman-a)
status: New → In Progress
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Lookin like we are running our builds with trunk python-glanceclient (0.9.27) while upstream CI is pegged to the release in pypi (0.9). It would be good if the upstream test suite supported newer versions of the clients.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/30795
Committed: http://github.com/openstack/cinder/commit/1365ada3bcd8b9f7f4c1c7f7c9f158fc9ae867b3
Submitter: Jenkins
Branch: master

commit 1365ada3bcd8b9f7f4c1c7f7c9f158fc9ae867b3
Author: Adam Gandelman <email address hidden>
Date: Tue May 28 14:34:30 2013 -0700

    test_glance.py: Stub out _get_member_model as well.

    glanceclient's v2 client needs to also have its _get_member_model()
    stubbed out as well, to avoid attempts to reach 'fake_host' during
    client instantiation.

    Update: Only stub when _get_member_model() when required.

    Change-Id: I943cbb017ccdbe4f6c994bc83cbefe8693f4672b
    Fixes: bug #1185178.

Changed in cinder:
status: In Progress → Fix Committed
James Page (james-page)
Changed in cinder (Ubuntu):
status: New → Fix Committed
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → havana-2
status: Fix Committed → Fix Released
James Page (james-page)
Changed in cinder (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Walt Boring (walter-boring) wrote :

This bug is happening against stable/grizzly now as well.

tags: added: grizzly-backport-potential
Revision history for this message
Alan Pevec (apevec) wrote :

Merged in stable/grizzly https://review.openstack.org/41187

Changed in cinder:
importance: Undecided → Low
tags: removed: grizzly-backport-potential
Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-2 → 2013.2
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.