← Back to team overview

touch-packages team mailing list archive

[Bug 1537689] [NEW] ubuntu template fro lxc messes up proxies

 

Public bug reported:

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.

** Affects: lxc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1537689

Title:
  ubuntu template fro lxc messes up proxies

Status in lxc package in Ubuntu:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1537689/+subscriptions