Problem:
Error message in UI stating: ‘undefined method `puppet’ for nil:NilClass’
Expected outcome:
To be able to provision the discovered asset/vm
Foreman and Proxy versions:
Foreman version:
Foreman version: 3.0.0
Proxy versions:
Ansible: 3.2.1
DHCP: 3.0.0
DNS: 3.0.0
Dynflow: 0.5.2
HTTPBoot: 3.0.0
Registration: 3.0.0
SSH: 0.4.1
TFTP: 3.0.0
Foreman and Proxy plugin versions:
Foreman version:
Foreman version: 3.0.0
Plugin versions:
foreman-tasks 5.1.0
foreman_ansible 6.4.1
foreman_dhcp_browser 0.0.8
foreman_discovery 18.0.0
foreman_openscap 5.0.0
foreman_puppet 1.0.1
foreman_remote_execution 4.7.0
Distribution and version:
CentOS Linux release 8.4.2105
Other relevant data:
Tangential, but possibly related: After a fresh install of 3.0.0, some hammer commands weren’t working which was addressed by a suggested patch proposed in this thread: Previously working hammer commands return ISE on Fresh 3.0 install. Although, because a new error is now appearing, I deleted my followup reply/findings on that thread and created a new topic here (to keep the noise down over there). I only mention all of this, in the event the two are related.
In a newly installed 3.0.0 env (with the patch applied) attempting to provision a discovered VM fails.
The stack trace complains about missing fields (which are expected because I couldn’t continue to that step in the UI).
Reproduced, Puppet 1.0.1 is likely missing a commit.
I tested with Discovery 18.0 and Puppet develop branch and it works, but Puppet 1.0.1 branch does not and I experience the very same issue. @ezr-ondrej there is likely a commit that needs to be backported into Foreman 3.0 version of the puppet plugin.
I tested 18.0 against develop when I was testing it, both via Quick provision and Customize host. I should have done this against 1.0.1, my bad.
Yup, this should be already resolved in 1.0.3, tho we are still on 1.0.1 in Foreman 3.0, the Puppet plugin 1.0.3 got merged into packaging yesterday, I’ll backport those into 3.0, but it will go with Foreman 3.0.1 anyway.
On Centos, the latest packages available are foreman 3.0.0 and foreman_puppet 1.0.1.
Foreman_puppet 1.0.3 is available in the nightly repository.
Which is the best approach to patch foreman 3.0.0 with this fix? Wait for foreman 3.0.1 (any idea on when it will be released)? Use the foreman_puppet package from the nightly repository?
Sorry, mea culpa. I had to reboot the foreman master to have the foreman puppet plugin refreshed from 1.0.1 to 1.0.3. And then the customize host problem disappeared.
For the server I provisioned yesterday, I used Discovered Hosts → Provision → Customize Host → selected the right hostgroup → and then further customization in the host page.
Actually, I found a bug on the Host Parameters page. When you click on Override, a new empty line is added. If you add multiple overrides, the values (key/value) in the previous ones are cleared. Probably something in the javascript.
Workaround is to add x overrides, and then fill manually all the fields.
Do you see the same if you edit an existing (provisioned) host? If so, file against Foreman core - Hosts. If you only see this for discovery then file it against Discovery Redmine project.