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

[Bug]: Inventory plugin call /api/status and produce Page Not Found Django warning #1335

Open
ihumster opened this issue Oct 14, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ihumster
Copy link

Ansible NetBox Collection version

v3.20.0

Ansible version

ansible [core 2.16.3]
  config file = None
  configured module search path = ['/Users/aenikitin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/aenikitin/.pyenv/versions/3.12.2/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/aenikitin/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/aenikitin/.pyenv/versions/3.12.2/bin/ansible
  python version = 3.12.2 (main, Feb 18 2024, 17:46:45) [Clang 15.0.0 (clang-1500.1.0.2.5)] (/Users/aenikitin/.pyenv/versions/3.12.2/bin/python3.12)
  jinja version = 3.1.4
  libyaml = True

NetBox version

v.3.6.9

Python version

3.10

Steps to Reproduce

Connect your netbox instance to sentry and just use nb_inventory plugin.

Expected Behavior

Sentry can't get Page Not Found warning for /api/status url.

Observed Behavior

Sentry get Page Not Found warning for /api/status url.

@ihumster ihumster added the bug Something isn't working label Oct 14, 2024
ihumster pushed a commit to ihumster/ansible_modules that referenced this issue Oct 14, 2024
@ihumster ihumster mentioned this issue Oct 14, 2024
3 tasks
@dannywade
Copy link

@ihumster Thank you for raising this issue and providing a fix! I've been trying to use the nb_inventory plugin to sync my NetBox inventory and keep receiving the following error message: Invalid host pattern 'plugin:' supplied, ending in ':' is not allowed, this. After some research, it seemed like the issue was with my inventory file (wrong key/value) or authenticating to my NetBox instance, but I was able to confirm neither were a problem. I'm very glad I came across this issue - it saved me from more headaches. Hopefully this gets merged soon!

@sc68cal
Copy link
Contributor

sc68cal commented Oct 15, 2024

Hi, what is Sentry? My concern around this is that we have a lot of users that put proxies in front of NetBox that cause all kinds of problems, and I'd like to know more about your setup before accepting your PR that fixes this issue.

@sc68cal
Copy link
Contributor

sc68cal commented Oct 15, 2024

Nevermind I took a look at https://github.com/netbox-community/netbox/blame/develop/netbox/netbox/urls.py#L56

@ihumster
Copy link
Author

@sc68cal
Copy link
Contributor

sc68cal commented Oct 15, 2024

Ok, I understand now, it was emitting a warning in the logs of the server running NetBox and Sentry was warning you about it?

@ihumster
Copy link
Author

Yes. Every run ansible-playbook or ansible-inventory generate Page Not Found issue in Sentry.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants