Problem:
I am provisioning hosts with PXE and preseed. I got multiple Domains that belong to one subnet. This subnet has a DHCP-server managed by foreman.
Domains:
- configuration.example.zone
- example.cloud
If I build a host with domain 1 the setup process is running fine. If I use the second domain, I am getting this error:
A strange issue:
In foreman, the new host, in this example “ann-keever.example.cloud” is built and after preseeding a second host is being added to foreman which is called ann-keever.configuration.example.zone.
I am using the default templates for the OS:
This is the foreman-log:
2021-04-14T18:19:25 [I|app|26f7640b] Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 0.8ms | Allocations: 2129)
2021-04-14T18:19:35 [I|app|0dc79971] Started GET "/notification_recipients" for 217.86.129.190 at 2021-04-14 18:19:35 +0200
2021-04-14T18:19:35 [I|app|0dc79971] Processing by NotificationRecipientsController#index as JSON
2021-04-14T18:19:35 [I|app|0dc79971] Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 0.7ms | Allocations: 2129)
2021-04-14T18:19:46 [I|app|eb6c507d] Started GET "/unattended/provision" for 123.123.123.158 at 2021-04-14 18:19:46 +0200
2021-04-14T18:19:46 [I|app|eb6c507d] Processing by UnattendedController#host_template as TEXT
2021-04-14T18:19:46 [I|app|eb6c507d] Parameters: {"kind"=>"provision"}
2021-04-14T18:19:46 [I|app|eb6c507d] Rendering text template
2021-04-14T18:19:46 [I|app|eb6c507d] Rendered text template (Duration: 0.0ms | Allocations: 2)
2021-04-14T18:19:46 [I|app|eb6c507d] Completed 200 OK in 86ms (Views: 0.5ms | ActiveRecord: 11.9ms | Allocations: 63201)
2021-04-14T18:20:19 [I|app|2e147deb] Started GET "/" for 134.209.222.195 at 2021-04-14 18:20:19 +0200
2021-04-14T18:20:19 [I|app|2e147deb] Processing by DashboardController#index as HTML
2021-04-14T18:20:19 [I|app|2e147deb] Redirected to https://123.123.123.136/users/login
2021-04-14T18:20:19 [I|app|2e147deb] Filter chain halted as :require_login rendered or redirected
2021-04-14T18:20:19 [I|app|2e147deb] Completed 302 Found in 5ms (ActiveRecord: 1.2ms | Allocations: 1312)
2021-04-14T18:21:48 [I|app|24ec22dc] Started GET "/node/foreman.configuration.example.zone?format=yml" for 123.123.123.136 at 2021-04-14 18:21:48 +0200
2021-04-14T18:21:48 [I|app|24ec22dc] Processing by HostsController#externalNodes as YML
2021-04-14T18:21:48 [I|app|24ec22dc] Parameters: {"name"=>"foreman.configuration.example.zone"}
2021-04-14T18:21:48 [I|app|24ec22dc] Rendering text template
2021-04-14T18:21:48 [I|app|24ec22dc] Rendered text template (Duration: 0.0ms | Allocations: 3)
2021-04-14T18:21:48 [I|app|24ec22dc] Completed 200 OK in 53ms (Views: 0.5ms | ActiveRecord: 10.3ms | Allocations: 21099)
2021-04-14T18:21:49 [I|app|5ad8c245] Started POST "/api/hosts/facts" for 123.123.123.136 at 2021-04-14 18:21:49 +0200
2021-04-14T18:21:49 [I|app|5ad8c245] Processing by Api::V2::HostsController#facts as JSON
2021-04-14T18:21:49 [I|app|5ad8c245] Parameters: {"facts"=>"[FILTERED]", "name"=>"foreman.configuration.example.zone", "certname"=>"foreman.configuration.example.zone", "apiv"=>"v2", "host"=>{"certname"=>"foreman.configuration.example.zone", "name"=>"foreman.configuration.example.zone"}}
2021-04-14T18:21:49 [I|app|5ad8c245] Import facts for 'foreman.configuration.example.zone' completed. Added: 0, Updated: 14, Deleted 0 facts
2021-04-14T18:21:49 [I|app|5ad8c245] Completed 201 Created in 443ms (Views: 2.1ms | ActiveRecord: 105.9ms | Allocations: 180547)
2021-04-14T18:21:49 [I|app|f813e051] Started GET "/node/foreman.configuration.example.zone?format=yml" for 123.123.123.136 at 2021-04-14 18:21:49 +0200
2021-04-14T18:21:49 [I|app|f813e051] Processing by HostsController#externalNodes as YML
2021-04-14T18:21:49 [I|app|f813e051] Parameters: {"name"=>"foreman.configuration.example.zone"}
2021-04-14T18:21:49 [I|app|f813e051] Rendering text template
2021-04-14T18:21:49 [I|app|f813e051] Rendered text template (Duration: 0.0ms | Allocations: 3)
2021-04-14T18:21:49 [I|app|f813e051] Completed 200 OK in 44ms (Views: 0.5ms | ActiveRecord: 8.7ms | Allocations: 20121)
2021-04-14T18:21:50 [I|app|957c38f2] Started POST "/api/config_reports" for 123.123.123.136 at 2021-04-14 18:21:50 +0200
2021-04-14T18:21:50 [I|app|957c38f2] Processing by Api::V2::ConfigReportsController#create as JSON
2021-04-14T18:21:50 [I|app|957c38f2] Parameters: {"config_report"=>"[FILTERED]", "apiv"=>"v2"}
2021-04-14T18:21:50 [I|app|957c38f2] Scanning report with: Foreman::PuppetReportScanner
2021-04-14T18:21:50 [I|app|957c38f2] Imported report for foreman.configuration.example.zone in 18.6 ms, status refreshed in 7.6 ms
2021-04-14T18:21:50 [I|app|957c38f2] Rendering api/v2/config_reports/create.json.rabl
2021-04-14T18:21:50 [I|app|957c38f2] Rendered api/v2/config_reports/create.json.rabl (Duration: 6.3ms | Allocations: 5879)
2021-04-14T18:21:50 [I|app|957c38f2] Completed 201 Created in 44ms (Views: 7.0ms | ActiveRecord: 9.4ms | Allocations: 19456)
2021-04-14T18:22:03 [I|app|ce99c8a5] Started GET "/unattended/finish" for 123.123.123.158 at 2021-04-14 18:22:03 +0200
2021-04-14T18:22:03 [I|app|ce99c8a5] Processing by UnattendedController#host_template as TEXT
2021-04-14T18:22:03 [I|app|ce99c8a5] Parameters: {"kind"=>"finish"}
2021-04-14T18:22:03 [I|app|ce99c8a5] Rendering text template
2021-04-14T18:22:03 [I|app|ce99c8a5] Rendered text template (Duration: 0.0ms | Allocations: 2)
2021-04-14T18:22:03 [I|app|ce99c8a5] Completed 200 OK in 190ms (Views: 0.5ms | ActiveRecord: 16.7ms | Allocations: 166628)
2021-04-14T18:22:14 [I|app|012cf7b5] Started GET "/node/ann-keever.example.cloud?format=yml" for 123.123.123.136 at 2021-04-14 18:22:14 +0200
2021-04-14T18:22:14 [I|app|012cf7b5] Processing by HostsController#externalNodes as YML
2021-04-14T18:22:14 [I|app|012cf7b5] Parameters: {"name"=>"ann-keever.example.cloud"}
2021-04-14T18:22:14 [I|app|012cf7b5] Rendering text template
2021-04-14T18:22:14 [I|app|012cf7b5] Rendered text template (Duration: 0.0ms | Allocations: 2)
2021-04-14T18:22:14 [I|app|012cf7b5] Completed 200 OK in 61ms (Views: 0.6ms | ActiveRecord: 9.1ms | Allocations: 20004)
2021-04-14T18:22:14 [I|app|49fa9b35] Started POST "/api/hosts/facts" for 123.123.123.136 at 2021-04-14 18:22:14 +0200
2021-04-14T18:22:14 [I|app|49fa9b35] Processing by Api::V2::HostsController#facts as JSON
2021-04-14T18:22:14 [I|app|49fa9b35] Parameters: {"facts"=>"[FILTERED]", "name"=>"ann-keever.configuration.example.zone", "certname"=>"ann-keever.example.cloud", "apiv"=>"v2", "host"=>{"certname"=>"ann-keever.example.cloud", "name"=>"ann-keever.configuration.example.zone"}}
2021-04-14T18:22:15 [I|app|49fa9b35] Import facts for 'ann-keever.configuration.example.zone' completed. Added: 269, Updated: 0, Deleted 0 facts
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on mac
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on ip
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on type Nic::Managed
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on name ann-keever.configuration.example.zone
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on host_id 36
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on subnet_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on domain_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on attrs {}
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on provider
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on username
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on password [redacted]
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on virtual false
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on link true
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on identifier
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on tag
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on attached_to
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on managed true
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on mode balance-rr
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on attached_devices
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on bond_options
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on primary true
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on provision true
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on compute_attributes {}
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on ip6
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) create event on subnet6_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on name ann-keever.configuration.example.zone
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on root_pass
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on architecture_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on operatingsystem_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on environment_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on ptable_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on medium_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on build false
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on comment
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on disk
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on installed_at
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on model_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on hostgroup_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on owner_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on owner_type
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on enabled true
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on puppet_ca_proxy_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on managed false
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on use_image
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on image_file
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on uuid
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on compute_resource_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on puppet_proxy_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on certname ann-keever.example.cloud
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on image_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on organization_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on location_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on otp
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on realm_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on compute_profile_id
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on provision_method
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on grub_pass
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on pxe_loader
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on initiated_at
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) create event on build_errors
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) update event on mac , 36:d2:63:25:6e:2c
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) update event on domain_id , 1
2021-04-14T18:22:15 [I|aud|49fa9b35] Nic::Managed (37) update event on identifier , ens18
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) update event on architecture_id , 1
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) update event on operatingsystem_id , 1
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) update event on environment_id , 1
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) update event on model_id , 1
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) update event on puppet_ca_proxy_id , 1
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) update event on puppet_proxy_id , 1
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) update event on organization_id , 1
2021-04-14T18:22:15 [I|aud|49fa9b35] Host::Base (36) update event on location_id , 2
2021-04-14T18:22:15 [I|app|49fa9b35] Completed 201 Created in 941ms (Views: 1.3ms | ActiveRecord: 281.0ms | Allocations: 378668)
2021-04-14T18:22:15 [I|app|4f7c1408] Started GET "/node/ann-keever.example.cloud?format=yml" for 123.123.123.136 at 2021-04-14 18:22:15 +0200
2021-04-14T18:22:15 [I|app|4f7c1408] Processing by HostsController#externalNodes as YML
2021-04-14T18:22:15 [I|app|4f7c1408] Parameters: {"name"=>"ann-keever.example.cloud"}
2021-04-14T18:22:15 [I|app|4f7c1408] Rendering text template
2021-04-14T18:22:15 [I|app|4f7c1408] Rendered text template (Duration: 0.0ms | Allocations: 3)
2021-04-14T18:22:15 [I|app|4f7c1408] Completed 200 OK in 38ms (Views: 0.5ms | ActiveRecord: 7.2ms | Allocations: 17412)
2021-04-14T18:22:16 [I|app|c599c230] Started POST "/api/config_reports" for 123.123.123.136 at 2021-04-14 18:22:16 +0200
2021-04-14T18:22:16 [I|app|c599c230] Processing by Api::V2::ConfigReportsController#create as JSON
2021-04-14T18:22:16 [I|app|c599c230] Parameters: {"config_report"=>"[FILTERED]", "apiv"=>"v2"}
2021-04-14T18:22:16 [I|app|c599c230] Scanning report with: Foreman::PuppetReportScanner
2021-04-14T18:22:16 [I|app|c599c230] Imported report for ann-keever.example.cloud in 16.8 ms, status refreshed in 7.2 ms
2021-04-14T18:22:16 [I|app|c599c230] Rendering api/v2/config_reports/create.json.rabl
2021-04-14T18:22:16 [I|app|c599c230] Rendered api/v2/config_reports/create.json.rabl (Duration: 5.4ms | Allocations: 5877)
2021-04-14T18:22:16 [I|app|c599c230] Completed 201 Created in 41ms (Views: 6.3ms | ActiveRecord: 8.5ms | Allocations: 19518)
2021-04-14T18:22:17 [I|app|56ea42a1] Started POST "/unattended/built" for 123.123.123.158 at 2021-04-14 18:22:17 +0200
2021-04-14T18:22:17 [I|app|56ea42a1] Processing by UnattendedController#built as TEXT
2021-04-14T18:22:17 [W|app|56ea42a1] Multiple hosts found with 123.123.123.158 or [], picking up the most recent
2021-04-14T18:22:17 [I|app|56ea42a1] Completed 405 Method Not Allowed in 12ms (ActiveRecord: 3.1ms | Allocations: 3483)
This line is the one I don’t understand:
Parameters: {"facts"=>"[FILTERED]", "name"=>"ann-keever.configuration.example.zone", "certname"=>"ann-keever.example.cloud", "apiv"=>"v2", "host"=>{"certname"=>"ann-keever.example.cloud", "name"=>"ann-keever.configuration.example.zone"}}
Foreman and Proxy versions:
- 2.4
Distribution and version:
- Debian 10
** Additional information **
DHCP
Version2.4.0
Subnets FRA1 (123.123.123.128/27)
DNS
Version2.4.0
Domains configuration.example.zone, example.cloud, and virtualization.example.zone
Registration
Version2.4.0
TFTP
Version2.4.0
TFTP server false