Debian provisioning fails on wget to finish script

As far as I can tell I've setup my host and OS correctly but whenever I try
to provision a Debian 7 (wheezy) system it fails with the error:

... failed to run preseeded command execution of preseeded command 

"wget http://foreman…/unattended/finish?token=<token> -0
/target/tmp/finish.sh && in-target chmod +x /tmp/finish.sh && in-target
/tmp/finish.sh"

Looking through the Preseed default template the line that seems to
generate this is

d-i preseed/late_command string wget -Y off &lt;%= foreman_url(&#39;finish&#39;) 

%> -O /target/tmp/finish.sh && in-target chmod +x /tmp/finish.sh &&
in-target /tmp/finish.sh

and I can only assume that the URL generated by foreman_url("finish") is
what's required to point to the Preseed default finish script which does
exist. As far as I'm aware I'm not using an HTTP proxy and the output YAML
does not show a parameter where one has been set. For the OS settings I've
tried changing the minor version to 6, 0, and left empty, all build but
fail in the same way on the call to download the finish script.

One last thing, when I try to run the wget from a different host (not sure
if I should be able to do this or if the token needs to match the host) I
get ERROR 405: Method Not Allowed.

Thanks.

A minor misunderstanding on my behalf. If a finish script has no
association then the OS configuration doesn't show a list of the selections
to choose from. I'm testing now but that was likely the issue.

··· On Friday, 15 August 2014 10:47:06 UTC-7, Geoff Johnson wrote: > > As far as I can tell I've setup my host and OS correctly but whenever I > try to provision a Debian 7 (wheezy) system it fails with the error: > > ... failed to run preseeded command execution of preseeded command > "wget http://foreman...../unattended/finish?token= -0 > /target/tmp/finish.sh && in-target chmod +x /tmp/finish.sh && in-target > /tmp/finish.sh" > > Looking through the Preseed default template the line that seems to > generate this is > > d-i preseed/late_command string wget -Y off <%= foreman_url('finish') > %> -O /target/tmp/finish.sh && in-target chmod +x /tmp/finish.sh && > in-target /tmp/finish.sh > > and I can only assume that the URL generated by foreman_url("finish") is > what's required to point to the Preseed default finish script which does > exist. As far as I'm aware I'm not using an HTTP proxy and the output YAML > does not show a parameter where one has been set. For the OS settings I've > tried changing the minor version to 6, 0, and left empty, all build but > fail in the same way on the call to download the finish script. > > One last thing, when I try to run the wget from a different host (not sure > if I should be able to do this or if the token needs to match the host) I > get ERROR 405: Method Not Allowed. > > Thanks. >

Hi !

Maybe another "in-target" before your wget command solved your problem …

cheers,
martin

··· Am Freitag, 15. August 2014 19:47:06 UTC+2 schrieb Geoff Johnson: > > As far as I can tell I've setup my host and OS correctly but whenever I > try to provision a Debian 7 (wheezy) system it fails with the error: > > ... failed to run preseeded command execution of preseeded command > "wget http://foreman...../unattended/finish?token= -0 > /target/tmp/finish.sh && in-target chmod +x /tmp/finish.sh && in-target > /tmp/finish.sh" > > Looking through the Preseed default template the line that seems to > generate this is > > d-i preseed/late_command string wget -Y off <%= foreman_url('finish') > %> -O /target/tmp/finish.sh && in-target chmod +x /tmp/finish.sh && > in-target /tmp/finish.sh > > and I can only assume that the URL generated by foreman_url("finish") is > what's required to point to the Preseed default finish script which does > exist. As far as I'm aware I'm not using an HTTP proxy and the output YAML > does not show a parameter where one has been set. For the OS settings I've > tried changing the minor version to 6, 0, and left empty, all build but > fail in the same way on the call to download the finish script. > > One last thing, when I try to run the wget from a different host (not sure > if I should be able to do this or if the token needs to match the host) I > get ERROR 405: Method Not Allowed. > > Thanks. >

Geoff,

Best thing to do is to check the "Templates" tab on the Host page for
the Host in question. You should have 3 entries (at least), for PXE,
provision (preseed) and the finish script. If it isn;t there then the
OS association needs to be made. If it is there, click the Review
button to get a rendered version of the template for that host. If it
renders ok in your browser, then something else is the issue and we
can dig a little futher.

Greg

That was indeed the issue and the misunderstanding that I eluded to. After
making that association everything was happy.

Thanks

··· On Saturday, 16 August 2014 09:11:13 UTC-7, Greg Sutcliffe wrote: > > Geoff, > > Best thing to do is to check the "Templates" tab on the Host page for > the Host in question. You should have 3 entries (at least), for PXE, > provision (preseed) and the finish script. If it isn;t there then the > OS association needs to be made. If it *is* there, click the Review > button to get a rendered version of the template for that host. If it > renders ok in your browser, then something else is the issue and we > can dig a little futher. > > Greg >