Problem:
Getting a 500 Internal Server Error when trying to get the cloud-init config from the smart proxy which resides within the actual foreman server (I have a NAT’d network and I need some way to pass along the real IP of the build host). As a test, I run the following from a different host:
curl -D - -H 'X-Forwarded-For x.x.x.x' http://foreman.domain.com:8080/userdata/user-data
The results are the following:
Failed to retrieve user-data userdata template for {"kind"=>"user-data"}: Error retrieving userdata/user-data for {"url"=>"http://foreman.domain.com:8080"} from foreman.domain.com: Net::HTTPNotFound
Expected outcome:
Should be able to pull the data by running that curl command and via the build process as well
Foreman and Proxy versions:
3.4.1
Foreman and Proxy plugin versions:
Distribution and version:
Rocky Linux 8
Other relevant data:
The following related config is set:
/etc/foreman/settings.yaml:
:trusted_proxies:
- '127.0.0.1/8'
- '::1'
/etc/foreman-proxy/settings.yml:
:http_port: 8000
/etc/foreman-proxy/settings.d/templates.yml:
:enabled: true
:template_url: http://foreman.domain.com:8000
All of these values were set using foreman-installer