lxc

lxc-create does not honor $HTTP_PROXY when using a cached base image

Bug #1271455 reported by Martin Pitt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxc
Fix Released
Unknown
lxc (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I just learned that one can call lxc-create with $HTTP_PROXY set to configure an apt proxy in the container. However, this only seems to work when it actually downloads and creates a base image. When it's using a cache it doesn't work:

$ sudo HTTP_PROXY=http://donald:3142 lxc-create -t ubuntu -n precise-i386 -- -r precise -a i386
Checking cache download in /var/cache/lxc/precise/rootfs-i386 ...
Copy /var/cache/lxc/precise/rootfs-i386 to /scratch/lxc/precise-i386/rootfs ...
Copying rootfs to /scratch/lxc/precise-i386/rootfs ...
[...]

$ ls -l /scratch/lxc/precise-i386/rootfs/etc/apt/apt.conf.d/
insgesamt 16
-rw-r--r-- 1 root root 350 Nov 15 16:35 01autoremove
-rw-r--r-- 1 root root 372 Jan 22 10:08 01autoremove-kernels
-rw-r--r-- 1 root root 123 Apr 20 2012 20changelog
-rw-r--r-- 1 root root 182 Mär 15 2012 70debconf

i. e. there is no 70proxy.

When appending -F it works. However, 70proxy is *not* in the cache, so lxc-create does create that after creating the cache. Hence it should not be too difficult to also create 70proxy after copying an existing cache?

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: lxc 1.0.0~beta2-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-5.20-generic 3.13.0
Uname: Linux 3.13.0-5-generic x86_64
ApportVersion: 2.13.1-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Jan 22 10:15:32 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-10-14 (100 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Beta amd64 (20131013)
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
defaults.conf:
 lxc.network.type = veth
 lxc.network.link = lxcbr0
 lxc.network.flags = up
 lxc.network.hwaddr = 00:16:3e:xx:xx:xx
lxc.conf: lxc.lxcpath = /scratch/lxc

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

As a side issue, "man lxc-create" nor "man lxc.conf" mention how to set an apt proxy. Could that be added somewhere? Thanks!

Changed in lxc (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in lxc:
status: Unknown → New
Changed in lxc:
status: New → Fix Released
Changed in lxc (Ubuntu):
status: Triaged → 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.