iPXE Boot file not created

Hi,

Ipxe boot file is not created when I build a host.
Though, Ipxe file is created after autoprovision by a discovery rules. Never after that.

The host is configured with pxe loader set to None.
The operating system has PXELinux, PXEgrub2 and iPXE templates associated with.

Host configuration :

Only the pxe Linux file is created when I build the host.
Pxegrub2 file is created when I rebuild the host.

I’ve tried to set differents pxeloader, same result

Production.log (following autoprovision, ipxe and Pxegrub2 are created)

Summary
2020-07-17T11:59:04 [I|app|e4ebeaf9] Match found for host mac004e01 (177) rule A112 (126)
2020-07-17T11:59:04 [D|app|e4ebeaf9] Auto-provisioning via rule A112 hostgroup     DualBoot_MultiHDD_Ubuntu_Windows_UEFI/A112 subnet eleves
2020-07-17T11:59:05 [D|app|e4ebeaf9] Enqueued task 'Deploy TFTP PXELinux config for a112pc11.local' to 'Host::Managed Main' queue
2020-07-17T11:59:05 [D|app|e4ebeaf9] Enqueued task 'Deploy TFTP PXEGrub2 config for a112pc11.local' to 'Host::Managed Main' queue
2020-07-17T11:59:05 [D|app|e4ebeaf9] Enqueued task 'Deploy TFTP PXEGrub config for a112pc11.local' to 'Host::Managed Main' queue
2020-07-17T11:59:05 [D|app|e4ebeaf9] Enqueued task 'Deploy TFTP iPXE config for a112pc11.local' to 'Host::Managed Main' queue
2020-07-17T11:59:05 [D|app|e4ebeaf9] Enqueued task 'Fetch TFTP boot files for a112pc11.local' to 'Host::Managed Main' queue
2020-07-17T11:59:05 [D|app|e4ebeaf9] Processing task 'Deploy TFTP PXELinux config for a112pc11.local' from 'Host::Managed Main'
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current organization set to ISIMA
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current location set to Salles_de_cours
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current location set to none
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current organization set to none
2020-07-17T11:59:05 [I|app|e4ebeaf9] Deploying TFTP PXELinux configuration for a112pc11.local
2020-07-17T11:59:05 [D|app|e4ebeaf9] Processing task 'Deploy TFTP PXEGrub2 config for a112pc11.local' from 'Host::Managed Main'
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current organization set to ISIMA
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current location set to Salles_de_cours
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current location set to none
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current organization set to none
2020-07-17T11:59:05 [I|app|e4ebeaf9] Deploying TFTP PXEGrub2 configuration for a112pc11.local
2020-07-17T11:59:05 [D|app|e4ebeaf9] Processing task 'Deploy TFTP PXEGrub config for a112pc11.local' from 'Host::Managed Main'
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current organization set to ISIMA
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current location set to Salles_de_cours
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current location set to none
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current organization set to none
2020-07-17T11:59:05 [I|app|e4ebeaf9] Skipping TFTP PXEGrub configuration for a112pc11.local
2020-07-17T11:59:05 [D|app|e4ebeaf9] Processing task 'Deploy TFTP iPXE config for a112pc11.local' from 'Host::Managed Main'
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current organization set to ISIMA
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current location set to Salles_de_cours
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current location set to none
2020-07-17T11:59:05 [D|tax|e4ebeaf9] Current organization set to none
2020-07-17T11:59:05 [I|app|e4ebeaf9] Deploying TFTP iPXE configuration for a112pc11.local
2020-07-17T11:59:05 [D|app|e4ebeaf9] Processing task 'Fetch TFTP boot files for a112pc11.local' from 'Host::Managed Main'
2020-07-17T11:59:05 [I|app|e4ebeaf9] Fetching required TFTP boot files for a112pc11.local
2020-07-17T11:59:05 [I|app|e4ebeaf9] Processed 5 tasks from queue 'Host::Managed Main', completed 5/5
2020-07-17T11:59:05 [D|app|e4ebeaf9] Task 'Deploy TFTP PXELinux config for a112pc11.local' *completed*
2020-07-17T11:59:05 [D|app|e4ebeaf9] Task 'Deploy TFTP PXEGrub2 config for a112pc11.local' *completed*
2020-07-17T11:59:05 [D|app|e4ebeaf9] Task 'Deploy TFTP PXEGrub config for a112pc11.local' *completed*
2020-07-17T11:59:05 [D|app|e4ebeaf9] Task 'Deploy TFTP iPXE config for a112pc11.local' *completed*
2020-07-17T11:59:05 [D|app|e4ebeaf9] Task 'Fetch TFTP boot files for a112pc11.local' *completed*

Production.log, when i build the host (pxeloader set to ‘None’)

Summary
2020-07-18T23:36:25 [I|app|c90923d0] Started PUT "/hosts/a112pc11.local/setBuild?auth_object=a112pc11.local&permission=build_hosts" for 192.168.79.51 at 2020-07-18 23:36:25 +0200
2020-07-18T23:36:25 [I|app|c90923d0] Processing by HostsController#setBuild as HTML
2020-07-18T23:36:25 [I|app|c90923d0]   Parameters: {"utf8"=>"â", "authenticity_token"=>"kFC==", "commit"=>"Build", "auth_object"=>"a112pc11.local", "permission"=>"build_hosts", "id"=>"a112pc11.local"}
2020-07-18T23:36:25 [D|tax|c90923d0] Current location set to none
2020-07-18T23:36:25 [D|tax|c90923d0] Current organization set to none
2020-07-18T23:36:25 [D|app|c90923d0] Enqueued task 'Désactiver la signature automatique PuppetCA pour a112pc11.local' to 'Host::Managed Post' queue
2020-07-18T23:36:25 [D|app|c90923d0] Enqueued task 'Nettoyer les certificats PuppetCA pour a112pc11.local' to 'Host::Managed Post' queue
2020-07-18T23:36:25 [D|app|c90923d0] Enqueued task 'Activer la signature automatique PuppetCA pour a112pc11.local' to 'Host::Managed Post' queue
2020-07-18T23:36:25 [D|app|c90923d0] Enqueued task 'Déployer TFTP %{king} config pour %{host}' to 'Host::Managed Main' queue
2020-07-18T23:36:25 [D|app|c90923d0] Task 'Déployer TFTP %{king} config pour %{host}' already in 'Host::Managed Main' queue
2020-07-18T23:36:25 [D|app|c90923d0] Task 'Déployer TFTP %{king} config pour %{host}' already in 'Host::Managed Main' queue
2020-07-18T23:36:25 [D|app|c90923d0] Task 'Déployer TFTP %{king} config pour %{host}' already in 'Host::Managed Main' queue
2020-07-18T23:36:25 [D|app|c90923d0] Enqueued task 'Récupération des fichiers de boot en TFTP pour a112pc11.local' to 'Host::Managed Main' queue
2020-07-18T23:36:25 [D|app|c90923d0] Processing task 'Déployer TFTP %{king} config pour %{host}' from 'Host::Managed Main'
2020-07-18T23:36:25 [D|tax|c90923d0] Current organization set to ISIMA
2020-07-18T23:36:25 [D|tax|c90923d0] Current location set to Salles_de_cours
2020-07-18T23:36:25 [D|tax|c90923d0] Current location set to none
2020-07-18T23:36:25 [D|tax|c90923d0] Current organization set to none
2020-07-18T23:36:25 [I|app|c90923d0] Deploying TFTP PXELinux configuration for a112pc11.local
2020-07-18T23:36:25 [D|app|c90923d0] Processing task 'Récupération des fichiers de boot en TFTP pour a112pc11.local' from 'Host::Managed Main'
2020-07-18T23:36:25 [I|app|c90923d0] Fetching required TFTP boot files for a112pc11.local
2020-07-18T23:36:25 [I|app|c90923d0] Processed 2 tasks from queue 'Host::Managed Main', completed 2/2
2020-07-18T23:36:25 [D|app|c90923d0] Task 'Déployer TFTP %{king} config pour %{host}' *completed*
2020-07-18T23:36:25 [D|app|c90923d0] Task 'Récupération des fichiers de boot en TFTP pour a112pc11.local' *completed*
2020-07-18T23:36:26 [I|aud|c90923d0] Host::Base (177) update event on build false, true
2020-07-18T23:36:26 [I|aud|c90923d0] Host::Base (177) update event on initiated_at , 2020-07-18 23:36:25 +0200
2020-07-18T23:36:26 [D|app|c90923d0] Processing task 'Désactiver la signature automatique PuppetCA pour a112pc11.local' from 'Host::Managed Post'
2020-07-18T23:36:26 [I|app|c90923d0] Delete the autosign entry for a112pc11.local
2020-07-18T23:36:26 [D|app|c90923d0] Processing task 'Nettoyer les certificats PuppetCA pour a112pc11.local' from 'Host::Managed Post'
2020-07-18T23:36:26 [I|app|c90923d0] Remove puppet certificate for a112pc11.local
2020-07-18T23:36:26 [D|app|c90923d0] Processing task 'Activer la signature automatique PuppetCA pour a112pc11.local' from 'Host::Managed Post'
2020-07-18T23:36:26 [I|app|c90923d0] Adding autosign entry for a112pc11.local
2020-07-18T23:36:26 [I|app|c90923d0] Processed 3 tasks from queue 'Host::Managed Post', completed 3/3
2020-07-18T23:36:26 [D|app|c90923d0] Task 'Désactiver la signature automatique PuppetCA pour a112pc11.local' *completed*
2020-07-18T23:36:26 [D|app|c90923d0] Task 'Nettoyer les certificats PuppetCA pour a112pc11.local' *completed*
2020-07-18T23:36:26 [D|app|c90923d0] Task 'Activer la signature automatique PuppetCA pour a112pc11.local' *completed*
2020-07-18T23:36:26 [D|app|c90923d0] custom hook after_build on a112pc11.local will be executed if defined.
2020-07-18T23:36:26 [I|app|c90923d0] Redirected to https://foreman.local/hosts/a112pc11.local
2020-07-18T23:36:26 [I|app|c90923d0] Completed 302 Found in 763ms (ActiveRecord: 72.2ms)
2020-07-18T23:36:26 [I|app|98f52b2c] Started GET "/hosts/a112pc11.local" for 192.168.79.51 at 2020-07-18 23:36:26 +0200

Production.log when i rebuild the host

Summary
2020-07-18T23:41:53 [I|app|7315e673] Started POST "/hosts/submit_rebuild_config?host_ids%5B%5D=177" for 192.168.79.51 at 2020-07-18 23:41:53 +0200
2020-07-18T23:41:53 [I|app|7315e673] Processing by HostsController#submit_rebuild_config as HTML
2020-07-18T23:41:53 [I|app|7315e673]   Parameters: {"utf8"=>"â", "authenticity_token"=>"C6q==", "host_ids"=>["177"]}
2020-07-18T23:41:53 [D|tax|7315e673] Current location set to none
2020-07-18T23:41:53 [D|tax|7315e673] Current organization set to none
2020-07-18T23:41:53 [I|app|7315e673] DHCP not supported for a112pc11.local, 172.16.43.110, skipping orchestration rebuild
2020-07-18T23:41:53 [I|app|7315e673] DNS record type a not supported for a112pc11.local, skipping orchestration rebuild
2020-07-18T23:41:53 [I|app|7315e673] DNS record type aaaa not supported for a112pc11.local, skipping orchestration rebuild
2020-07-18T23:41:53 [I|app|7315e673] DNS record type ptr4 not supported for a112pc11.local, skipping orchestration rebuild
2020-07-18T23:41:53 [I|app|7315e673] DNS record type ptr6 not supported for a112pc11.local, skipping orchestration rebuild
2020-07-18T23:41:53 [D|tax|7315e673] Current organization set to ISIMA
2020-07-18T23:41:53 [D|tax|7315e673] Current location set to Salles_de_cours
2020-07-18T23:41:53 [D|tax|7315e673] Current location set to none
2020-07-18T23:41:53 [D|tax|7315e673] Current organization set to none
2020-07-18T23:41:54 [I|app|7315e673] Deploying TFTP PXELinux configuration for a112pc11.local
2020-07-18T23:41:54 [D|tax|7315e673] Current organization set to ISIMA
2020-07-18T23:41:54 [D|tax|7315e673] Current location set to Salles_de_cours
2020-07-18T23:41:54 [D|tax|7315e673] Current location set to none
2020-07-18T23:41:54 [D|tax|7315e673] Current organization set to none
2020-07-18T23:41:54 [I|app|7315e673] Deploying TFTP PXEGrub2 configuration for a112pc11.local
2020-07-18T23:41:54 [D|tax|7315e673] Current organization set to ISIMA
2020-07-18T23:41:54 [D|tax|7315e673] Current location set to Salles_de_cours
2020-07-18T23:41:54 [D|tax|7315e673] Current location set to none
2020-07-18T23:41:54 [D|tax|7315e673] Current organization set to none
2020-07-18T23:41:54 [I|app|7315e673] Skipping TFTP PXEGrub configuration for a112pc11.local
2020-07-18T23:41:54 [I|app|7315e673] Redirected to https://foreman.local/hosts
2020-07-18T23:41:54 [I|app|7315e673] Completed 302 Found in 1165ms (ActiveRecord: 134.5ms)
2020-07-18T23:41:54 [I|app|d144c278] Started GET "/hosts" for 192.168.79.51 at 2020-07-18 23:41:54 +0200
2020-07-18T23:41:54 [I|app|d144c278] Processing by HostsController#index as HTML
2020-07-18T23:41:54 [D|tax|d144c278] Current location set to none
2020-07-18T23:41:54 [D|tax|d144c278] Current organization set to none
2020-07-18T23:41:54 [I|app|d144c278]   Rendering hosts/index.html.erb within layouts/application
2020-07-18T23:41:54 [I|app|d144c278]   Rendered common/_pagination.html.erb (1.1ms)
2020-07-18T23:41:54 [I|app|d144c278]   Rendered hosts/_list.html.erb (20.5ms)
2020-07-18T23:41:54 [I|app|d144c278]   Rendered hosts/index.html.erb within layouts/application (37.1ms)
2020-07-18T23:41:54 [I|app|d144c278]   Rendered common/_searchbar.html.erb (0.9ms)
2020-07-18T23:41:54 [I|app|d144c278]   Rendered layouts/_application_content.html.erb (3.2ms)
2020-07-18T23:41:54 [I|app|d144c278]   Rendering layouts/base.html.erb
2020-07-18T23:41:54 [I|app|d144c278]   Rendered layouts/base.html.erb (32.2ms)
2020-07-18T23:41:54 [I|app|d144c278] Completed 200 OK in 142ms (Views: 77.8ms | ActiveRecord: 22.1ms)

Foreman 1.24.3
Smart-proxy 1.24.3
CentOS Linux release 7.7.1908 (Core)

Thank for your help

Hello and welcome!

Foreman does generate PXE configuration regardless of PXE loader settings. If you have a host with all three PXE templates associated, then when host enters build mode, Foreman will render and deploy all three PXE configuration files:

Check taxonomy (Organization, Location) of your templates, if they are not available it might be skipped.

Thanks for your reply,

I’ve checked and checked again, all 3 templates are assigned to all organization and locations,
I reinstall foreman from strach, same result,

I will try with foreman 1.23

Same result with foreman 1.23 and foreman 2.1

iPXE file is created only on autoprovisionning, not after

I don’t understand why grub2 file is not created too, when i set pxeloader to grub2, only pxelinux file is created.

Entire foreman configuration (organization, location, subnet etc) is managed by ansible. It is the issue ?

Can you go to the WebUI and check taxonomy of these templates? Organizations, locations…

Taxonomy is OK (I will post screen later)
Rendering before build is ok

Pxegrub2 file is not created when I build the host, however pxegrub2 file is created when I rebuild the host. So I think is not a problem with taxonomy, am I right?

Here, PxeGrub2 template config:

Host organization’s and location’s :

Check taxonomy of templates themselves please. Anyone else can help me here?

Taxonomy seems correct :

Wait, iPXE templates do not get generated onto TFTP server, they are rendered on the fly because iPXE does support HTTP directly so it can be fetched directly from our templating endpoint.