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

Setting GRAPH_FACTS causes a 500 error #907

Closed
yakatz opened this issue Jul 26, 2023 · 0 comments · Fixed by #908
Closed

Setting GRAPH_FACTS causes a 500 error #907

yakatz opened this issue Jul 26, 2023 · 0 comments · Fixed by #908
Labels

Comments

@yakatz
Copy link
Contributor

yakatz commented Jul 26, 2023

Describe the bug

We set GRAPH_FACTS = "architecture,puppetversion,osfamily" in the config file. This seems to cause an error when loading node facts:

ERROR:puppetboard.core:Exception on /node/dc4.example.com/facts/json [GET]
Traceback (most recent call last):
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/puppetboard/views/facts.py", line 50, in fact_ajax
    if fact in app.config['GRAPH_FACTS'] and value is None and node is None:
TypeError: 'in <string>' requires string as left operand, not NoneType

Puppetboard version

4.3.0

Environment and installation method

  • Rocky Linux 9.2 with Python 3.9.16 from the OS repositories
  • installed with the Forge module v9.0.0 and using the PyPI package (default).
@yakatz yakatz added the bug label Jul 26, 2023
yakatz added a commit to yakatz/puppetboard that referenced this issue Jul 26, 2023
Not sure how this ever worked - on a node page, `fact` defaults to `None` and produces this error `TypeError: 'in <string>' requires string as left operand, not NoneType`

Fixes voxpupuli#907
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant