REPORTS_ROOT config variable #1465

Closed
opened 2025-12-29 16:32:19 +01:00 by adam · 0 comments
Owner

Originally created by @LBegnaud on GitHub (Dec 19, 2017).

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: Python 2.7.5
  • NetBox version: v2.2.7

Description

Steps to reproduce

  • Set REPORTS_ROOT config variable
    • image
  • delete default netbox/reports directory
  • restart netbox
  • browse to oraganization > reports
  • error about no reports existing will include the custom REPORTS_ROOT path
    • image
  • install a report module into custom directory
  • restart netbox
  • browse to organizations > reports
  • A generic error is presented about the module not existing.
    • image
  • Move the report to the original reports directory and restart netbox and the report will function.
    • Optionally, a symlink can be created to circumvent the problem (ln -s /path/to/custom/dir /opt/netbox/netbox/reports), but obviously this reduces the usefulness of a custom config option
    • image
  • Report runs just fine
    • image

I didn't dig through the source code, but it seems like the custom value is being used in some parts of the code, but a hardcoded value is used in others? Or maybe I'm overlooking something really simple.

Originally created by @LBegnaud on GitHub (Dec 19, 2017). ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [x] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: Python 2.7.5 * NetBox version: v2.2.7 <!-- BUG REPORTS must include: * A list of the steps needed for someone else to reproduce the bug * A description of the expected and observed behavior * Any relevant error messages (screenshots may also help) FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> ### Description Steps to reproduce - Set REPORTS_ROOT config variable - ![image](https://user-images.githubusercontent.com/15981748/34180894-e1d9e1e6-e4d5-11e7-8be7-14132474daa6.png) - delete default netbox/reports directory - restart netbox - browse to oraganization > reports - error about no reports existing will include the custom REPORTS_ROOT path - ![image](https://user-images.githubusercontent.com/15981748/34181046-6081fe34-e4d6-11e7-922a-2c8de9f4bf0c.png) - install a report module into custom directory - restart netbox - browse to organizations > reports - A generic error is presented about the module not existing. - ![image](https://user-images.githubusercontent.com/15981748/34180988-306b8e7c-e4d6-11e7-9874-b061580d117d.png) - Move the report to the original reports directory and restart netbox and the report will function. - Optionally, a symlink can be created to circumvent the problem (`ln -s /path/to/custom/dir /opt/netbox/netbox/reports`), but obviously this reduces the usefulness of a custom config option - ![image](https://user-images.githubusercontent.com/15981748/34180936-0602341a-e4d6-11e7-9ec0-4870b8545c8a.png) - Report runs just fine - ![image](https://user-images.githubusercontent.com/15981748/34181100-92d5206e-e4d6-11e7-940f-04f7f27aeb12.png) I didn't dig through the source code, but it seems like the custom value is being used in some parts of the code, but a hardcoded value is used in others? Or maybe I'm overlooking something really simple.
adam added the type: bugstatus: accepted labels 2025-12-29 16:32:19 +01:00
adam closed this issue 2025-12-29 16:32:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1465