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

Allow the absolute path to the storage directory to be specified in the config file #164

Open
mschuckmann opened this issue Jul 24, 2024 · 2 comments

Comments

@mschuckmann
Copy link

Describe the feature

The current implementation has the dir attribute in the storage/volume section of the config file. However, the dir field is always relative to the environment variable ZENOH_BACKEND_FS_ROOT (or ZENOH_HOME based on some complicated rules).

It seems like it would be more consistent and user friendly if the storage configuration could be completely self contained in the config file. This could be accomplished by allowing the dir attribute to be an absolute path or by adding another attribute to the config file possibly at the storage_manager level for the backend root location.

@oteffahi
Copy link
Contributor

oteffahi commented Sep 5, 2024

Hello @mschuckmann
My understanding is that by default ZENOH_BACKEND_FS_ROOT=${ZENOH_HOME}/zenoh-backend-filesystem. The same logic applies to all backends. This behavior aligns with CLI and database tools that limit their actions to their home directory by default. If you wish to use an absolute path for your database file, you can set ZENOH_BACKEND_FS_ROOT=/ before running your zenoh instance, which will effectively interpret the dir as an absolute path.

@Charles-Schleich could you please confirm if we plan on implementing a different behavior for database file paths?

@mschuckmann
Copy link
Author

mschuckmann commented Sep 5, 2024

It just seems really odd that this is the only thing that is not configurable from a zenoh configuration file.

I'm also not sure about the concept of limiting it to the home directory. I would expect that many deployments would run the zenohd process as a service and have a user with no home directory. Yes the service could set ZENOH_BACKEND_FS_ROOT=/ but why not allow the configuration to be completely self-contained in the configuration file?

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

No branches or pull requests

2 participants