Bug #11136
closedSmart Proxy does not download PXE files through proxy
Description
I am setting up a Foreman environment behind a corporate proxy and am having issues with the Smart Proxy. Looking at the foreman-proxy log file, I see the messages:
DEBUG -- : Starting task: /usr/bin/wget --timeout=10 --tries=3 --no-check-certificate nv -c "http://mirror.centos.org/centos/6/os/x86_64/images/pxeboot/initrd.img" -O "/var/lib/tftpboot/boot/CentOS-6.6-x86_64-initrd.img" : [(unknown)] wget: unable to resolve host address "mirror.centos.org"
DEBUG -
Investigating /etc/rc.d/init.d/foreman-proxy reveals that foreman-proxy does not source /etc/profile (which sources /etc/profile.d/proxy.sh) or have any other method of pulling in proxy environment variables. I have been able to resolve the issue by adding /etc/profile to the sources as below:
if [ -f /etc/sysconfig/foreman-proxy ]; then
. /etc/sysconfig/foreman-proxy
. /etc/profile
fi
I am not sure if there is a better or more preferred way to resolve the issue I am seeing or if this change should be pushed to the Foreman source.