lxc-fedora template is broken

Bug #881903 reported by Tuomas Suutari
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

There is a missing EOF line in lxc-fedora template script. That syntax error makes the script non-working. For example command "lxc-create -t fedora -h" will result in printing "/usr/lib/lxc/templates/lxc-fedora: line 290: usage: command not found" in infinite loop. Expected output is the usage, of course.

The missing EOF is in the part that creates a fstab and there is also some plus characters in those lines that seem incorrect to me. I have removed those too in my patch.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: lxc 0.7.5-0ubuntu8 [modified: usr/lib/lxc/templates/lxc-fedora]
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Wed Oct 26 13:12:48 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100427.1)
SourcePackage: lxc
UpgradeStatus: Upgraded to oneiric on 2011-10-25 (0 days ago)
modified.conffile..etc.default.lxc: [modified]
mtime.conffile..etc.default.lxc: 2011-08-01T22:46:47.521192

Revision history for this message
Tuomas Suutari (tuomas-suutari) wrote :
Dave Walker (davewalker)
Changed in lxc (Ubuntu):
milestone: none → precise-alpha-1
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this bug. It would be great to get fedora container creation working.

With the patch you supplied, are you able to create a fedora container? It doesn't seem to suffice for me. If it suffices for you, can you tell me exactly what command you used?

Changed in lxc (Ubuntu):
status: New → Incomplete
Revision history for this message
Tuomas Suutari (tuomas-suutari) wrote :

Doh, this was already fixed upstream (see [1]), but it seems that this is not the only thing broken in lxc-fedora template. Though even upstream's current master version (5fe95ad1) did not work. I had to make some other changes too to get it working. I've submitted my changes upstream [2].

To get working lxc-fedora template, just clone upsteam git repo and apply the patches from [2]. I can also attach the patched lxc-fedora template for convenience.

Don't know if this bug report makes any sense anymore. Maybe Ubuntu should just wait that upstream integrates the fixes and makes a new release?

References:

[1] http://lxc.git.sourceforge.net/git/gitweb.cgi?p=lxc/lxc;a=commit;h=a30ce0ac4db1bac032799da550f747cf17e45d08

[2] http://sourceforge.net/mailarchive/forum.php?thread_name=1319639383-15129-4-git-send-email-tuomas.suutari%40gmail.com&forum_name=lxc-devel

Revision history for this message
Tuomas Suutari (tuomas-suutari) wrote :

This is the version of lxc-fedora template that I got working. Replace /usr/lib/lxc/templates/lxc-fedora with this and use "lxc-create -t fedora ..." to create a Fedora container with it.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 881903] Re: lxc-fedora template is broken

Quoting Tuomas Suutari (<email address hidden>):
> Doh, this was already fixed upstream (see [1]), but it seems that this
> is not the only thing broken in lxc-fedora template. Though even
> upstream's current master version (5fe95ad1) did not work. I had to make
> some other changes too to get it working. I've submitted my changes
> upstream [2].
>
> To get working lxc-fedora template, just clone upsteam git repo and
> apply the patches from [2]. I can also attach the patched lxc-fedora
> template for convenience.

Thanks for the info, Tuomas!

> Don't know if this bug report makes any sense anymore. Maybe Ubuntu
> should just wait that upstream integrates the fixes and makes a new
> release?

We're hoping a new release can happen soon, so that may indeed be
the best route.

Daviey, can we get this bug un-targeted? If you feel the target should
stick, then I'll apply the patches before next release of course.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Fix missing EOF and extra plus characters in fstab creation" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Dave Walker (davewalker)
Changed in lxc (Ubuntu):
milestone: precise-alpha-1 → none
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Just a note, this bug is still waiting for a new lxc release.

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

This bug was fixed in the package lxc - 0.7.5-3ubuntu5

---------------
lxc (0.7.5-3ubuntu5) precise; urgency=low

  [ Robie Basak ]
  * debian/patches/0015-ubuntu-templ-use-updates.patch: use ports.ubuntu.com
    in sources.list for alternative architectures (LP: #820715).
  * debian/patches/0015-ubuntu-templ-use-updates.patch: dist-upgrade in an
    isolated environment to avoid leaving a bind mount behind (LP: #913877).
  * debian/lxc.{default,init}: call ifconfig with explicit netmask
    (LP: #913727).

  [ Serge Hallyn ]
  * debian/lxc.default: update the MIRROR example - using 'localhost'
    fails for updates after the container has been started.
  * debian/lxcguest.console.upstart: pass 'console' not '/dev/console' to
    getty. (LP: #913952)
  * debian/patches/0015-ubuntu-templ-use-updates.patch: at post_process(),
    copy host's /etc/resolv.conf (which may have changed) into chroot before
    apt-get actions, and always do a apt-get update before installing lxcguest,
    as the package version may have changed in the archive. (LP: #914155)
  * 0016-nested-cgroups.patch: nest container cgroups under the host's
    init cgroup. (LP: #901482)
  * 0017-pull-upstream-fedora-template.patch: move to the upstream
    lxc-fedora template (LP: #881903)
  * 0018-make-lxc-ps-search-proc.patch: work when cgroups are mounted with
    '-n'.
  * debian/patches/0019-fix-lxc-ls-nested-cgroups.patch: fix lxc-ls to
    handle the support for nested cgroups. (pull this into previous
    commit msg before pushing)
 -- Serge Hallyn <email address hidden> Tue, 10 Jan 2012 18:51:45 +0000

Changed in lxc (Ubuntu):
status: Incomplete → 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.