Proxy settings should be set globally

Bug #1666353 reported by Menno Finlay-Smits
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Witold Krecicki

Bug Description

Juju's proxy settings (http-proxy, https-proxy and ftp-proxy) are used to set proxy behaviour within the machine and unit agents and are also injected into the profile of the ubuntu user (see ~ubuntu/.juju-proxy). This means that software that is run within hooks or via juju ssh sees the correct proxy settings but software running in other contexts won't.

The proxy settings should really be set globally, via /etc/profile.d/ and not just for the ubuntu user.

A nice side-benefit of this is that the jujud agent will be using proxy settings that are likely to be correct from the moment it starts, instead of having to wait for the proxyupdater worker to start and take action.

To remember: for the manual provider, the file left in /etc/profile.d/ should be removed if a machine is no longer managed by juju.

Changed in juju:
status: New → Triaged
Revision history for this message
Jay R. Wren (evarlast) wrote :

Ideally, I'd love it if these were set in a global systemd location with DefaultEnvironment= so that when a charm installs a systemd service the systemd service automatically has the proxy environment variables set from juju.

Bonus if the equivalent is done for upstart for trusty for older charms.

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

+1 to Jay's suggestion.

John A Meinel (jameinel)
Changed in juju:
status: Triaged → In Progress
assignee: nobody → Witold Krecicki (wpk)
Revision history for this message
Anastasia (anastasia-macmood) wrote :

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

Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta1 → 2.2-beta2
Revision history for this message
Witold Krecicki (wpk) wrote :
Changed in juju:
milestone: 2.2-beta2 → 2.2-beta3
Changed in juju:
milestone: 2.2-beta3 → 2.2-beta4
Witold Krecicki (wpk)
Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Krassi (kvalev) wrote :

I tried deploying the newest kubernetes-core bundle using the latest Juju version (2.2-beta3), but the installation process fails, as snap is not aware of the proxy settings and cannot download the snap packages (kubectl and etcd). I had to manually edit /etc/environment, add the proxy settings and restart the snapd service.

According to the linked PR, the proxy settings should be set both in /etc/profile.d and /etc/systemd/{system,user}.conf.d/juju-proxy.conf, but there is no proxy configuration in either location on the provisioned machines.

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

@kvalvev: You're not seeing the results of the PR because it isn't in the beta3 release. The fix will be in 2.2-beta4 which is about to come out.

Revision history for this message
Krassi (kvalev) wrote :

@menno.smits: Thanks, I overlooked the PR merge date and thought that it was part of beta3. I saw that beta4 has now been released and wanted to test it, but it seems that the version is not yet available in ppa:juju/devel (and the juju docker image is still using beta3).

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.