Connection to the foreman server through a tunnel results in a wrong URL for the kickstart

First of all I am new to this mailing list and in general to Foreman so
apologies if this issue was already raised (I tried a google search but
I didn't find anything useful).

I have a weird problem with the rebuilding of hosts, done using the
"build" button of the Foreman UI.

If I connect to the foreman host using a tunnel (because from my
desktop I can't connect directly to the foreman host) i.e. if I do
something like:

ssh -L 8015:<foreman-host>:80 <gate-host>

and then in the browser I open the URL:

http://localhost:8015

to access to the dashboard, if I then want to rebuild a machine clicking
the "build" button, in the relevant kickstart I see:

append initrd=boot/Scientific-6.5-x86_64-initrd.img
ks=http://<foreman-host>:8015/unattended/provision ksdevice=eth0 network
kssendmac

i.e. a port is added in the URL (the same I used for the tunnel).
This port clearly shouldn't be part of the URL and therefore then the
machine can't boot.

Any workaround to address this annoying issue ?

Thanks, Massimo

Which version of Foreman is this? I think it should be addressed in
Foreman 1.4 which the introduction of the unattended_url setting.

··· On 10/02/14 15:54, Massimo Sgaravatto wrote: > First of all I am new to this mailing list and in general to Foreman so > apologies if this issue was already raised (I tried a google search but > I didn't find anything useful). > > I have a weird problem with the rebuilding of hosts, done using the > "build" button of the Foreman UI. > > If I connect to the foreman host using a tunnel (because from my > desktop I can't connect directly to the foreman host) i.e. if I do > something like: > > > ssh -L 8015::80 > > and then in the browser I open the URL: > > http://localhost:8015 > > to access to the dashboard, if I then want to rebuild a machine clicking > the "build" button, in the relevant kickstart I see: > > append initrd=boot/Scientific-6.5-x86_64-initrd.img > ks=http://:8015/unattended/provision ksdevice=eth0 network > kssendmac > > i.e. a port is added in the URL (the same I used for the tunnel). > This port clearly shouldn't be part of the URL and therefore then the > machine can't boot. > > > Any workaround to address this annoying issue ?


Dominic Cleal
Red Hat Engineering

>> First of all I am new to this mailing list and in general to Foreman so
>> apologies if this issue was already raised (I tried a google search but
>> I didn't find anything useful).
>>
>> I have a weird problem with the rebuilding of hosts, done using the
>> "build" button of the Foreman UI.
>>
>> If I connect to the foreman host using a tunnel (because from my
>> desktop I can't connect directly to the foreman host) i.e. if I do
>> something like:
>>
>>
>> ssh -L 8015:<foreman-host>:80 <gate-host>
>>
>> and then in the browser I open the URL:
>>
>> http://localhost:8015
>>
>> to access to the dashboard, if I then want to rebuild a machine clicking
>> the "build" button, in the relevant kickstart I see:
>>
>> append initrd=boot/Scientific-6.5-x86_64-initrd.img
>> ks=http://<foreman-host>:8015/unattended/provision ksdevice=eth0 network
>> kssendmac
>>
>> i.e. a port is added in the URL (the same I used for the tunnel).
>> This port clearly shouldn't be part of the URL and therefore then the
>> machine can't boot.
>>
>>
>> Any workaround to address this annoying issue ?
>
> Which version of Foreman is this?

1.3

I think it should be addressed in
> Foreman 1.4 which the introduction of the unattended_url setting.
>

Ok, we will update ASAP

Any workarounds that can be applied in the meantime ?

Thanks, Massimo

··· On 02/10/2014 05:34 PM, Dominic Cleal wrote: > On 10/02/14 15:54, Massimo Sgaravatto wrote:

I don't think so, sorry.

··· On 10/02/14 16:40, Massimo Sgaravatto wrote: > On 02/10/2014 05:34 PM, Dominic Cleal wrote: >> On 10/02/14 15:54, Massimo Sgaravatto wrote: >>> First of all I am new to this mailing list and in general to Foreman so >>> apologies if this issue was already raised (I tried a google search but >>> I didn't find anything useful). >>> >>> I have a weird problem with the rebuilding of hosts, done using the >>> "build" button of the Foreman UI. >>> >>> If I connect to the foreman host using a tunnel (because from my >>> desktop I can't connect directly to the foreman host) i.e. if I do >>> something like: >>> >>> >>> ssh -L 8015::80 >>> >>> and then in the browser I open the URL: >>> >>> http://localhost:8015 >>> >>> to access to the dashboard, if I then want to rebuild a machine clicking >>> the "build" button, in the relevant kickstart I see: >>> >>> append initrd=boot/Scientific-6.5-x86_64-initrd.img >>> ks=http://:8015/unattended/provision ksdevice=eth0 network >>> kssendmac >>> >>> i.e. a port is added in the URL (the same I used for the tunnel). >>> This port clearly shouldn't be part of the URL and therefore then the >>> machine can't boot. >>> >>> >>> Any workaround to address this annoying issue ? >> >> Which version of Foreman is this? > > 1.3 > > > I think it should be addressed in >> Foreman 1.4 which the introduction of the unattended_url setting. >> > > Ok, we will update ASAP > > Any workarounds that can be applied in the meantime ?


Dominic Cleal
Red Hat Engineering