Foreman 1.3 host reinstall issues

Hi,

I have some hosts that I've set to < build >.
After I rebooted them, I was surprised to see they did not reinstall…

Looking at the logs, it seems that the dhcp reservation was not created, hence I had a "no free leases" dhcp reply.
It also seems that the /etc/puppet/autosign file is not updated (anymore ?)

I tried to cancel build/rebuild : same issue.

As a last resort, I deleted the host, and recreated it : only then, foreman did log it was happy and creating the host dhcp reservation :

Delete logs :
Delete DHCP reservation for xxx
Delete the TFTP configuration for xxx
Remove puppet certificate for xxx
Delete the autosign entry for xx

Create logs :
Create DHCP reservation for xxx
Add the TFTP configuration for xxx
(no autosign ?)

The autosign file is still empty, though, I'm wondering if that's normal ?
One of the hosts is currently installing, I left another In its current state to go on debugging.

My dhcp.leases file did not contain anything , by the way.

Anything known about such an issue?
Any idea how to fix/where to look at ?

Thanks && regards

> Hi,
>
>
>
> I have some hosts that I�ve set to � build �.
>
> After I rebooted them, I was surprised to see they did not reinstall�
>
>
>
> Looking at the logs, it seems that the dhcp reservation was not created,
> hence I had a �no free leases� dhcp reply.
>
> It also seems that the /etc/puppet/autosign file is not updated (anymore ?)
>
>
>
> I tried to cancel build/rebuild : same issue.
>
>
>
> As a last resort, I deleted the host, and recreated it : only then,
> foreman did log it was happy and creating the host dhcp reservation :

The DHCP reservation should have been added when the host was originally
created, not just when it goes into build mode. Else it gets updated I
think if you change the IP, MAC or subnet.

> Delete logs :
>
> Delete DHCP reservation for xxx
>
> Delete the TFTP configuration for xxx
>
> Remove puppet certificate for xxx
>
> Delete the autosign entry for xx
>
>
>
> Create logs :
>
> Create DHCP reservation for xxx
>
> Add the TFTP configuration for xxx
>
> (no autosign ?)
>
>
>
> The autosign file is still empty, though, I�m wondering if that�s normal ?

autosign only happens when the host retrieves its provisioning template,
then is removed again when the build completes/is cancelled.

··· On 08/11/13 10:32, SCHAER Frederic wrote:


Dominic Cleal
Red Hat Engineering

Hi Dominic,

Thank you for the quick reply.
I think I'm starting to understand…

Since I recently installed 200 hosts, my old puppetmaster started melting, and I did migrate the foreman/puppet setup onto another host.
I did not backup the leases file, as I would never have thought there would be a need for it… since I'm setting up my hosts with static ips.

So now, I must make sure it is recreated and coherent with the all of the hosts managed by foreman.
Do you think it's reasonable to ask for this RFE : "make sure the dhcpd lease is present when a host is built" (i.e : don't assume it was already there 6 months ago) ?

Regards

-----Message d'origine-----

··· De : foreman-users@googlegroups.com [mailto:foreman-users@googlegroups.com] De la part de Dominic Cleal Envoyé : vendredi 8 novembre 2013 11:37 À : foreman-users@googlegroups.com Objet : Re: [foreman-users] foreman 1.3 host reinstall issues

On 08/11/13 10:32, SCHAER Frederic wrote:

Hi,

I have some hosts that I’ve set to « build ».

After I rebooted them, I was surprised to see they did not reinstall.

Looking at the logs, it seems that the dhcp reservation was not created,
hence I had a “no free leases” dhcp reply.

It also seems that the /etc/puppet/autosign file is not updated (anymore ?)

I tried to cancel build/rebuild : same issue.

As a last resort, I deleted the host, and recreated it : only then,
foreman did log it was happy and creating the host dhcp reservation :

The DHCP reservation should have been added when the host was originally
created, not just when it goes into build mode. Else it gets updated I
think if you change the IP, MAC or subnet.

Delete logs :

Delete DHCP reservation for xxx

Delete the TFTP configuration for xxx

Remove puppet certificate for xxx

Delete the autosign entry for xx

Create logs :

Create DHCP reservation for xxx

Add the TFTP configuration for xxx

(no autosign ?)

The autosign file is still empty, though, I’m wondering if that’s normal ?

autosign only happens when the host retrieves its provisioning template,
then is removed again when the build completes/is cancelled.


Dominic Cleal
Red Hat Engineering


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

Yes, that's possible. What I'd also like to see is a way to recreate
DHCP leases, TFTP files and other data from Foreman. There's a blog
article here that shows how to recreate them with a script, but we
really should have a UI around it:

··· -- Dominic Cleal Red Hat Engineering

On 08/11/13 10:54, SCHAER Frederic wrote:

Hi Dominic,

Thank you for the quick reply.
I think I’m starting to understand…

Since I recently installed 200 hosts, my old puppetmaster started melting, and I did migrate the foreman/puppet setup onto another host.
I did not backup the leases file, as I would never have thought there would be a need for it… since I’m setting up my hosts with static ips.

So now, I must make sure it is recreated and coherent with the all of the hosts managed by foreman.
Do you think it’s reasonable to ask for this RFE : “make sure the dhcpd lease is present when a host is built” (i.e : don’t assume it was already there 6 months ago) ?

Regards

-----Message d’origine-----
De : foreman-users@googlegroups.com [mailto:foreman-users@googlegroups.com] De la part de Dominic Cleal
Envoy� : vendredi 8 novembre 2013 11:37
� : foreman-users@googlegroups.com
Objet : Re: [foreman-users] foreman 1.3 host reinstall issues

On 08/11/13 10:32, SCHAER Frederic wrote:

Hi,

I have some hosts that I’ve set to � build �.

After I rebooted them, I was surprised to see they did not reinstall.

Looking at the logs, it seems that the dhcp reservation was not created,
hence I had a “no free leases” dhcp reply.

It also seems that the /etc/puppet/autosign file is not updated (anymore ?)

I tried to cancel build/rebuild : same issue.

As a last resort, I deleted the host, and recreated it : only then,
foreman did log it was happy and creating the host dhcp reservation :

The DHCP reservation should have been added when the host was originally
created, not just when it goes into build mode. Else it gets updated I
think if you change the IP, MAC or subnet.

Delete logs :

Delete DHCP reservation for xxx

Delete the TFTP configuration for xxx

Remove puppet certificate for xxx

Delete the autosign entry for xx

Create logs :

Create DHCP reservation for xxx

Add the TFTP configuration for xxx

(no autosign ?)

The autosign file is still empty, though, I’m wondering if that’s normal ?

autosign only happens when the host retrieves its provisioning template,
then is removed again when the build completes/is cancelled.

Wow. Thanks so much, this saved me quite some time.
This seems so easy with ruby/rails (when you know how it works) :]

Regards

-----Message d'origine-----

··· De : foreman-users@googlegroups.com [mailto:foreman-users@googlegroups.com] De la part de Dominic Cleal Envoyé : vendredi 8 novembre 2013 12:33 À : foreman-users@googlegroups.com Objet : Re: [foreman-users] foreman 1.3 host reinstall issues

Yes, that’s possible. What I’d also like to see is a way to recreate
DHCP leases, TFTP files and other data from Foreman. There’s a blog
article here that shows how to recreate them with a script, but we
really should have a UI around it:


Dominic Cleal
Red Hat Engineering

On 08/11/13 10:54, SCHAER Frederic wrote:

Hi Dominic,

Thank you for the quick reply.
I think I’m starting to understand…

Since I recently installed 200 hosts, my old puppetmaster started melting, and I did migrate the foreman/puppet setup onto another host.
I did not backup the leases file, as I would never have thought there would be a need for it… since I’m setting up my hosts with static ips.

So now, I must make sure it is recreated and coherent with the all of the hosts managed by foreman.
Do you think it’s reasonable to ask for this RFE : “make sure the dhcpd lease is present when a host is built” (i.e : don’t assume it was already there 6 months ago) ?

Regards

-----Message d’origine-----
De : foreman-users@googlegroups.com [mailto:foreman-users@googlegroups.com] De la part de Dominic Cleal
Envoyé : vendredi 8 novembre 2013 11:37
À : foreman-users@googlegroups.com
Objet : Re: [foreman-users] foreman 1.3 host reinstall issues

On 08/11/13 10:32, SCHAER Frederic wrote:

Hi,

I have some hosts that I’ve set to « build ».

After I rebooted them, I was surprised to see they did not reinstall.

Looking at the logs, it seems that the dhcp reservation was not created,
hence I had a “no free leases” dhcp reply.

It also seems that the /etc/puppet/autosign file is not updated (anymore ?)

I tried to cancel build/rebuild : same issue.

As a last resort, I deleted the host, and recreated it : only then,
foreman did log it was happy and creating the host dhcp reservation :

The DHCP reservation should have been added when the host was originally
created, not just when it goes into build mode. Else it gets updated I
think if you change the IP, MAC or subnet.

Delete logs :

Delete DHCP reservation for xxx

Delete the TFTP configuration for xxx

Remove puppet certificate for xxx

Delete the autosign entry for xx

Create logs :

Create DHCP reservation for xxx

Add the TFTP configuration for xxx

(no autosign ?)

The autosign file is still empty, though, I’m wondering if that’s normal ?

autosign only happens when the host retrieves its provisioning template,
then is removed again when the build completes/is cancelled.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.