Project

General

Profile

Actions

Bug #28223

closed

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

Added by Samir Jha about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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,
...

Actions #1

Updated by Samir Jha about 5 years ago

  • Category changed from 111 to Repositories
Actions #2

Updated by The Foreman Bot about 5 years ago

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

Updated by The Foreman Bot about 5 years ago

  • Fixed in Releases Katello 3.15.0 added
Actions #4

Updated by Samir Jha about 5 years ago

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

Updated by Jonathon Turel about 5 years ago

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

Also available in: Atom PDF