yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #31605
[Bug 1435327] Re: api unittest failed with policy config in '/etc/nova/policy.d'
** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => kilo-rc1
--
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/1435327
Title:
api unittest failed with policy config in '/etc/nova/policy.d'
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
After v2.1 policy separated into policy.d. The unittest will failed.
Because fake policy fixture will load policy config from real
'/etc/nova/policy.d' which override the fake policy rules.
{7} nova.tests.unit.api.openstack.compute.contrib.test_cells.CellsTestV21.test_detail [0.020009s] ... FAILED
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "nova/tests/unit/api/openstack/compute/contrib/test_cells.py", line 119, in test_detail
res_dict = self.controller.detail(req)
File "nova/api/openstack/extensions.py", line 478, in wrapped
return f(*args, **kwargs)
File "nova/api/openstack/common.py", line 551, in inner
return function(*args, **kwargs)
File "nova/api/openstack/compute/plugins/v3/cells.py", line 121, in detail
authorize(ctxt)
File "nova/api/openstack/extensions.py", line 347, in authorize
nova.policy.enforce(context, act, target)
File "nova/policy.py", line 104, in enforce
{'action': action, 'credentials': credentials})
File "/opt/stack/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/policy.py", line 98, in enforce
do_raise=do_raise, exc=exc, action=action)
File "nova/openstack/common/policy.py", line 363, in enforce
raise exc(*args, **kwargs)
nova.exception.PolicyNotAuthorized: Policy doesn't allow os_compute_api:os-cells to be performed.
{5} nova.tests.unit.api.openstack.compute.contrib.test_aggregates.AggregateTestCaseV21.test_remove_host_no_admin [0.027056s] ... ok
{7} nova.tests.unit.api.openstack.compute.contrib.test_cells.CellsTestV21.test_index [0.018851s] ... FAILED
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "nova/tests/unit/api/openstack/compute/contrib/test_cells.py", line 109, in test_index
res_dict = self.controller.index(req)
File "nova/api/openstack/extensions.py", line 478, in wrapped
return f(*args, **kwargs)
File "nova/api/openstack/common.py", line 551, in inner
return function(*args, **kwargs)
File "nova/api/openstack/compute/plugins/v3/cells.py", line 113, in index
authorize(ctxt)
File "nova/api/openstack/extensions.py", line 347, in authorize
nova.policy.enforce(context, act, target)
File "nova/policy.py", line 104, in enforce
{'action': action, 'credentials': credentials})
File "/opt/stack/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/policy.py", line 98, in enforce
do_raise=do_raise, exc=exc, action=action)
File "nova/openstack/common/policy.py", line 363, in enforce
raise exc(*args, **kwargs)
nova.exception.PolicyNotAuthorized: Policy doesn't allow os_compute_api:os-cells to be performed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1435327/+subscriptions
References