Project

General

Profile

Actions

Bug #37954

closed

hammer capsule content info fails when counts are out of date

Added by Ian Ballou about 2 months ago. Updated 27 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
medium
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When the content_counts -> content_view_versions count returned by the /katello/api/capsules/2/content/sync are out of date, hammer -v -d capsule content info --id 2 returns:

NoMethodError (undefined method `each' for nil:NilClass):
/home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/capsule.rb:258:in `block (3 levels) in extend_data'
/home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/capsule.rb:254:in `each'
/home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/capsule.rb:254:in `block (2 levels) in extend_data'
/home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/capsule.rb:253:in `each'
/home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/capsule.rb:253:in `block in extend_data'
/home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/capsule.rb:252:in `each'
/home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/capsule.rb:252:in `extend_data'
/home/vagrant/hammer-cli-foreman/lib/hammer_cli_foreman/commands.rb:503:in `send_request'
/home/vagrant/hammer-cli/lib/hammer_cli/apipie/command.rb:34:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:103:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:103:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:103:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
/home/vagrant/.gem/ruby/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
/home/vagrant/hammer-cli/lib/hammer_cli/abstract.rb:103:in `run'
/home/vagrant/.gem/ruby/gems/clamp-1.3.2/lib/clamp/command.rb:140:in `run'
/home/vagrant/hammer-cli/bin/hammer:142:in `<top (required)>'
/home/vagrant/.gem/ruby/bin/hammer:23:in `load'
/home/vagrant/.gem/ruby/bin/hammer:23:in `<top (required)>'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:63:in `load'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:63:in `kernel_load'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:28:in `run'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:475:in `exec'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:31:in `dispatch'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:25:in `start'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/libexec/bundle:46:in `block in <top (required)>'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/bundler-2.2.24/libexec/bundle:34:in `<top (required)>'
/opt/rh/rh-ruby27/root/usr/bin/bundle:23:in `load'
/opt/rh/rh-ruby27/root/usr/bin/bundle:23:in `<main>'

To reproduce:

- Sync two environments to a smart proxy
- Disable automatic content count updating after syncing
- Republish one of the environments in some content view
- This invalidates the counts for that environment
- Check the content counts page. The counts will not be available for the repositories related to that content view version (I only tested with 1 repo)
- Try hammer capsule content info

Actions #1

Updated by Ian Ballou about 2 months ago

  • Target version changed from Katello 4.16.0 to Katello 4.15.0
  • Triaged changed from No to Yes
  • Red Hat JIRA set to SAT-28743

Include this in 4.15.1 if 4.15.0 closes first.

Actions #2

Updated by Chris Roberts 27 days ago

  • Status changed from New to Closed
  • Assignee set to Chris Roberts
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/970 added
Actions

Also available in: Atom PDF