Project

General

Profile

Bug #28223

foreman-rake katello:reimport fails with 'NoMethodError: undefined method `pulp2_service_class' for nil:NilClass'

Added by Samir Jha over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1770044

Description of problem:

foreman-rake katello:reimport no longer works.

Version-Release number of selected component (if applicable):

6.6

How reproducible:

easy

Steps to Reproduce:

run `foreman-rake katello:reimport`

Actual results:

It fails with below traceback:

foreman-rake katello:reimport
Importing Katello::Erratum
Importing Katello::PackageGroup
Importing Katello::PuppetModule
Importing Katello::Rpm
Importing Katello::Srpm
Importing Katello::ModuleStream
Importing Katello::YumMetadataFile
Importing Katello::Deb
rake aborted!
NoMethodError: undefined method `pulp2_service_class' for nil:NilClass
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.27/app/models/katello/concerns/smart_proxy_extensions.rb:180:in `content_service'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.27/app/models/katello/concerns/pulp_database_unit.rb:61:in `import_all'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.27/lib/katello/tasks/reimport.rake:41:in `block (3 levels) in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.27/lib/katello/tasks/reimport.rake:39:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.27/lib/katello/tasks/reimport.rake:39:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:reimport

Expected results:

It should complete successfully without the error.

Additional info:

To workaround the issue, comment out below line in /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.27/lib/katello/tasks/reimport.rake

models = [Katello::Erratum,
Katello::PackageGroup,
Katello::PuppetModule,
Katello::Rpm,
Katello::Srpm,
Katello::ModuleStream,
Katello::YumMetadataFile,
#Katello::Deb,
...

Associated revisions

Revision 36788226 (diff)
Added by Samir Jha over 2 years ago

Fixes #28223 - Don't reimport deb if unavailable (#8425)

History

#1 Updated by Samir Jha over 2 years ago

  • Category changed from 111 to Repositories

#2 Updated by The Foreman Bot over 2 years ago

  • Assignee set to Samir Jha
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8425 added

#3 Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases Katello 3.15.0 added

#4 Updated by Samir Jha over 2 years ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Jonathon Turel over 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.13.3

Also available in: Atom PDF