Host ended in Pending install when deployed through Foreman

Hello Everyone,
I am trying to deploy few nodes through Foreman in our production environment and lately I am seeing the hosts are ending up with “Pending installation” state with “B” instead of Operational.

This is the error I am seeing on Foreman server:
foreman]# cat production.log | grep Failed

2019-07-02 08:30:05 [app] [W] Failed to remove trusted_puppetmaster_hosts from cache

2019-07-02 18:23:07 [app] [I] Failed to save: Name can’t be blank

2019-07-02 18:23:13 [app] [I] Failed to save: Root password should be 8 characters or more, Root password should not be blank - consider setting a global or host group default

2019-07-02 18:31:29 [app] [W] Failed to generate PXELinux template: undefined method `grub_pass’ for #<Nic::Managed:0x007fcd950f92d0>

2019-07-02 18:31:30 [sql] [W] Failed to set Build on test-01: [“Failed to generate PXELinux template: undefined method `grub_pass’ for #<Nic::Managed:0x007fcd950f92d0>”]

2019-07-02 19:00:05 [app] [W] Failed to remove use_gravatar from cache

Newly built host working fine with no issues and this is what I am seeing on it:

cat install.post.log

updating system time

Configuring puppet

Note: Forwarding request to ‘systemctl enable puppet.service’.

Created symlink /etc/systemd/system/multi-user.target.wants/puppet.service, pointing to /usr/lib/systemd/system/puppet.service.

Informing Foreman that we are built

We are using Foreman Version 1.9.3

Also I like to know how can I deploy bulk hosts instead of filling form for each node. Please help with this.
appreciate and thanks in advance for any help.

Regards,
CS

One way is using the Hammer CLI instead of using the WebUI.

If you have a host group setup, it’s as simple as this:

hammer host create --name=demo4 --mac=1234567890AB --hostgroup=prototype

Why are you using 1.9.3 instead of a more modern version like 1.20.2 or 1.22.0?

We use the hammer CLI for bulk tasks too. Easy to use especially in conjunction with Python.
But wings is right… Foreman 1.9.3 is very very old and no guarantee of topics working with this version.

So I’d recommend to update to version 1.22 or atleast 1.19. as three versions are currently active supported here.

Thank you so much Wings. I upgraded to 1.22. now it looks good. will explore hammer cli options.
Just need to define host group in Foreman right? we can launch remaining tasks like host provisioning and running puppet and ansible for post OS tasks through hammer cli?

Regards,
CS

I’m not sure as I haven’t gotten to that point yet but in theory you can use the Puppet and Ansible integration to do that all automatically. For me the point of the host groups is that I can specify which OS, partition table, etc etc once and then use those choices in the CLI later, which saves a lot of typing.