juju incorrectly mixes http-proxy with apt-http-proxy and doesn't mix no-proxy

Bug #1466951 reported by Jay R. Wren
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Witold Krecicki
juju-core
Won't Fix
High
Unassigned

Bug Description

no-proxy does not work with apt-http-proxy

Steps to reproduce:
 1. juju set-env apt-http-proxy=http://apt-cacher-ng.host:3142
 2. juju set-env no-proxy=private-ppa.launchpad.net
 3. deploy a charm which uses a private ppa.

What should happen:
for each host in no-proxy:
  print "Acquire::HTTP::Proxy::$host \"DIRECT\";" >> /etc/apt/apt.conf.d/42-juju-no-proxy

The docs here: https://jujucharms.com/docs/stable/howto-proxies are unclear about interaction between no-proxy and apt-http-proxy.

Tags: docs proxy
Curtis Hovey (sinzui)
tags: added: proxy
tags: added: docs
Changed in juju-core:
status: New → Triaged
importance: Undecided → Low
Changed in juju-core:
status: Triaged → Won't Fix
Revision history for this message
Tom Mullaney (tpmullan) wrote :

I am running into a similar issue. I have http-proxy set and juju sets my apt proxy and ignores the no-proxy setting entirely. When there is a no-proxy set it should be set in the environment at the same time proxy settings are added.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Team, can we please consider re-opening this bug?

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1466951] Re: juju no-proxy does not work with apt-http-proxy

I would consider adding an 'apt-no-proxy' to go with "apt-http-proxy",
rather than assuming that 'no-proxy' which goes with 'http-proxy' would go
with apt-http-proxy.

On Sat, Jan 28, 2017 at 1:40 AM, Dustin Kirkland  <
<email address hidden>> wrote:

> Team, can we please consider re-opening this bug?
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> https://bugs.launchpad.net/bugs/1466951
>
> Title:
> juju no-proxy does not work with apt-http-proxy
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1466951/+subscriptions
>

Revision history for this message
Tom Mullaney (tpmullan) wrote : Re: juju no-proxy does not work with apt-http-proxy

In that case would you also consider not populating the apt config with the values from http-proxy and only exporting those to the environment?

Revision history for this message
Ante Karamatić (ivoks) wrote :

I'm on this one with Tom.

Revision history for this message
John A Meinel (jameinel) wrote :

I believe Juju sets the environment variables internally, and passes those values into charms, but probably doesn't set it in /etc/environment which means not all applications that are running will see them at the right time.

IMO, we should be doing

1) http-proxy, https-proxy, no-proxy are used as environment variables and configured into /etc/environment
2) apt-http-proxy, apt-https-proxy, apt-no-proxy are values that can be set but only affect /etc/apt/*.d/ configuration settings.

Changed in juju-core:
status: Won't Fix → Triaged
importance: Low → High
summary: - juju no-proxy does not work with apt-http-proxy
+ juju incorrectly mixes http-proxy with apt-http-proxy and doesn't mix
+ no-proxy
Revision history for this message
Anastasia (anastasia-macmood) wrote :

"juju-core" project tracks Critical issues for 1.25 - we are not likely to address this on 1.25.

I will add in "juju" project which tracks Juju 2.x concerns.

Parts of this bug will be addressed as part of bug # 1666353.

Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.3.0
Changed in juju-core:
status: Triaged → Won't Fix
Revision history for this message
John A Meinel (jameinel) wrote :

see also https://bugs.launchpad.net/juju/+bug/1666353 which is about setting the proxy settings 'globally'. Most likely this involves either /etc/environment or /etc/profile.d

Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against develop (2.2): https://github.com/juju/juju/pull/7119

Changed in juju:
assignee: nobody → Witold Krecicki (wpk)
status: Triaged → In Progress
Changed in juju:
status: In Progress → Fix Committed
milestone: 2.3.0 → 2.2-beta2
Revision history for this message
Krassi (kvalev) wrote :

The devel documentation does not mention the new apt-no-proxy property - https://jujucharms.com/docs/devel/models-config

Changed in juju:
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.