Project

General

Profile

Actions

Bug #26763

closed

Foreman/Katello node.rb Issue with Puppet 6

Added by Jake Spain over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Found in Releases:

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

node.rb-master.example.com node.rb-master.example.com 1.66 KB Jake Spain, 05/08/2019 04:50 PM
puppetserver.log puppetserver.log 2.98 KB Jake Spain, 05/08/2019 04:50 PM
info_provider.rb info_provider.rb 1.8 KB Jean-Marie Magnier, 08/09/2019 09:58 AM
puppetserver.log puppetserver.log 140 KB Jean-Marie Magnier, 08/09/2019 09:59 AM
node.rb_query_result node.rb_query_result 2.42 KB Jean-Marie Magnier, 08/09/2019 09:59 AM
puppet_client.trace puppet_client.trace 705 Bytes Jean-Marie Magnier, 08/09/2019 09:59 AM
node.rb node.rb 11.8 KB Jean-Marie Magnier, 08/09/2019 10:02 AM
Actions #1

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?

Actions #2

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

Actions #3

Updated by Kevin V over 5 years ago

still broken with the latest release 1.22. Can someone fix it?

Actions #4

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.

Actions #5

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
Actions #6

Updated by Anonymous over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by Samir Jha over 5 years ago

  • Target version set to Katello 3.11.2
  • Triaged changed from No to Yes
Actions #8

Updated by Jonathon Turel over 5 years ago

  • Target version changed from Katello 3.11.2 to Katello 3.10.2
Actions #9

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

Actions #10

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.

Actions #11

Updated by Jonathon Turel over 5 years ago

  • Target version changed from Katello 3.10.2 to Katello 3.11.2
Actions #12

Updated by The Foreman Bot over 5 years ago

  • Pull request https://github.com/Katello/katello/pull/8197 added

Updated by Jean-Marie Magnier about 5 years ago

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 ?

Actions #14

Updated by Chris Roberts about 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.

Actions #15

Updated by Tomer Brisker about 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?

Actions #16

Updated by James Jeffers about 5 years ago

  • Target version set to Katello 3.10.2
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF