I recently updated to Puppet 5 and PuppetDB 5. I am running Foreman 1.16. I went to enable the puppetdb module, version 3.0.2 as it states in the about page and am having issues getting it going. One important part to point out here is that I am also using puppet to configure my Foreman setup (which is not an all-in-on box, but rather split into multiple hosts for different roles)
So with that out of the way, the foreman puppet module is attempting to run the following command:
/usr/sbin/foreman-rake --trace -- config -k 'puppetdb_api_version' -v '4'
(sans the --trace part, I added that for testing)
This results in the following output/error:
** Invoke config (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute config rake aborted! NoMethodError: undefined method `settings_type' for nil:NilClass /usr/share/foreman/lib/tasks/config.rake:105:in `block in run_key_values' /usr/share/foreman/lib/tasks/config.rake:100:in `each' /usr/share/foreman/lib/tasks/config.rake:100:in `run_key_values' /usr/share/foreman/lib/tasks/config.rake:77:in `run' /usr/share/foreman/lib/tasks/config.rake:167:in `block in <top (required)>' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `call' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `each' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain' /opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run' /opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>' Tasks: TOP => config
Now, I did try changing that 4 to a 5, no help there. (figured there was a chance it needed to say it wanted API version 5, but then if the plugin doesn’t support it that’s moot anyway)
Has anyone seen this before? Is it more of a “wait until foreman 1.17 / foreman-puppetdb 4.0.0”? One additional thing I will point out is that if I simply comment out the call to install the module in puppet, everything seems to function ok. I can see the module installed, and it appears to function correctly.
If this is better served as an issue on the puppet module itself, I will happily post it there, but I wanted to ideally get some background on what the puppet module -should- be doing that it’s currently doing incorrectly so that I could, perhaps, submit a pull request and save y’all some work. =)