bad apt proxy config file in deployed nodes

Bug #1309207 reported by Adam Stokes
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Anastasia

Bug Description

In a local provider installation:

The host system contains the following:

/etc/apt/apt.conf.d/01proxy
Acquire::http::Proxy "http://localhost:8000";

The host system has squid-deb-proxy running so this apt-proxy configuration works as it should.

When you juju deploy an instance within the local provider, that same apt-proxy configuration parameter is placed directly in /etc/apt/apt.conf.d/42-juju-proxy-settings.

The problem is that the network bridge for a local provider using lxc is something like 10.0.3.1, however, the deployed node thinks the the proxy server is sitting at http://localhost:8000 so any attempts to deploy a charm fail due to apt not being able to install the required packages.

If I were to set apt-http-proxy in my environments.yaml file I could understand it being copied to the deployed node, however, the way juju seems to handle it now is just blindly copying over the proxy settings from an `apt-config dump`.

This type of scenario may have not been tested, however, this will put a damper on early users wishing to adopt juju and only having a single system to work with. This will also been seen a lot more since I believe a lot of users like to use squid-deb-proxy for their package caching.

The relevant code for this is in `utils/apt.go` and pretty much that entire package.

tags: added: apt-http-proxy cloud-installer local-provider
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.19.1
Revision history for this message
John A Meinel (jameinel) wrote :

So a workaround is to set apt-proxy=http://10.0.3.1:8000 in your environments.yaml.

Changed in juju-core:
milestone: 1.19.1 → 1.20.0
Changed in juju-core:
milestone: 1.20.0 → next-stable
Revision history for this message
Curtis Hovey (sinzui) wrote :

From the duplicate:
juju in the latest trusty stable package adds to every new machine an empty file /etc/apt/apt.conf.d/42-juju-proxy-settings. The actual proxy config it puts into a new file /etc/apt/apt.conf.

summary: - juju should not blindly create an apt proxy config file in deployed
- nodes
+ bad apt proxy config file in deployed nodes
Curtis Hovey (sinzui)
tags: added: proxy
removed: apt-http-proxy
Changed in juju-core:
assignee: nobody → Anastasia (anastasia-macmood)
status: Triaged → In Progress
Changed in juju-core:
status: In Progress → Fix Committed
Ian Booth (wallyworld)
Changed in juju-core:
milestone: 1.21 → 1.21-alpha3
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → 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.