apt-cacher breaks ltsp-build-client

Bug #1548838 reported by John Bester
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
Invalid
Undecided
Unassigned

Bug Description

To speed up installs and upgrades where internet link is slow, installing apt-cacher-ng on a LAN can make a huge difference. Unfortunately, when you configure LTSP server (Edubuntu 14.04.4 amd64 in my case) to make use of apt-cacher-ng as folllows:

/etc/apt/apt.conf.d/80apt-cacher contains the following:
Acquire::http::proxy "http://aptproxy:3142/";
Acquire::https::proxy "https://aptproxy:3142/";
Acquire::ftp::proxy "ftp://aptproxy:3142/";
Acquire::socks::proxy "socks://aptproxy:3142/";

/etc/hosts contains an entry for aptproxy:
192.168.0.100 aptproxy

apt-get works like a charm (update, upgrade, dist-upgrade), but ltsp-build-client fails (not finding aptproxy). I am assuming that it does a chroot to client folder and then tries to do apt-get update / upgrade. What is odd is that the client folder does not contain /etc/apt/apt.conf.d/80-apt-cacher, so I would expect it to simply work. Appending /etc/hosts (except for 127... addresses) might work as well.

Revision history for this message
Vagrant Cascadian (vagrantc) wrote : Re: [Bug 1548838] [NEW] apt-cacher breaks ltsp-build-client

On 2016-02-23, John Bester wrote:
> To speed up installs and upgrades where internet link is slow,
> installing apt-cacher-ng on a LAN can make a huge difference.
> Unfortunately, when you configure LTSP server (Edubuntu 14.04.4 amd64 in
> my case) to make use of apt-cacher-ng as folllows:
>
> /etc/apt/apt.conf.d/80apt-cacher contains the following:
> Acquire::http::proxy "http://aptproxy:3142/";
...
> /etc/hosts contains an entry for aptproxy:
> 192.168.0.100 aptproxy
>
> apt-get works like a charm (update, upgrade, dist-upgrade), but ltsp-
> build-client fails (not finding aptproxy). I am assuming that it does a
> chroot to client folder and then tries to do apt-get update / upgrade.
> What is odd is that the client folder does not contain
> /etc/apt/apt.conf.d/80-apt-cacher, so I would expect it to simply work.
> Appending /etc/hosts (except for 127... addresses) might work as well.

It's probably caching the http proxy in the chroot's
/etc/apt/apt.conf.d/00proxy-guess, but not copying the /etc/hosts file
into the chroot. See /usr/share/ltsp/plugins/Ubuntu/010-http-proxy.

The simple workaround is to use an ip address for the proxy in
/etc/apt/apt.conf.d/80apt-cacher instead:

  Acquire::http::proxy "http://192.168.0.100:3142/";

You could also use the --http-proxy commandline option to specify the
proxy via ip, and then it won't try to detect the proxy settings.

Another option is to configure your DNS server to resolve "aptproxy",
rather than relying on /etc/hosts.

live well,
  vagrant

Revision history for this message
John Bester (john-bester) wrote :

Thanks - I opted for the ip address in stead of dns. It is
a simple solution and makes building client a whole lot faster.

Regards
John

On Tue, 2016-02-23 at 17:17 +0000, Vagrant Cascadian wrote:
> On 2016-02-23, John Bester wrote:
> > To speed up installs and upgrades where internet link is slow,
> > installing apt-cacher-ng on a LAN can make a huge difference.
> > Unfortunately, when you configure LTSP server (Edubuntu 14.04.4 amd64 in
> > my case) to make use of apt-cacher-ng as folllows:
> >
> > /etc/apt/apt.conf.d/80apt-cacher contains the following:
> > Acquire::http::proxy "http://aptproxy:3142/";
> ...
> > /etc/hosts contains an entry for aptproxy:
> > 192.168.0.100 aptproxy
> >
> > apt-get works like a charm (update, upgrade, dist-upgrade), but ltsp-
> > build-client fails (not finding aptproxy). I am assuming that it does a
> > chroot to client folder and then tries to do apt-get update / upgrade.
> > What is odd is that the client folder does not contain
> > /etc/apt/apt.conf.d/80-apt-cacher, so I would expect it to simply work.
> > Appending /etc/hosts (except for 127... addresses) might work as well.
>
> It's probably caching the http proxy in the chroot's
> /etc/apt/apt.conf.d/00proxy-guess, but not copying the /etc/hosts file
> into the chroot. See /usr/share/ltsp/plugins/Ubuntu/010-http-proxy.
>
> The simple workaround is to use an ip address for the proxy in
> /etc/apt/apt.conf.d/80apt-cacher instead:
>
> Acquire::http::proxy "http://192.168.0.100:3142/";
>
> You could also use the --http-proxy commandline option to specify the
> proxy via ip, and then it won't try to detect the proxy settings.
>
> Another option is to configure your DNS server to resolve "aptproxy",
> rather than relying on /etc/hosts.
>
>
> live well,
> vagrant
>

Changed in ltsp:
status: New → Invalid
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.