AttributeError: 'Cluster' object has no attribute 'trustee_domain_id' when using magnum-ui
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magnum |
Fix Released
|
Undecided
|
Mark Goddard |
Bug Description
When using the magnum-ui horizon extension, viewing clusters or cluster templates fails with the following error in magnum API:
AttributeError: 'Cluster' object has no attribute 'trustee_domain_id'
Detailed traceback from the logs:
2017-05-10 11:10:33.165 26 ERROR wsme.api [req-18c98aeb-
Traceback (most recent call last):
File "/usr/lib/
result = f(self, *args, **kwargs)
File "/usr/lib/
action=
File "/usr/lib/
do_
File "/usr/lib/
result = self.rules[
File "/usr/lib/
return enforcer.
File "/usr/lib/
return not self.rule(target, cred, enforcer)
File "/usr/lib/
match = self.match % target
File "/usr/lib/
return getattr(self, name)
AttributeError: 'Cluster' object has no attribute 'trustee_domain_id'
2017-05-10 11:10:33.166 26 INFO werkzeug [req-18c98aeb-
Analysis:
This seems to be happening because the magnum API passes magnum.
Workaround:
I have locally worked around this [2].
[1] https:/
[2] https:/
Changed in magnum: | |
assignee: | nobody → Mark Goddard (mgoddard) |
The workaround that I initially provided has proven not to work as it prevents oslo_policy from accessing some necessary fields in the cluster object.
My second attempt[1] is looking more promising. It converts the RPC objects to mutable mappings using the as_dict() method.
[1] https:/ /github. com/stackhpc/ magnum/ commit/ 186e10f7629c81c 61301c6ca98fd7a 6745d56eeb