← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1823977] [NEW] policy.json: circular reference error on http rules

 

Public bug reported:

Http rules in policy.json don't work now because json.dumps can't dump
token in credentials.

Looks like we don't need token at all in credentials.

Resolution:  remove token from credentials.

Logs:

```
[Mon Apr 08 16:10:56.374789 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_policy/policy.py", line 746, in enforce
[Mon Apr 08 16:10:56.374807 2019] [:error] [pid 20898]     current_rule=rule,
[Mon Apr 08 16:10:56.374811 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_policy/_checks.py", line 81, in _check
[Mon Apr 08 16:10:56.374815 2019] [:error] [pid 20898]     return rule(*rule_args)
[Mon Apr 08 16:10:56.374819 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_policy/_external.py", line 41, in __call__
[Mon Apr 08 16:10:56.374824 2019] [:error] [pid 20898]     enforcer, target)
[Mon Apr 08 16:10:56.374834 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_policy/_external.py", line 68, in _construct_payload
[Mon Apr 08 16:10:56.374838 2019] [:error] [pid 20898]     'credentials': jsonutils.dumps(creds)}
[Mon Apr 08 16:10:56.374842 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_serialization/jsonutils.py", line 190, in dumps
[Mon Apr 08 16:10:56.374847 2019] [:error] [pid 20898]     return json.dumps(obj, default=default, **kwargs)
[Mon Apr 08 16:10:56.374851 2019] [:error] [pid 20898]   File "/usr/lib64/python2.7/json/__init__.py", line 250, in dumps
[Mon Apr 08 16:10:56.374855 2019] [:error] [pid 20898]     sort_keys=sort_keys, **kw).encode(obj)
[Mon Apr 08 16:10:56.374859 2019] [:error] [pid 20898]   File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
[Mon Apr 08 16:10:56.374864 2019] [:error] [pid 20898]     chunks = self.iterencode(o, _one_shot=True)
[Mon Apr 08 16:10:56.374867 2019] [:error] [pid 20898]   File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
[Mon Apr 08 16:10:56.374871 2019] [:error] [pid 20898]     return _iterencode(o, 0)
```

** Affects: horizon
     Importance: Undecided
     Assignee: George Melikov (gmelikov)
         Status: New

** Changed in: horizon
     Assignee: (unassigned) => George (gmelikov)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1823977

Title:
  policy.json: circular reference error on http rules

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Http rules in policy.json don't work now because json.dumps can't dump
  token in credentials.

  Looks like we don't need token at all in credentials.

  Resolution:  remove token from credentials.

  Logs:

  ```
  [Mon Apr 08 16:10:56.374789 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_policy/policy.py", line 746, in enforce
  [Mon Apr 08 16:10:56.374807 2019] [:error] [pid 20898]     current_rule=rule,
  [Mon Apr 08 16:10:56.374811 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_policy/_checks.py", line 81, in _check
  [Mon Apr 08 16:10:56.374815 2019] [:error] [pid 20898]     return rule(*rule_args)
  [Mon Apr 08 16:10:56.374819 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_policy/_external.py", line 41, in __call__
  [Mon Apr 08 16:10:56.374824 2019] [:error] [pid 20898]     enforcer, target)
  [Mon Apr 08 16:10:56.374834 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_policy/_external.py", line 68, in _construct_payload
  [Mon Apr 08 16:10:56.374838 2019] [:error] [pid 20898]     'credentials': jsonutils.dumps(creds)}
  [Mon Apr 08 16:10:56.374842 2019] [:error] [pid 20898]   File "/usr/lib/python2.7/site-packages/oslo_serialization/jsonutils.py", line 190, in dumps
  [Mon Apr 08 16:10:56.374847 2019] [:error] [pid 20898]     return json.dumps(obj, default=default, **kwargs)
  [Mon Apr 08 16:10:56.374851 2019] [:error] [pid 20898]   File "/usr/lib64/python2.7/json/__init__.py", line 250, in dumps
  [Mon Apr 08 16:10:56.374855 2019] [:error] [pid 20898]     sort_keys=sort_keys, **kw).encode(obj)
  [Mon Apr 08 16:10:56.374859 2019] [:error] [pid 20898]   File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
  [Mon Apr 08 16:10:56.374864 2019] [:error] [pid 20898]     chunks = self.iterencode(o, _one_shot=True)
  [Mon Apr 08 16:10:56.374867 2019] [:error] [pid 20898]   File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
  [Mon Apr 08 16:10:56.374871 2019] [:error] [pid 20898]     return _iterencode(o, 0)
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1823977/+subscriptions


Follow ups