ubuntu template fro lxc messes up proxies

Bug #1537689 reported by Sven
6
This bug affects 1 person
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_container_proxy()
{
    local rootfs=$1
    local arch=$2

    # Detecting apt-proxy
    RES=`apt-config shell APT_PROXY Acquire::http::Proxy`
    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.

Revision history for this message
Stéphane Graber (stgraber) wrote :

We don't ship those templates anymore, instead relying on pre-made images which will not have any proxy set in them.

Changed in lxc (Ubuntu):
status: New → Won't Fix
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.