landscape-env.sh should source /etc/juju-proxy.conf, if present

Bug #1867383 reported by David Coronel
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Charm
Fix Released
Undecided
Simon Poirier

Bug Description

The landscape-server charm doesn't have support for proxy server options.

Configuring the proxy server on Landscape servers seems to involve modifying the /etc/environment file to add HTTP_PROXY/HTTPS_PROXY/http_proxy/https_proxy and no_proxy/NO_PROXY environment variables but there is no viable way to do this in a Juju environment.

Additionally, if there is a proxy configured in /etc/environment, the update_db_security.sh will fail if there is not a NO_PROXY/no_proxy variable configured to exclude 127.0.0.1 and localhost.

I think the landscape-server charm should have a proxy option similar to the canonical-livepatch charm and handle this proxy configuration accordingly (/etc/environment or other (directly in the update_db_security.sh script, etc.).

This is with the latest landscape-server charm revision 36.

Revision history for this message
David Coronel (davecore) wrote :

subscribed ~field-medium

Revision history for this message
David Coronel (davecore) wrote :

My workaround is to manually add the proxy and no_proxy variables to /etc/environment and restart Landscape

Revision history for this message
David Coronel (davecore) wrote :

Further investigation (thank you Simon) indicates that Juju sets the model proxy options (juju-http-proxy and juju-https-proxy) get set in profile.d. Many things use profile.d but not cron.

That would explain why the update_db_security.sh script ran from cron doesn't take the proxy server into consideration.

One workaround could still be to set the HTTP_PROXY/HTTPS_PROXY/http_proxy/https_proxy and no_proxy/NO_PROXY environment variables in /etc/environment on the Landscape leader unit (since only that unit run the cron jobs (since only that unit has RUN_CRON set to true in /etc/default/landscape-server)).

Simon Poirier (simpoir)
Changed in landscape-charm:
status: New → Confirmed
Simon Poirier (simpoir)
summary: - Landscape server charm doesn't have proxy options update_db_security.sh
- script can't get pickle file
+ landscape-env.sh should source /etc/juju-proxy.conf, if present
Simon Poirier (simpoir)
Changed in landscape-charm:
status: Confirmed → In Progress
assignee: nobody → Simon Poirier (simpoir)
Simon Poirier (simpoir)
Changed in landscape-charm:
status: In Progress → Fix Committed
Simon Poirier (simpoir)
Changed in landscape-charm:
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.