yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #15975
[Bug 1302611] Re: policy.init called too many time for each API request
** Changed in: neutron
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1302611
Title:
policy.init called too many time for each API request
Status in OpenStack Neutron (virtual network service):
Fix Released
Bug description:
policy.init() checks whether the rule cache is populated and valid,
and if not reloads the policy cache from the policy.json file.
As the current code runs init() each time a policy is checked or enforced, list operations will call init() several times (*)
If policy.json is updated while a response is being generated, this will lead to a situation where some item are processed according to the old policies, and other according to the new ones, which would be wrong.
Also, init() checks the last update time of the policy file, and
repeating this check multiple time is wasteful.
A simple solution would be to explicitly call policy.init from
api.v2.base.Controller in order to ensure the method is called only
once per API request.
(*) a GET /ports operation returning 1600 ports calls policy.init()
9606 times
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1302611/+subscriptions
References