Comment 7 for bug 1423952

Revision history for this message
Matt Riedemann (mriedem) wrote :

Confirmed, we can't even pass unit tests with that KeyError:

nova.tests.unit.compute.test_compute_mgr.ComputeManagerUnitTestCase.test_set_admin_password_bad_state
-----------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
        return func(*args, **keywargs)
      File "nova/tests/unit/compute/test_compute_mgr.py", line 1889, in test_set_admin_password_bad_state
        self.context, instance, None)
      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/compute/manager.py", line 420, in decorated_function
        return function(self, context, *args, **kwargs)
      File "nova/exception.py", line 88, in wrapped
        payload)
      File "/home/mriedem/git/nova/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
        six.reraise(self.type_, self.value, self.tb)
      File "nova/exception.py", line 71, in wrapped
        return f(self, context, *args, **kw)
      File "nova/compute/manager.py", line 296, in decorated_function
        instance_uuid = kwargs['instance']['uuid']
    KeyError: 'instance'