Using userdata/cloud-init installation with a foreman-proxy-content-proxy as template server
**Expected outcome: **
Same results as if the host would connect to the main foreman-server to get the user-data-/cloud-init-template
Foreman and Proxy versions:
Both on 1.24.3
Distribution and version:
Other relevant data:
I am currently trying to provision new VMware machines using image-based deployments. For this I want to use cloud-init & userdata and static IP-adresses.
This works fine with an foreman 1.24.3 if my hosts are connected directly to the foreman-server itself to get their userdata-template.
However, I have separated network with no access to other subnets. For this I use a foreman-content-proxy, which is also configured to be template-server. This proxy works fine for other deployment-methods but in case of the userdata-templates the URL http:///userdata/user-data throws an 404.
curl -D - -H 'X-Forwarded-For: 192.168.167.90' https://<proxy-content-url>/userdata/user-data HTTP/1.1 404 Not Found Date: Fri, 28 Aug 2020 08:33:54 GMT Server: Apache Content-Length: 216 Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /userdata/user-data was not found on this server.</p> </body></html>
Other than that I have not found any helpful entries in the logs.
I also tried to access it on different ports. Port 8000 gives an Internal Server Error, which also appears in the production.log.
If I try to use port 8443 I get a userdata-template but this is rendered for my proxy-content-host and not for the given IP or host I want to provision. Same effect if I use a squid-proxy to connect to the main foreman.
I found that this should be somehow implemented in the pullrequest: https://github.com/theforeman/smart-proxy/pull/606
But it seems only to work for the main-foreman-server.
Am I missing some extra configuration to enable this or is this feature just not available?