-
Notifications
You must be signed in to change notification settings - Fork 38
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
python: set_config_item("lxc.cgroup.*") generates duplicate lines in config file #14
Comments
Afaik, this is expected behavior. Config lines override each other in the order they are specified in. |
Closing as this is expected behavior. |
Yes, it works correctly, but why should single |
Oh wait, maybe I misunderstood you. Are you saying that one single call to:
will set two lines in the container's config file? |
One single call to
(+ container.save_config() of course) will produce this:
even if there were no "lxc.cgroup.memory.memsw.limit_in_bytes" lines in the config file before the call |
Right, sorry I misunderstood. :) |
This fails starting a container on ubuntu 16.04 (lxc 2.0.8-0ubuntu1~16.04.2) |
Once we release the new config file parser this should be fixed. |
This just bit me, and it breaks lxc-ls. I'm using 2.0.8-0ubuntu1~16.04.2 When did this sneak in? It's a bit of a dumpster fire, now I can't query any of my 20 containers. |
@dankegel, what exactly? |
I'm not quite sure what's going on, but I have about ten ubuntu 16.04 systems On machines with 2.0.7-0ubuntu1~16.04.2, I see duplicate empty On machines with 2.0.8-0ubuntu1~16.04.2, I also see duplicate empty I have no idea what creates those lines, my script "just" calls lxc-start. I suppose I can just modify my script to remove the bogus line after creating each new ephemeral container... so it's only a dumpster fire in the "oh, man, not another distraction!" sense. |
Second. |
Is this still a problem with LXC 2.0.9? |
Yes, this still a problem with LXC 2.0.11 on Ubuntu 16.04 using python3-lxc lib. For some weird reason, generate two outputs. |
Can you try with master too, please? |
I will try and post here an update. |
Thanks! |
@brauner I tested with version 2.0.8 that I clone from GitHub directly. The problem was: when I create an object to run an LXC container and save its configuration, the production was 2 line of configurations, one:
I start to inspect what's causing it... I know that the second line is the effective one... but the configuration file becomes a little bit full of blank lines. |
With Python bindings:
generates following lines in container config:
And if there are other
set_config_item
s before 'lxc.cgroup.memory.limit_in_bytes':Happens on current stable-2.0 branch, haven't tested master branch yet
The text was updated successfully, but these errors were encountered: