<%= foreman_url %> expansion doesn't include port number

I was just looking at why my test hosts never show up as completed
builds, and it seems I have a problem:

foreman gets confused because the build network is behind a NAT. It
also seems that the IP assigned to the host is not available as a
macro in templates, so I can't just add ?spoof=<%= host.ipaddress %>
or similar, and I can't spoof by name (which is available).

Processing UnattendedController#built (for 192.168.121.182 at
2011-07-14 13:44:10) [GET]
unattended: unable to find ip/mac match for 192.168.121.182
Filter chain halted as [:get_host_details] rendered_or_redirected.
Completed in 2ms (View: 0, DB: 1) | 404 Not Found [http://
foreman.domain.com/unattended/built]

Are there workarounds for this? having the foreman and proxy in
different networks is kind of the point, isn't it?

Cheers,

Howie

> I was just looking at why my test hosts never show up as completed
> builds, and it seems I have a problem:
>
> foreman gets confused because the build network is behind a NAT. It
> also seems that the IP assigned to the host is not available as a
> macro in templates, so I can't just add ?spoof=<%= host.ipaddress %>
> or similar, and I can't spoof by name (which is available).
Foreman tries to guess the hostname/ipaddress it should use, in case
where it cant (e.g. it cant auto detect that), you can simply override
it.

for that purpose, you could use a parameter on some level to override it
(e.g. in the domain level etc) and simply access that via the host:
host.params["my_url"] (where my_url is the param that you defined in
foreman.

about the ip, its simply host.ip, feel free to add a feature request to
alias ip and ipaddress.

··· On Thu, 2011-07-14 at 06:40 -0700, Howard Jones wrote:

Processing UnattendedController#built (for 192.168.121.182 at
2011-07-14 13:44:10) [GET]
unattended: unable to find ip/mac match for 192.168.121.182
Filter chain halted as [:get_host_details] rendered_or_redirected.
Completed in 2ms (View: 0, DB: 1) | 404 Not Found [http://
foreman.domain.com/unattended/built]

Are there workarounds for this? having the foreman and proxy in
different networks is kind of the point, isn’t it?

Cheers,

Howie

Cool, that's what I was missing. I've updated the wiki page to include it, too.

Thanks!

··· On 14 July 2011 14:48, Ohad Levy wrote: > about the ip, its simply host.ip, feel free to add a feature request to > alias ip and ipaddress.