-
Bug
-
Resolution: Done
-
Normal
-
None
-
stream
-
1
-
False
-
-
False
-
0
-
Phoenix - Subscriptions
-
-
-
Sprint 141, Sprint 142, Sprint 143
-
Moderate
-
Automated
-
Yes
Description of problem:
hammer capsule content info throws "undefined method" error when content is synced to a Capsule but counts are not calculated.
How reproducible:
always
Is this issue a regression from an earlier version:
yes, works well in 6.16.0:
Steps to Reproduce:
1. Have a Satellite with external Capsule, turn automatic content count calculation off.
2. Create an LCE, assign it to the Capsule.
3. Create and sync some repo (fake_yum1).
4. Create a CV, add the repo to it, publish and promote to the LCE -> Capsule gets autosynced.
5. On Satellite try `hammer capsule content info --id <caps_id>`
Actual behavior:
- hammer capsule content info --id 2
Error: undefined method `each' for nil:NilClass
Expected behavior:
Same as at 6.16.0:
- hammer capsule content info --id 2
Lifecycle Environments:
1) Name: DEV
Organization: Default Organization
Content Views:
1) Name: CV-1
Composite: no
Last Published: 2024/10/10 10:27:20
Repositories:
1) Repository ID: 2
Repository Name: Animals
Content Counts:
Warning: Content view must be synced to see content counts
Business Impact
Low, correct numbers are returned after CC calculation
Additional info:
Here is trace from "hammer --debug" (nothing suspicious spotted in the production.log):
NoMethodError (undefined method `each' for nil:NilClass):
/usr/share/gems/gems/hammer_cli_katello-1.15.0.pre.main/lib/hammer_cli_katello/capsule.rb:258:in `block (3 levels) in extend_data'
/usr/share/gems/gems/hammer_cli_katello-1.15.0.pre.main/lib/hammer_cli_katello/capsule.rb:254:in `each'
/usr/share/gems/gems/hammer_cli_katello-1.15.0.pre.main/lib/hammer_cli_katello/capsule.rb:254:in `block (2 levels) in extend_data'
/usr/share/gems/gems/hammer_cli_katello-1.15.0.pre.main/lib/hammer_cli_katello/capsule.rb:253:in `each'
/usr/share/gems/gems/hammer_cli_katello-1.15.0.pre.main/lib/hammer_cli_katello/capsule.rb:253:in `block in extend_data'
/usr/share/gems/gems/hammer_cli_katello-1.15.0.pre.main/lib/hammer_cli_katello/capsule.rb:252:in `each'
/usr/share/gems/gems/hammer_cli_katello-1.15.0.pre.main/lib/hammer_cli_katello/capsule.rb:252:in `extend_data'
/usr/share/gems/gems/hammer_cli_foreman-3.13.0.pre.develop/lib/hammer_cli_foreman/commands.rb:503:in `send_request'
/usr/share/gems/gems/hammer_cli-3.13.0.pre.develop/lib/hammer_cli/apipie/command.rb:34:in `execute'
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
/usr/share/gems/gems/hammer_cli-3.13.0.pre.develop/lib/hammer_cli/abstract.rb:103:in `run'
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
/usr/share/gems/gems/hammer_cli-3.13.0.pre.develop/lib/hammer_cli/abstract.rb:103:in `run'
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
/usr/share/gems/gems/hammer_cli-3.13.0.pre.develop/lib/hammer_cli/abstract.rb:103:in `run'
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
/usr/share/gems/gems/hammer_cli-3.13.0.pre.develop/lib/hammer_cli/abstract.rb:103:in `run'
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:140:in `run'
/usr/share/gems/gems/hammer_cli-3.13.0.pre.develop/bin/hammer:142:in `<top (required)>'
/usr/bin/hammer:25:in `load'
/usr/bin/hammer:25:in `<main>'