Bug #28223
closedforeman-rake katello:reimport fails with 'NoMethodError: undefined method `pulp2_service_class' for nil:NilClass'
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,
...
Updated by Samir Jha about 5 years ago
- Category changed from 111 to Repositories
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
Updated by The Foreman Bot about 5 years ago
- Fixed in Releases Katello 3.15.0 added
Updated by Samir Jha about 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|3678822678a370ccea855c4d02ff43e4b6fc5dcf.
Updated by Jonathon Turel about 5 years ago
- Target version set to Katello 3.13.3
- Triaged changed from No to Yes