Project

General

Profile

Bug #20567

RPM package update fails with Katello 3.4 - Puppet 4.10

Added by Anthony Chevalet almost 5 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
High
Assignee:
-
Category:
Client/Agent
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

In these conditions:
- katello-agent-3.0.0-3.el7.noarch - katello-host-tools-3.0.0-3.el7.noarch
- At least one package is listed in the output of 'yum check-update'
- Yum plugin 'enabled_repos_upload' enabled (default)

# puppet resource  package kernel ensure=latest
Error: Could not get latest version: undefined method `[]' for nil:NilClass
Error: /Package[kernel]/ensure: change from 3.10.0-514.10.2.el7 to latest failed: Could not get latest version: undefined method `[]' for nil:NilClass
package { 'kernel':
  ensure => '3.10.0-514.10.2.el7',
}

Bug report opened on puppet side: https://tickets.puppetlabs.com/browse/PUP-7813

History

#1 Updated by Anthony Chevalet almost 5 years ago

  • Subject changed from Katello-agent 3.4 conflict with puppet 4 package resource to RPM package update fails with Katello 3.4 - Puppet 4.10
  • Category set to Client/Agent
  • Legacy Backlogs Release (now unused) set to 286

wa: disable enabled_repos_upload plugin

#2 Updated by Eric Helms almost 5 years ago

  • Status changed from New to Need more information

Anthony,

Do you have any stack traces to help us locate where in the code or what situation is causing enabled_repos_upload to fail when you run puppet?

#3 Updated by Eric Helms almost 5 years ago

  • Status changed from Need more information to Rejected
  • Legacy Backlogs Release (now unused) changed from 286 to 166

Anthony,

I believe this is a valid Puppet bug and not an issue with our yum plugin. Examining the issue, the yum plugin we provide is outputting to stdout information that is valid for a yum plugin to do IMO. The bug is in the puppet yum parsing code not handling this potential for yum plugins to output information. Check this:

1.2.7-17.el7
base
Uploading
Enabled
Reposistories
Error: Could not get latest version: undefined method `[]' for nil:NilClass
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/yum.rb:114:in `update_to_hash'

You can see its trying to include and parse the data coming from the plugin. Further, if you run the same command puppet is running 'yum check-update' you can see this at the bottom:

Uploading Enabled Reposistories Report
Loaded plugins: fastestmirror, product-id
Cannot upload enabled repos report, is this client registered?

Where the "Loaded plugins: fastestmirror, product-id" is valid output from yum regarding plugins. Puppet should be handling this properly IMO. I am going to set this to rejected but I would encourage you to feed this back to puppet so that it gets fixed properly.

#4 Updated by Eric Helms almost 5 years ago

Sorry, just to give you a little more info, I think this is a regression from Puppet 3.

[root@l7 vagrant]# rpm -q puppet
puppet-3.8.6-4.el7sat.noarch
[root@l7 vagrant]# puppet resource  package kernel ensure=latest --trace
package { 'kernel':
  ensure => '3.10.0-693.el7',
}

#5 Updated by Anthony Chevalet almost 5 years ago

Thank you Eric. Yes this is a regression, was not sure on which side as I've updated both Katello and Puppet. I've updated the bug on puppet side with this info.

#6 Updated by Eric Helms almost 5 years ago

Apparently PE also suffers from this issue. I attempted to fix this myself [1]. Hopefully I'll get some feedback and can iterate to get a fix in. Then we just need to press on them for a release that includes in. I found that locally you can work around this by adjusting your yum.conf debuglevel:

Open /etc/yum.conf

debuglevel=1

This will still break if there are errors coming from a yum plugin, but not if everything is operational. You'd have to apply this update to all your clients that are hitting the issue.

[1] https://github.com/puppetlabs/puppet/pull/6128

#7 Updated by Anthony Chevalet almost 5 years ago

Thanks for the workaround, it works fine. Hope your fix will be merged soon.

Also available in: Atom PDF