Unattended/built issue

Hi,

I have just this week started to have a look at foreman and have things
working now pretty well.

One thing which isn't working quite right yet it the step which when the
new server is built tells the foreman server that is the case, it always
fails as it uses a different IP to the one assigned to it.

When I log in to the newly created server and manually do a wget for
/unattended/built it works fine and the server is marked as built in
foreman as expected.

Has anyone come across this before? Its probably something simple I have
setup wrong somewhere but I cant see where it gets this wrong IP from
during the built but once built and its up the IP is fine.

Thanks,
Andy.

Just to add to this… In foreman the IP assigned to the host I am building
is 192.168.71.30.

in the ks file i have the default line to register with foreman that it is
built.

wget -q -O /dev/null --no-check-certificate <%= foreman_url %>

during the build i get this in the log:

Started GET "/unattended/built" for 192.168.71.129 at 2014-01-29 11:14:21
+0000

Processing by UnattendedController#built as /

unattended: unable to find a host that matches the request from
192.168.71.129

Filter chain halted as :get_host_details rendered or redirected

Completed 404 Not Found in 10ms (ActiveRecord: 1.2ms)

but if i then run the same wget from the command line once i log in to the
server it works as expected.

Started GET "/unattended/built" for 192.168.71.30 at 2014-01-29 11:23:28
+0000

Processing by UnattendedController#built as /

Found centos64-2.holford.com

unattended: centos64-2.holford.com is Built!

Add the TFTP configuration for centos64-2.holford.com

Fetching required TFTP boot files for centos64-2.holford.com

Add the TFTP configuration for centos64-2.holford.com

Delete the autosign entry for centos64-2.holford.com

Completed 201 Created in 603ms (ActiveRecord: 16.9ms)

··· On Wednesday, 29 January 2014 17:22:24 UTC, Andrew Holford wrote: > > Hi, > > I have just this week started to have a look at foreman and have things > working now pretty well. > > One thing which isn't working quite right yet it the step which when the > new server is built tells the foreman server that is the case, it always > fails as it uses a different IP to the one assigned to it. > > When I log in to the newly created server and manually do a wget for > /unattended/built it works fine and the server is marked as built in > foreman as expected. > > Has anyone come across this before? Its probably something simple I have > setup wrong somewhere but I cant see where it gets this wrong IP from > during the built but once built and its up the IP is fine. > > Thanks, > Andy. >

I had a similar problem when I started using the smart proxy, but the
virtual machine I was provisioning via Foreman had its NIC configured as
bridge, so it could reach both the DHCP server of the smart proxy AND the
DHCP server of the corporate LAN, and for some strange reason it got the
first answer during PXE boot from the smart proxy, but when actually
starting the installation it got a different IP from the corporate DHCP and
so installation stopped there.

Do you also have two DHCP servers, by chance?

Marco

··· On Wednesday, January 29, 2014 6:22:24 PM UTC+1, Andrew Holford wrote:

One thing which isn’t working quite right yet it the step which when the
new server is built tells the foreman server that is the case, it always
fails as it uses a different IP to the one assigned to it.

Take a look at enabling Provisioning Tokens (they're on by default in
Foreman 1.4) which use a uuid string instead of the IP to identify the
host. Just set token_duration to something other than 0 and try rebuilding
the host.

Greg

Yep, thanks for the prompt response, that solved the issues.

Thanks.

··· On Wednesday, 29 January 2014 17:35:12 UTC, Greg Sutcliffe wrote: > > Take a look at enabling Provisioning Tokens (they're on by default in > Foreman 1.4) which use a uuid string instead of the IP to identify the > host. Just set token_duration to something other than 0 and try rebuilding > the host. > > Greg >