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

Add LXC extra configuration line by line with PV_LXC_EXTRA_CONF #7

Open
anpopa opened this issue Mar 9, 2022 · 2 comments
Open

Add LXC extra configuration line by line with PV_LXC_EXTRA_CONF #7

anpopa opened this issue Mar 9, 2022 · 2 comments

Comments

@anpopa
Copy link

anpopa commented Mar 9, 2022

Currently adding extra configuration in PV_LXC_EXTRA_CONF result in sourcing the value content directly without any option to define multiple lines in the configuration file.
For example an array of strings like:

"PV_LXC_EXTRA_CONF" : [ "lxc.mount.entry = <mount1>\n", "lxc.mount.entry = <mount2>\n" ],
will generate the invalid lxc.container.conf output:

[ lxc.mount.entry = <mount1> lxc.mount.entry = <mount1> ]
The issue is how the value is sourced in the template file: https://github.com/pantacor/pvr/blob/master/templates/builtin-lxc-docker.go#L156
Is very hard to work with a very long line in configuration files. Is better to split the extra conf with an array of strings. Other options like PV_LXC_CAP_KEEP are actually handling the elements as key:value which makes the split possible.

@asac
Copy link
Contributor

asac commented Mar 9, 2022

Yes, I agree that this is a worthwhile improvement to make with pvr. Would have to try how to make a good improvement without breaking the current format of that CONF entry....

@asac
Copy link
Contributor

asac commented Mar 9, 2022

if you feel you have a PR I would happily take it.... please use our gitlab.com/pantacor/pvr code base to submit a MR though as that is the current primary source tree...

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