Skip to content

Odd behaviour when manipulating config items #8

@n3storm

Description

@n3storm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugConfirmed to be a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions