once reading policy_file, fault when policy_file is removed

Bug #1844292 reported by Hiroyuki Jo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.policy
In Progress
Undecided
Hiroyuki Jo

Bug Description

once reading policy_file, fault occurs when policy_file is removed.

 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors File "/opt/stack/tacker/tacker/policy.py", line 435, in check_is_admin
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors return _ENFORCER.authorize(ADMIN_CTX_POLICY, credentials, credentials)
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors File "/usr/local/lib/python2.7/dist-packages/oslo_policy/policy.py", line 1037, in authorize
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors *args, **kwargs)
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors File "/usr/local/lib/python2.7/dist-packages/oslo_policy/policy.py", line 849, in enforce
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors self.load_rules()
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors File "/usr/local/lib/python2.7/dist-packages/oslo_policy/policy.py", line 565, in load_rules
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors overwrite=self.overwrite)
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors File "/usr/local/lib/python2.7/dist-packages/oslo_policy/policy.py", line 791, in _load_policy_file
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors self._file_cache, path, force_reload=force_reload)
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors File "/usr/local/lib/python2.7/dist-packages/oslo_policy/_cache_handler.py", line 36, in read_cached_file
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors mtime = os.path.getmtime(filename)
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors File "/usr/lib/python2.7/genericpath.py", line 62, in getmtime
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors return os.stat(filename).st_mtime
 9月 17 17:36:49 uracil tacker-server[23575]: 2019-09-17 17:36:49.736 TRACE oslo_middleware.catch_errors OSError: [Errno 2] No such file or directory: '/etc/tacker/policy.json'

Hiroyuki Jo (joxyuki)
Changed in oslo.policy:
assignee: nobody → Hiroyuki Jo (joxyuki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.policy (master)

Fix proposed to branch: master
Review: https://review.opendev.org/682838

Changed in oslo.policy:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.policy (master)

Change abandoned by Hiroyuki Jo (<email address hidden>) on branch: master
Review: https://review.opendev.org/682838
Reason: Thanks, abandon mine. I put my comment on your patch and please have a look.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.