When the configuration item 'http_proxy' is set, no proxy is used to download boot images.
Bug #1081229 reported by
Raphaël Badin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Raphaël Badin |
Bug Description
Even when a configuration item 'http_proxy' is set to a valid proxy, the downloading of the boot images is done without taking into account this setting.
Adding logging in /usr/share/
Related branches
lp:~rvb/maas/proxy-bug-1081229
- Gavin Panella (community): Approve
-
Diff: 52 lines (+5/-5)3 files modifiedsrc/maasserver/tests/test_api.py (+1/-1)
src/provisioningserver/tasks.py (+1/-1)
src/provisioningserver/tests/test_tasks.py (+3/-3)
lp:~rvb/maas/packaging.proxy-bug-1081229
- Gavin Panella (community): Approve
-
Diff: 22 lines (+4/-1)2 files modifieddebian/changelog (+3/-0)
debian/extras/99-maas-sudoers (+1/-1)
Changed in maas: | |
assignee: | nobody → Raphaël Badin (rvb) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
I think the problem comes from the fact that we're running the script using 'sudo' and it does not preserve the env variable by default:
If I setup a bogus http_proxy/ https_proxy:
ubuntu@server:~$ export https_proxy="http:// tesasdsad. com:54656" tesasdsad. com:54656"
ubuntu@server:~$ export http_proxy="http://
Running 'sudo /usr/sbin/ maas-import- pxe-files ' completely ignores the http_proxy/ https_proxy:
ubuntu@server:~$ sudo /usr/sbin/ maas-import- pxe-files GqdxRN2zP9. archive. ubuntu. com/ubuntu/ /dists/ precise/ main/installer- amd64/current/ images/ netboot/ ubuntu- installer/ amd64// linux [4965840/4965840] -> "linux" [1] archive. ubuntu. com/ubuntu/ /dists/ precise/ main/installer- amd64/current/ images/ netboot/ ubuntu- installer/ amd64// initrd. gz [17446386/17446386] -> "initrd.gz" [1] archive. ubuntu. com/ubuntu/ /dists/ quantal/ main/installer- amd64/current/ images/ netboot/ ubuntu- installer/ amd64// linux [5130968/5130968] -> "linux" [1]
Downloading to temporary location /tmp/tmp.
/tmp/tmp.GqdxRN2zP9 ~
2012-11-21 08:16:35 URL:http://
2012-11-21 08:16:36 URL:http://
2012-11-21 08:16:36 URL:http://
Unless I run 'sudo' with -E:
ubuntu@server:~$ sudo -E /usr/sbin/ maas-import- pxe-files SubyXtYVEG.
Downloading to temporary location /tmp/tmp.
/tmp/tmp.SubyXtYVEG ~
wget: unable to resolve host address `tesasdsad.com'
From sudo's man:
security policy that the user wishes to preserve their
existing environment variables. The security policy may
return an error if the -E option is specified and the user
does not have permission to preserve the environment.
-E The -E (preserve environment) option indicates to the