Activity log for bug #1603979

Date Who What changed Old value New value Message
2016-07-18 12:27:59 Tang Chen bug added bug
2016-07-18 12:28:08 Tang Chen nova: assignee Tang Chen (tangchen)
2016-07-18 12:31:05 Tang Chen description Description =========== The following 3 tests failed: 1. nova.tests.unit.test_context.ContextTestCase.test_convert_from_dict_then_to_dict Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "nova/tests/unit/test_context.py", line 230, in test_convert_from_dict_then_to_dict self.assertEqual(values, values2) File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual self.assertThat(observed, matcher, message) File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat raise mismatch_error testtools.matchers._impl.MismatchError: !=: reference = { ...... 'is_admin': True, ......} actual = { ...... 'is_admin': True, 'is_admin_project': True, ......} 2. nova.tests.unit.test_context.ContextTestCase.test_convert_from_rc_to_dict Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "nova/tests/unit/test_context.py", line 203, in test_convert_from_rc_to_dict self.assertEqual(expected_values, values2) File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual self.assertThat(observed, matcher, message) File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat raise mismatch_error testtools.matchers._impl.MismatchError: !=: reference = { ...... 'is_admin': True, ......} actual = { ...... 'is_admin': True, 'is_admin_project': True, ......} 3. nova.tests.unit.test_context.ContextTestCase.test_to_dict_from_dict_no_log Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "nova/tests/unit/test_context.py", line 144, in test_to_dict_from_dict_no_log self.assertEqual(0, len(warns), warns) File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual self.assertThat(observed, matcher, message) File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat raise mismatch_error testtools.matchers._impl.MismatchError: 0 != 1: ["Arguments dropped when creating context: {'is_admin_project': True}"] Steps to reproduce ================== Just run the context tests: tox -e py27 test_context This is because we missed to pass "is_admin_project" parameter to __init__() of oslo.context.ResourceContext. Description =========== The following 3 tests failed: 1. nova.tests.unit.test_context.ContextTestCase.test_convert_from_dict_then_to_dict Captured traceback: ~~~~~~~~~~~~~~~~~~~     Traceback (most recent call last):       File "nova/tests/unit/test_context.py", line 230, in test_convert_from_dict_then_to_dict         self.assertEqual(values, values2)       File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual         self.assertThat(observed, matcher, message)       File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat         raise mismatch_error     testtools.matchers._impl.MismatchError: !=:     reference = {      ......      'is_admin': True,      ......}     actual = {      ......      'is_admin': True,      'is_admin_project': True,      ......} 2. nova.tests.unit.test_context.ContextTestCase.test_convert_from_rc_to_dict Captured traceback: ~~~~~~~~~~~~~~~~~~~     Traceback (most recent call last):       File "nova/tests/unit/test_context.py", line 203, in test_convert_from_rc_to_dict         self.assertEqual(expected_values, values2)       File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual         self.assertThat(observed, matcher, message)       File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat         raise mismatch_error     testtools.matchers._impl.MismatchError: !=:     reference = {      ......      'is_admin': True,      ......}     actual = {      ......      'is_admin': True,      'is_admin_project': True,      ......} 3. nova.tests.unit.test_context.ContextTestCase.test_to_dict_from_dict_no_log Captured traceback: ~~~~~~~~~~~~~~~~~~~     Traceback (most recent call last):       File "nova/tests/unit/test_context.py", line 144, in test_to_dict_from_dict_no_log         self.assertEqual(0, len(warns), warns)       File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual         self.assertThat(observed, matcher, message)       File "/opt/stack/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat         raise mismatch_error     testtools.matchers._impl.MismatchError: 0 != 1: ["Arguments dropped when creating context: {'is_admin_project': True}"] Steps to reproduce ================== Just run the context tests:     tox -e py27 test_context This is because we missed to pass "is_admin_project" parameter to __init__() of oslo.context.ResourceContext when initializing a nova ResourceContext object. In nova/context.py @enginefacade.transaction_context_provider class RequestContext(context.RequestContext): """Security context and request information. Represents the user taking a given action within the system. """ def __init__(self, user_id=None, project_id=None, is_admin=None, read_deleted="no", roles=None, remote_address=None, timestamp=None, request_id=None, auth_token=None, overwrite=True, quota_class=None, user_name=None, project_name=None, service_catalog=None, instance_lock_checked=False, user_auth_plugin=None, **kwargs): ...... super(RequestContext, self).__init__( ...... is_admin=is_admin, ......) But in oslo_context/context.py, class RequestContext(object): ...... def __init__(...... is_admin=False, ...... is_admin_project=True):
2016-07-18 12:41:31 OpenStack Infra nova: status New In Progress
2016-07-18 13:27:32 Markus Zoeller (markus_z) nova: importance Undecided Critical
2016-07-18 13:27:49 Markus Zoeller (markus_z) summary context tests failed because missing parameter "is_admin_project" gate: context tests failed because missing parameter "is_admin_project"
2016-07-18 14:40:01 Matt Riedemann summary gate: context tests failed because missing parameter "is_admin_project" gate: context tests failed because missing parameter "is_admin_project" (oslo.context 2.6.0)
2016-07-18 14:40:08 Matt Riedemann tags oslo
2016-07-19 07:59:33 Markus Zoeller (markus_z) nova: status In Progress Fix Released
2016-07-25 06:52:45 ChangBo Guo(gcb) nova: status Fix Released In Progress
2016-07-26 17:05:49 Markus Zoeller (markus_z) nova: status In Progress Fix Released