apt-proxy can be incorrectly set when the fallback from http-proxy is used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
James Tunnicliffe | ||
1.21 |
Fix Released
|
High
|
James Tunnicliffe | ||
1.22 |
Fix Released
|
High
|
James Tunnicliffe |
Bug Description
Proxy configuration for the deployed environment is done with the http-proxy, https-proxy and apt-proxy settings in environments.yaml. If http-proxy is set but apt-proxy isn't then apt-proxy falls back to http-proxy as a default (as they're usually the same).
http-proxy (which ends up as an environment variable) can be in the form <ip-addr>:port, however apt-proxy must be in the form http://<ip-addr>:port/ - so a valid http-proxy setting can end up as an invalid apt-proxy setting. If http-proxy is not in the correct form for apt-proxy we should correctly format it when we use it as a fallback.
The code that does this (Config.
In addition, once the apt config file has been written re-provisioning a machine (e.g. for manual provider) won't result in a *new* apt config file being written out. So an incorrect setting remains even once corrected. This is probably an issue in the proxyupdateworker that writes out the system files.
Changed in juju-core: | |
assignee: | nobody → James Tunnicliffe (dooferlad) |
Changed in juju-core: | |
importance: | Undecided → High |
milestone: | none → 1.23 |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
tags: | added: apt network proxy |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
Changed in juju-core: | |
milestone: | 1.23 → 1.23-beta1 |
Have got a fix for the initial problem (http:// missing causes problems) but it makes lots of tests fail that expect the scheme part of URLs to be missing. Just need to update the tests, so more tedious than difficult.
Haven't looked into the proxyupdateworker part. Could you give me some reproducer instructions?