lxc-create failure creating a lucid container in a precise host with old cache
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Low
|
Serge Hallyn | ||
Precise |
Fix Released
|
Medium
|
Stéphane Graber |
Bug Description
== Rationale ==
On apt failure, LXC simply fails without telling the user that they may have an old cache and should just rebuild it.
This confuses some users who had some pretty old lucid cache on their system with out of date apt lists.
The fix includes a better error message on failure and calls apt-get update before trying to install anything.
== Test case ==
1) Use a machine with a very old lucid cache (or manually break the apt lists)
2) lxc-create -t ubuntu -n p1 -- --release lucid
3) Check that it a) works or b) shows an error message telling you to wipe the cache
== Regression potential ==
It's just an extra apt-get update and a better error message so I don't expect any regression here. Worst case scenario, the user will just get the error message and have to wipe the cache.
When running
lxc-create -t ubuntu -n u1-server -f /etc/lxc/local.conf -- -r lucid -a i386 -b matiasb
It downloads lucid packages, extracts packages, and then fails while installing:
...
I: Installing core packages...
W: Failure trying to run: chroot /var/cache/
failed to execute template 'ubuntu'
aborted
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lxc 0.7.5-3ubuntu30
ProcVersionSign
Uname: Linux 3.2.0-17-generic i686
ApportVersion: 1.93-0ubuntu2
Architecture: i386
Date: Tue Feb 28 16:51:54 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20111129.1)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
Changed in lxc (Ubuntu): | |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
status: | Confirmed → In Progress |
description: | updated |
Changed in lxc (Ubuntu Precise): | |
assignee: | nobody → Stéphane Graber (stgraber) |
status: | New → In Progress |
From what I can see, it looks like the error is during this step:
debootstrap --verbose --components= main,universe --arch=i386 --include= dialog, apt,apt- utils,resolvcon f,iproute, inetutils- ping,vim, dhcp3-client, ssh,lsb- release, gnupg lucid /var/cache/ lxc/lucid/ partial- i386