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
Updated by Jonathon Turel over 5 years ago
- Project changed from Katello to Foreman
While this is not exactly a supported setup, I'll reassign this to the Foreman project as they can make the call on whether the code should be changed as you mentioned.
Also, would you mind attaching the Bugzilla you mentioned to this issue?
Updated by Jake Spain over 5 years ago
Hi Jonathon, Understandable, by "unsupported" are you referring to the fact that we are running the "Satellite" packages from Red Hat instead of the upstream versions or that it is using Puppet 6? If it is the later, then I imagine this is more of a general dependency for Puppet 6 support since other users running Katello will definitely have this same problem.
I opened an internal case with Red Hat, but they don't recommend submitting directly to bugzilla as its mostly for the engineers use (https://access.redhat.com/solutions/505743), but I can certainly reply back when they open the bugzilla internally so that it gets proper priority.
Thanks,
Jake
Updated by Kevin V over 5 years ago
still broken with the latest release 1.22. Can someone fix it?
Updated by Tomer Brisker over 5 years ago
- Project changed from Foreman to Katello
- Category set to Hosts
The issue is at https://github.com/Katello/katello/blob/master/app/models/katello/host/info_provider.rb#L31 which sends the time object itself instead of a string representation to the yaml encoder.
Updated by The Foreman Bot over 5 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomer Brisker
- Pull request https://github.com/Katello/katello/pull/8147 added
Updated by Anonymous over 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|e2cbcd5be621c2fe588119a33096367beb164d0d.
Updated by Samir Jha over 5 years ago
- Target version set to Katello 3.11.2
- Triaged changed from No to Yes
Updated by Jonathon Turel over 5 years ago
- Target version changed from Katello 3.11.2 to Katello 3.10.2
Updated by Alain Deleglise over 5 years ago
Hello, any news on this issue ?
I can confirm I'm still facing the bug :
On the server:
CentOS Linux release 7.6.1810
katello.noarch 3.12.0-1.el7
On the client:
CentOS Linux release 7.6.1810
puppet-agent.x86_64 6.4.2-1.el7
katello-agent.noarch 3.5.0-2.el7
subscription-manager.x86_64 1.21.10-3.el7.centos
puppet agent -t
Warning: Error 500 on SERVER: Server Error: Could not load external node results for node.example.com: (<unknown>): Tried to load unspecified class: Time
Updated by Ewoud Kohl van Wijngaarden over 5 years ago
- Fixed in Releases Katello 3.11.2, Katello 3.10.2, Katello 3.13.0 added
This still needs a cherry pick into 3.12.1.
Updated by Jonathon Turel over 5 years ago
- Target version changed from Katello 3.10.2 to Katello 3.11.2
Updated by The Foreman Bot over 5 years ago
- Pull request https://github.com/Katello/katello/pull/8197 added
Updated by Jean-Marie Magnier over 5 years ago
- File info_provider.rb info_provider.rb added
- File puppetserver.log puppetserver.log added
- File node.rb_query_result node.rb_query_result added
- File puppet_client.trace puppet_client.trace added
- File node.rb node.rb added
- Triaged changed from Yes to No
Hey all,
I have tried to upgrade with the fix Katello in 3.12.1 but the issue is always present.
Matric version after upgrade
OS version : CentOS 7.6-1810
Puppetserver : 6.5.0-1
Foreman : 1.22.0-1
Katello : 3.12.1
After Puppet server upgrade, when I run puppet on client i receive error message "_Warning: Error 500 on SERVER: Server Error: Could not load external node results for frk004921.neptune.dkcorp.net: (<unknown>): Tried to load unspecified class: Time_"
I join for help some content :
- from Foreman => info_provider.rb
- from puppet => node.rb
Log :
- Puppetserver => puppetserver.log
- Puppet Client => puppet_client.trace
Query result :
- node.rb xxxx.xxxx.xxx.xxx => node.rb_query_result
Could you help us ?
Updated by Chris Roberts over 5 years ago
- Project changed from Katello to Foreman
- Category changed from Hosts to Puppet integration
- Status changed from Closed to New
- Target version deleted (
Katello 3.11.2)
Moving this back to Foreman since it looks to be related to Puppet. If it needs help from Katello feel free to move it back again.
Updated by Tomer Brisker over 5 years ago
- Project changed from Foreman to Katello
- Category changed from Puppet integration to Hosts
- Status changed from New to Closed
This was an issue in katello that was merged and included in releases already, moving it back to that.
Jean-Marie - It looks like the host info includes the publish time attribute properly, can you please open a new issue and include the production.log with the full backtrace when trying to run puppet on the host?
Updated by James Jeffers about 5 years ago
- Target version set to Katello 3.10.2
- Triaged changed from No to Yes