Skip to content

[feature] Added settings to configure data dir of InfluxDB#33

Open
cbeaujoin-stellar wants to merge 2 commits into
openwisp:masterfrom
cbeaujoin-stellar:influxdb_data_dir
Open

[feature] Added settings to configure data dir of InfluxDB#33
cbeaujoin-stellar wants to merge 2 commits into
openwisp:masterfrom
cbeaujoin-stellar:influxdb_data_dir

Conversation

@cbeaujoin-stellar
Copy link
Copy Markdown
Member

I reopened #31 here because it get close automatically when I tried to rebase.

# When "influxdb_data_dir" is set to a path different from the default
# (/var/lib/influxdb), InfluxDB will store its data in the specified directory.
influxdb_data_dir: "/opt/influxdb"

Copy link
Copy Markdown
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale for adding this logic to the role itself?

You can already create an alternative data directory using pre_tasks and adjust the InfluxDB configuration with standard tasks or post_tasks in your own playbook.

The role does not overwrite custom InfluxDB settings, so this scenario can be supported without changes on this role.

For this reason, I’m not convinced we should include this feature in the role. It appears to address a system administration use case that is quite specific and not a general need for most OpenWISP users.

Keeping this customization outside the role helps avoid additional maintenance work for the core team but also allows you to change this code freely without waiting for our approval and add more logic if you need.

@cbeaujoin-stellar
Copy link
Copy Markdown
Member Author

What is the rationale for adding this logic to the role itself?

You can already create an alternative data directory using pre_tasks and adjust the InfluxDB configuration with standard tasks or post_tasks in your own playbook.

The role does not overwrite custom InfluxDB settings, so this scenario can be supported without changes on this role.

For this reason, I’m not convinced we should include this feature in the role. It appears to address a system administration use case that is quite specific and not a general need for most OpenWISP users.

Keeping this customization outside the role helps avoid additional maintenance work for the core team but also allows you to change this code freely without waiting for our approval and add more logic if you need.

The only rational is about the way it is called in ansible-openwisp2:
https://github.com/openwisp/ansible-openwisp2/blob/master/meta/main.yml#L11

Do we want to add pre_tasks or post_tasks in the playbook running ansible-openwisp2 for underlying role that install and configure influxdb or should it be seamlessly integrated in ansible-openwisp2 role.

We have to trade off, but in the case we add it to the role, yes it implies maintenance, for most OpenWISP users the default has no impact, it would be more integrated with the ansible-openwisp2 role & playbook.

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

Successfully merging this pull request may close these issues.

2 participants