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

Bad default location for REPORTS_ROOT #54

Closed
bdlamprecht opened this issue Mar 8, 2018 · 4 comments
Closed

Bad default location for REPORTS_ROOT #54

bdlamprecht opened this issue Mar 8, 2018 · 4 comments
Labels
awaiting answer There is still some open discussion.

Comments

@bdlamprecht
Copy link
Contributor

Current Behavior

Due to the way your current implementation references configuration files located in /etc/netbox/ instead of /opt/netbox/netbox/netbox/, when you browse to http://localhost/extras/reports/, the following is seen:

image

Yes, I know this can be changed in the netbox.env by setting a value for REPORTS_ROOT, however, in my opinion, this "default" is not a good idea. I don't believe anyone is going to use the /etc/reports location to store custom python scripts specific to NetBox.

I'd like to propose using /etc/netbox/reports/ as an alternative, but I didn't want to go through the hassle of creating a PR if it wasn't going to be merged.

What are your thoughts one way or the other?

Expected Behavior

N/A

Debug Information

N/A

@cimnine
Copy link
Collaborator

cimnine commented Mar 9, 2018

You're right, /etc/reports is a bad location for the reports. IMO this happened when we moved the 'main' configuration file to /etc/netbox and BASE_DIR now expands to /etc rather than /opt/netbox/netbox.

I agree that /etc/netbox/reports would be a good location. But I want to make sure this works out when using a configuration managed by Kubernetes/OpenShift. And I'm not entirely sure it does in a nice way.

IMO the nice way would be to have two separate ConfigMaps, one for reports and one for configuration. And when the one for configuration is mapped to /etc/netbox, I'm not sure if we can map the one for reports to /etc/netbox/reports.

So the main configuration might have to be moved to somewhere else, e.g. /etc/netbox/config, so that config and reports can co-exist.

Or am I over-complicating matters and it's fine to have one ConfigMap for config and reports?

I'd love to hear your opinion on this, and @tobiasge's as well, as he initially suggested to move the configuration to /etc/netbox.

@tobiasge
Copy link
Member

tobiasge commented Mar 9, 2018

Hello,

at the moment we're not using reports but I also think /etc/netbox/reports would be a good location for that. But you're right. You can't map to /etc/netbox/reports when the configuration is mapped to /etc/netbox in Openshift.
So the proposal with mapping to /etc/netbox/config and /etc/netbox/reports is a good solution.

I won't be able to implement this now because I'm on holiday for the next weeks. If this can wait I will do the implementation.

@flipkill1985 Could you test this in our deployment?

@cimnine cimnine added the awaiting answer There is still some open discussion. label Mar 12, 2018
@cimnine
Copy link
Collaborator

cimnine commented Mar 29, 2018

@tobiasge Have you had the chance to look into this? Would one ConfigMap for config and reports be fine or do you think they should better be separated?

@tobiasge
Copy link
Member

tobiasge commented Apr 3, 2018

Hello,
I'm back now. I think it would be better to have them separated. This makes it possible for the user to also define a persistent volume in Openshift.

@cimnine cimnine closed this as completed in b46bd58 Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting answer There is still some open discussion.
Projects
None yet
Development

No branches or pull requests

3 participants