Problem:
Hi,
I have foreman 1.23.1 with pupptserver 6.7.2 installed on same host. Everything works fine except the import of new node in foreman.
I have an external host, I installed puppet and configure puppet.conf to retrieve configuration form my puppterserver/foreman node. After the first puppet run execution, in the puppterserver host I sign the certificate with puppetserver ca sign --certificate ceph-node-02.pn.pd.infn.it. I restart httpd service. I find in foreman database the new host but I can not see that host in web interface.
In foreman settings I have:
- Foreman will create the host when new facts are received (yes)
- Foreman will create the host when a report is received (yes)
I can run /etc/puppetlabs/puppet/node.rb ceph-node-02.pn.pd.infn.it
If I try to add new node from web interface or use hammer I have this error: Name has already been taken
In production log I have this Warning:
2020-01-13T13:39:14 [I|app|415478d6] Started POST “/api/hosts/facts” for 193.206.210.248 at 2020-01-13 13:39:14 +0100
2020-01-13T13:39:14 [I|app|415478d6] Processing by Api::V2::HostsController#facts as JSON
2020-01-13T13:39:14 [I|app|415478d6] Parameters: {“facts”=>"[FILTERED]", “name”=>“ceph-node-02.pn.pd.infn.it”, “certname”=>“ceph-node-02.pn.pd.infn.it”, “apiv”=>“v2”, “host”=>{“certname”=>“ceph-node-02.pn.pd.infn.it”, “name”=>“ceph-node-02.pn.pd.infn.it”}}
2020-01-13T13:39:14 [I|app|415478d6] Import facts for ‘ceph-node-02.pn.pd.infn.it’ completed. Added: 0, Updated: 6, Deleted 0 facts
2020-01-13T13:39:14 [W|app|415478d6] Action failed
| NoMethodError: undefined method fetch' for #<String:0x00007f01955ff7b0> | /usr/share/foreman/app/services/puppet_fact_parser.rb:137:in
boot_timestamp’
| /usr/share/foreman/app/models/host/base.rb:237:in set_reported_data' | /usr/share/foreman/app/models/host/base.rb:188:in
populate_fields_from_facts’
| /usr/share/foreman/app/models/host/managed.rb:415:in populate_fields_from_facts' | /usr/share/foreman/app/models/concerns/puppet_host_extensions.rb:3:in
populate_fields_from_facts’
| /usr/share/foreman/app/models/host/base.rb:167:in block in parse_facts' | /usr/share/foreman/app/services/foreman/telemetry_helper.rb:27:in
telemetry_duration_histogram’
| /usr/share/foreman/app/models/host/base.rb:166:in parse_facts' | /usr/share/foreman/app/models/host/base.rb:152:in
import_facts’
| /usr/share/foreman/app/models/host/managed.rb:329:in import_facts' | /usr/share/foreman/app/controllers/api/v2/hosts_controller.rb:306:in
facts’
| /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action' | /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:194:in
process_action’
Expected outcome:
I expect to see the host in hosts tab
Foreman and Proxy versions:
foreman 1.23.1 foreman-proxy 1.23.1
Foreman and Proxy plugin versions:
Distribution and version:
Centos 7
Other relevant data: