← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1505394] [NEW] nova.tests.unit.test_exceptions.test_exceptions_raise fails with webob 1.5.0

 

Public bug reported:

nova.tests.unit.test_exception.ExceptionTestCase.test_exceptions_raise
----------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "nova/tests/unit/test_exception.py", line 160, in test_exceptions_raise
        self.assertRaises(exc, self._raise_exc, exc)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
        self.assertThat(our_callable, matcher)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
        mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
        mismatch = matcher.match(matchee)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
        mismatch = self.exception_matcher.match(exc_info)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
        mismatch = matcher.match(matchee)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
        reraise(*matchee)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
        result = matchee()
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
        return self._callable_object(*self._args, **self._kwargs)
      File "nova/tests/unit/test_exception.py", line 152, in _raise_exc
        raise exc()
      File "nova/exception.py", line 54, in __init__
        super(ConvertedException, self).__init__()
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/webob/exc.py", line 256, in __init__
        **kw)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/webob/response.py", line 107, in __init__
        self.status = status
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/webob/response.py", line 252, in _status__set
        self.status_code = code
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/webob/response.py", line 283, in _status_code__set
        self._status = '%d %s' % (code, status_generic_reasons[code // 100])
    KeyError: 0


Looks like webob 1.5.0 isn't handling the default status code of 0 set in nova.exception.ConvertedException.  I'm seeing this locally with webob 1.5.0, I'm not sure why we're not seeing it upstream, although we have webob capped at 1.4.1 in upper-constraints:

https://github.com/openstack/requirements/blob/master/upper-
constraints.txt#L25

But I didn't think we were using that in the gate-nova-python27 job.

** Affects: cinder
     Importance: Undecided
         Status: New

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: testing

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1505394

Title:
  nova.tests.unit.test_exceptions.test_exceptions_raise fails with webob
  1.5.0

Status in Cinder:
  New
Status in OpenStack Compute (nova):
  New

Bug description:
  nova.tests.unit.test_exception.ExceptionTestCase.test_exceptions_raise
  ----------------------------------------------------------------------

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):
        File "nova/tests/unit/test_exception.py", line 160, in test_exceptions_raise
          self.assertRaises(exc, self._raise_exc, exc)
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
          self.assertThat(our_callable, matcher)
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
          mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
          mismatch = matcher.match(matchee)
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
          mismatch = self.exception_matcher.match(exc_info)
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
          mismatch = matcher.match(matchee)
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
          reraise(*matchee)
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
          result = matchee()
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
          return self._callable_object(*self._args, **self._kwargs)
        File "nova/tests/unit/test_exception.py", line 152, in _raise_exc
          raise exc()
        File "nova/exception.py", line 54, in __init__
          super(ConvertedException, self).__init__()
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/webob/exc.py", line 256, in __init__
          **kw)
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/webob/response.py", line 107, in __init__
          self.status = status
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/webob/response.py", line 252, in _status__set
          self.status_code = code
        File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/webob/response.py", line 283, in _status_code__set
          self._status = '%d %s' % (code, status_generic_reasons[code // 100])
      KeyError: 0

  
  Looks like webob 1.5.0 isn't handling the default status code of 0 set in nova.exception.ConvertedException.  I'm seeing this locally with webob 1.5.0, I'm not sure why we're not seeing it upstream, although we have webob capped at 1.4.1 in upper-constraints:

  https://github.com/openstack/requirements/blob/master/upper-
  constraints.txt#L25

  But I didn't think we were using that in the gate-nova-python27 job.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1505394/+subscriptions


Follow ups