Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when recalculating policies if the node has no inheritance information #265

Open
System25 opened this issue Aug 31, 2020 · 0 comments

Comments

@System25
Copy link
Contributor

When a computer has no inheritance information that the user clicks the recalculate policies button the following error appears:

[2020-08-31 07:42:09,129: ERROR/MainProcess] [5f48f975c19e1638e29e606d] tasks.py ::: report_generic_error - message = No save in chef server. 'inheritance'
[2020-08-31 07:42:09,130: ERROR/MainProcess] [5f48f975c19e1638e29e606d] Traceback (most recent call last):
  File "/opt/gecosccui-2.6.0/lib/python2.7/site-packages/gecoscc/tasks.py", line 2281, in object_refresh_policies
    return func(user, obj, computers=computers)
  File "/opt/gecosccui-2.6.0/lib/python2.7/site-packages/gecoscc/tasks.py", line 2008, in computer_refresh_policies
    self.object_refresh_policies(user, ou, computers=computers)
  File "/opt/gecosccui-2.6.0/lib/python2.7/site-packages/gecoscc/tasks.py", line 1703, in object_refresh_policies
    self.object_action(user, objnew, action='recalculate policies', computers=computers)
  File "/opt/gecosccui-2.6.0/lib/python2.7/site-packages/gecoscc/tasks.py", line 1599, in object_action
    recalculate_policies_for_computers(self.logger, self.db, obj, computers)
  File "/opt/gecosccui-2.6.0/lib/python2.7/site-packages/gecoscc/utils.py", line 1630, in recalculate_policies_for_computers
    recalculate_inherited_field(logger, db, str(obj['_id']))
  File "/opt/gecosccui-2.6.0/lib/python2.7/site-packages/gecoscc/utils.py", line 2285, in recalculate_inherited_field
    for policy in get_inheritance_tree_policies_list(obj['inheritance'], []):
KeyError: 'inheritance'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant