ubuntu template fro lxc messes up proxies
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
In our corporate we have a cumbersome installation of proxies:
* (ProxyA) One proxy for the internet access (not capable of supporting apt correctly)
* (ProxyB) One apt-cacher-ng for the apt package mirroring
So we have a configuration:
http_proxy=ProxyA
...
and in our apt-config we have ProxyB
Now running the default template for ubuntu messes these things completely up by setting the ProxyB for all or vice versa, dependent on the basic configuration. For me the function to choose the container proxy looks very weird and complicated, for e.g. if an apt-proxy is available he uses this for the normal http proxy too and vice versa.
My question is, if the variables are set correctly, how can we achieve the correct setting and I altered the template to have only this function:
choose_
{
local rootfs=$1
local arch=$2
# Detecting apt-proxy
RES=`apt-config shell APT_PROXY Acquire:
eval $RES
}
Ok, now the squid think was lost, but I am not sure why it is needed. As far as I know the http_proxy environments can do the trick if set correctly. If these things were not set correctly the normal system will also not run as needed.
Maybe a better option would be to make this configurable by the /etc/defaults/lxc file which will normally do the direct way and if it is needed, the proxy search beahvior can be overwritten or changed there.
We don't ship those templates anymore, instead relying on pre-made images which will not have any proxy set in them.