LXC-Web-Panel
LXC-Web-Panel copied to clipboard
config parsing - duplicate settings lxc.id_map
When the edit page fetches the container configuration with lwp.get_container_settings
ConfigParser can not handle multiple lxc.id_map
entries and keeps only the first. This breaks unprivileged containers.
Probably it might be fixed with the same trick as issue #73 with adding it to lwp/__init__.py
re.match('lxc.cgroup.devices.deny|lxc.cgroup.devices.allow|lxc.mount.entry|lxc.cap.drop|lxc.id_map', read[i]):
As this might be a quick fix, in the long run, an alternative for ConfigParser might be useful or at least a way to preserve any other config file parts which are not configurable in the web form. Also having comments would be nice.