Extra lxc.mount.auto entry being added to config file

Bug #1379030 reported by Christopher Townsend
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I'm using the Python API to append entries to the LXC config file. When I do the following:

container.set_config_item("lxc.mount.auto", "cgroup:mixed")

I get an extra lxc.mount.auto entry in the config file. This is what it looks like:

lxc.mount.auto =
lxc.mount.auto = cgroup:mixed

This keeps the container from starting. I have to remove the first lxc.mount.auto to get the container to start.

Also, this seems to have started fairly recently.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: lxc 1.1.0~alpha2-0ubuntu2
ProcVersionSignature: Ubuntu 3.16.0-21.28-generic 3.16.4
Uname: Linux 3.16.0-21-generic x86_64
ApportVersion: 2.14.7-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Oct 8 16:40:40 2014
SourcePackage: lxc
UpgradeStatus: Upgraded to utopic on 2014-06-16 (114 days ago)
defaults.conf:
 lxc.network.type = veth
 lxc.network.link = lxcbr0
 lxc.network.flags = up
 lxc.network.hwaddr = 00:16:3e:xx:xx:xx

Revision history for this message
Christopher Townsend (townsend) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1379030] [NEW] Extra lxc.mount.auto entry being added to config file

Thanks for submitting this bug

 status: confirmed
 importance: high

Changed in lxc (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Stéphane Graber (stgraber) wrote :

Hey Chris,

This is a parser bug which we need to fix. I believe Serge is looking into it.

In the mean time, try using append_config_item instead which may work fine in this case (so long as it's not called multiple times, otherwise you'll get duplicates).

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

A proposed fix has been sent to the mailing list, and will probably be applied in utopic today. In the meantime you can work around this by using the 'append_config_item' method instead of set_config_item. (Note that the C API does not have this same behavior, so this is only for the python bindings)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1.1.0~alpha2-0ubuntu3

---------------
lxc (1.1.0~alpha2-0ubuntu3) utopic; urgency=medium

  * fix usernic and apparmor-mounts tests to not clear out the host's
    /etc/lxc/lxc-usernet
  * fix unprivileged containers when user's cgroup paths are not all
    equivalent, and add a testcase for that.
  * fix broken behavior when configuration has 'lxc.mount.auto ='
    (LP: #1379030)
 -- Serge Hallyn <email address hidden> Thu, 09 Oct 2014 12:25:16 -0500

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.