python3-lxc icon indicating copy to clipboard operation
python3-lxc copied to clipboard

Odd behaviour when manipulating config items

Open n3storm opened this issue 7 years ago • 0 comments

I think something is odd, perhaps is because this library tarjets lxc 2.1/3 and I am using lxc 2.0.x (Debian 9) but:

clear_config_item(whatever) doesn't work, sometimes fails that may be my fault, but when it doesn't always returns False, eg container.clear_config_item('lxc.start.auto') and never really clears entry in config file. So when setting new value we got two values for the same key: lxc.start.auto = 0 lxc.start.auto = 1

set_config_item('lxc.network.0.whatever', 'that') adds: lxc.network.0.whatever = that to container config

So this library now feels useless to interact with container configuration, though container operations create/copy/start/stop/freeze works great.

I can see that some examples at examples/api_tests.py targets higher versions > 2.1 so maybe this library scope is only those linux distributions that deliver those lxc versions.

Let me now if you want me further reporting and testing, I would like to, but if debian stable 2.0.x is not a target (future debian release Sid is also lxc 2.0.9) please state compulsory minimal lxc version at project docs or fail on install or on runtime.

Meanwhile I have to replace it with the nasty "ini config file without DEFAULT section" hack to direct read file and crossfingers. (https://github.com/EstudioNexos/LXC-Web-Panel)

Thanks :) really

n3storm avatar Oct 09 '18 16:10 n3storm