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

/var/lib/buttervolume/config/config.ini is not read #33

Open
bananer opened this issue Aug 18, 2020 · 3 comments
Open

/var/lib/buttervolume/config/config.ini is not read #33

bananer opened this issue Aug 18, 2020 · 3 comments

Comments

@bananer
Copy link
Contributor

bananer commented Aug 18, 2020

In the readme it says, I can put configuration settings into

/etc/buttervolume/config.ini file inside the container or /var/lib/buttervolume/config/config.ini on the host

However, I tried changing my snapshots and volumes path in /var/lib/buttervolume/config/config.ini but they still end up in the default place.

Quickly searching through the code also shows no references to that file, it might be an error in the readme.

However, configuring through a file on the host would be useful to me. I could not figure out the other option of setting environment variables for configuration.

@petrus-v
Copy link

I think this is the bunch of code you are looking for: https://github.com/anybox/buttervolume/blob/master/buttervolume/plugin.py#L14-L37

As you can reand the getconfig doctstring you can also set environment variable to your plugin container.

This should looks likes:

config file environment default description
VOLUMES_PATH BUTTERVOLUME_VOLUMES_PATH /var/lib/buttervolume/volumes/
SNAPSHOTS_PATH BUTTERVOLUME_SNAPSHOTS_PATH /var/lib/buttervolume/snapshots/
TEST_REMOTE_PATH BUTTERVOLUME_TEST_REMOTE_PATH /var/lib/buttervolume/received/ this is used for testing purpose as in production snapshots are send to the remote SNAPSHOTS_PATH
SCHEDULE BUTTERVOLUME_SCHEDULE /etc/buttervolume/schedule.csv'
DRIVERNAME BUTTERVOLUME_DRIVERNAME anybox/buttervolume:latest
RUNPATH BUTTERVOLUME_RUNPATH /run/docker
SOCKET BUTTERVOLUME_SOCKET os.path.join(RUNPATH, 'plugins', 'btrfs.sock')

hop it helps

@bananer
Copy link
Contributor Author

bananer commented Aug 20, 2020

@petrus-v thanks for looking into this!

It seems like the code you pointed to only reads /etc/buttervolume/config.ini inside the container.

The readme file however claims I can also put configuration in /var/lib/buttervolume/config/config.ini on the host, but that is not working for me.

Maybe the readme is incorrect?

@ccomb
Copy link
Member

ccomb commented Oct 2, 2020

Hi @bananer,
maybe it depends whether you build as a docker plugin or not. There is a configuration file here, which is documented here that shows that /etc/buttervolume in the plugin is bind-mounted to /var/lib/buttervolume/config on the host.

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

3 participants