Bug #26763
closedForeman/Katello node.rb Issue with Puppet 6
Description
Greetings,
I am using an Open Source Puppet Master (non-AIO) setup with Foreman/Katello to send reports and facts to the separate Foreman instance following the setup instructions at https://theforeman.org/manuals/1.21/index.html#3.5.4PuppetReports.
When upgrading the Puppet Master from 5 to 6, I started receiving the following error on puppet agent runs:
Could not load external node results for master.example.com: (<unknown>): Tried to load unspecified class: Time
I found an open ticket with Puppet on this issue, but has since been closed with "Will not fix" because it would bypass data type security measures: https://tickets.puppetlabs.com/browse/PUP-9506#
The short version of why this is happening is because node.rb is returning a key of the Ruby type "Time", where Puppet now only allows a string, number, array, or hash to be returned.
This is where I believe it is katello related because node.rb is returning the node's assigned content view's last publish time, see snippet below:
lifecycle_environment: Production
content_view: Base_RHEL_7_Repos
content_view_info:
label: Base_RHEL_7_Repos
latest-version: '22.0'
version: '21.0'
published: 2019-04-23 14:44:00.319456000 Z
components: {}
I have attached a sanitized version of the Puppet master log and results of running /etc/puppetlabs/puppet/node.rb master.example.com
to the ticket.
With the Puppet 6 master I used the latest versions of foreman.rb and node.rb at https://github.com/theforeman/puppet-foreman/blob/f9d2c0b518bfd3b635afd28aa4b0abdfb86e58ab/files/foreman-report_v2.rb and https://github.com/theforeman/puppet-foreman/blob/f9d2c0b518bfd3b635afd28aa4b0abdfb86e58ab/files/external_node_v2.rb, respectively.
We are actually running Satellite 6.4.3, which is foreman-1.18.0.41 and katello-3.7.0 under the hood.
Is there any way that it could be modified so that the "published" key returns a string or number data type instead of Time, per the engineers suggestion?
I hope that wasn't too much of a brain dump and that it all makes sense. I will also open a ticket with Red Hat.
Please let me know if there's any information I can provide.
Respectfully,
Jake
Files