keystoneclient.exceptions.RequestTimeout

Bug #1504197 reported by Lucas Alvares Gomes on 2015-10-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Fix Released
Critical
Lucas Alvares Gomes

Bug Description

Apparently the tests are failing with:

(venv)[lucasagomes@lucasagomes python-ironicclient]$ testr run --parallel
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --list
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --load-list /tmp/tmp7tU53A
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --load-list /tmp/tmpHnWzOg
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --load-list /tmp/tmp8LujLA
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --load-list /tmp/tmp3GD93a
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --load-list /tmp/tmpzLHpLB
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --load-list /tmp/tmpxonXKi
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --load-list /tmp/tmp3sPo0i
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --load-list /tmp/tmpUjq77f
======================================================================
FAIL: ironicclient.tests.unit.test_shell.ShellTest.test_password_prompted
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
Starting new HTTP connection (1): no.where
Plugin cannot return an endpoint without knowing the service type that is required. Add service_type to endpoint filtering data.
Starting new HTTP connection (2): no.where
}}}

Traceback (most recent call last):
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "ironicclient/tests/unit/test_shell.py", line 128, in test_password_prompted
    self.shell, 'node-list')
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
    reraise(*matchee)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "ironicclient/tests/unit/test_shell.py", line 72, in shell
    _shell.main(argstr.split())
  File "ironicclient/shell.py", line 536, in main
    args.func(client, args)
  File "ironicclient/v1/node_shell.py", line 149, in do_node_list
    nodes = cc.node.list(**params)
  File "ironicclient/v1/node.py", line 106, in list
    return self._list(self._path(path), "nodes")
  File "ironicclient/common/base.py", line 119, in _list
    resp, body = self.api.json_request('GET', url)
  File "ironicclient/common/http.py", line 522, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "ironicclient/common/http.py", line 178, in wrapper
    return func(self, url, method, **kwargs)
  File "ironicclient/common/http.py", line 496, in _http_request
    raise_exc=False, **kwargs)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/session.py", line 304, in request
    auth_headers = self.get_auth_headers(auth)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/session.py", line 617, in get_auth_headers
    return auth.get_headers(self, **kwargs)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/auth/base.py", line 142, in get_headers
    token = self.get_token(session)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line 200, in get_token
    return self.get_access(session).auth_token
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.py", line 240, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.py", line 88, in get_auth_ref
    authenticated=False, log=False)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/session.py", line 501, in post
    return self.request(url, 'POST', **kwargs)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/session.py", line 386, in request
    resp = send(**kwargs)
  File "/home/lucasagomes/Projects/python-ironicclient/.tox/venv/lib/python2.7/site-packages/keystoneclient/session.py", line 427, in _send_request
    raise exceptions.RequestTimeout(msg)
keystoneclient.exceptions.RequestTimeout: Request to http://no.where/v2.0/tokens timed out (HTTP 408)
Ran 376 (+89) tests in 1.428s (-1.279s)
FAILED (id=745, failures=1 (+1))

Changed in python-ironicclient:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Critical

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

Changed in python-ironicclient:
status: New → In Progress

Reviewed: https://review.openstack.org/232633
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=42d52af3c2238900eb69217bba5dbbcdca63abf0
Submitter: Jenkins
Branch: master

commit 42d52af3c2238900eb69217bba5dbbcdca63abf0
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Oct 8 17:06:02 2015 +0100

    Mock keystone call to avoid test failure

    The test test_password_prompted() was expecting a keystone failure, but
    because of an error in the requests/urllib3 library it was returning a
    different exception and causing our tests to fail, see[1].

    Independent of the the problem above on tests we should not rely on some
    external library failing like that, we should mock this failures to make
    our tests more reliable and that's what this patch is doing.

    [1] https://bugs.launchpad.net/ospurge/+bug/1503768

    Change-Id: I3e6091eb2bc221a16fdc18b998ba138058818894
    Closes-Bug: #1504197

Changed in python-ironicclient:
status: In Progress → Fix Committed
Changed in python-ironicclient:
milestone: none → 0.10.0
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/234451
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=cd84edd2bec0e71d9a7f83c6fe1b9ab9b18fcecf
Submitter: Jenkins
Branch: stable/liberty

commit cd84edd2bec0e71d9a7f83c6fe1b9ab9b18fcecf
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Oct 8 17:06:02 2015 +0100

    Mock keystone call to avoid test failure

    The test test_password_prompted() was expecting a keystone failure, but
    because of an error in the requests/urllib3 library it was returning a
    different exception and causing our tests to fail, see[1].

    Independent of the the problem above on tests we should not rely on some
    external library failing like that, we should mock this failures to make
    our tests more reliable and that's what this patch is doing.

    [1] https://bugs.launchpad.net/ospurge/+bug/1503768

    Change-Id: I3e6091eb2bc221a16fdc18b998ba138058818894
    Closes-Bug: #1504197
    (cherry picked from commit 42d52af3c2238900eb69217bba5dbbcdca63abf0)

tags: added: in-stable-liberty
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers