Project

General

Profile

Actions

Bug #36271

closed

In report template, the host_latest_applicable_rpm_version global method results in error and report to not generate

Added by Brian Frost over 1 year ago. Updated over 1 year ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Example:

Using the method like so ''Latest Available Kernel': host_latest_applicable_rpm_version(host, 'kernel')' causes the error 'undefined method `nvra' for nil:NilClass'

Further information in /var/log/foreman/production.log:

2023-04-03T14:22:14 [E|app|8e502369] Error performing TemplateRenderJob (Job ID: a4be94d9-06f7-401c-9a03-79668dbf7ff3) from Dynflow(default) in 57.76ms: NoMethodError (undefined method `nvra' for nil:NilClass):
/usr/share/gems/gems/katello-4.7.4/app/lib/katello/concerns/base_template_scope_extensions.rb:164:in `host_latest_applicable_rpm_version'
/usr/share/gems/gems/safemode-1.3.7/lib/safemode/scope.rb:37:in `method_missing'
Host - Server compliance report:70:in `block in bind'
/usr/share/gems/gems/activerecord-6.1.7.2/lib/active_record/relation/batches/batch_enumerator.rb:40:in `block (2 levels) in each_record'
/usr/share/gems/gems/activerecord-6.1.7.2/lib/active_record/relation/batches/batch_enumerator.rb:40:in `each'
/usr/share/gems/gems/activerecord-6.1.7.2/lib/active_record/relation/batches/batch_enumerator.rb:40:in `block in each_record'
/usr/share/gems/gems/activerecord-6.1.7.2/lib/active_record/relation/batches.rb:245:in `block in in_batches'
/usr/share/gems/gems/activerecord-6.1.7.2/lib/active_record/relation/batches.rb:229:in `loop'
/usr/share/gems/gems/activerecord-6.1.7.2/lib/active_record/relation/batches.rb:229:in `in_batches'
/usr/share/gems/gems/activerecord-6.1.7.2/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each'
/usr/share/gems/gems/activerecord-6.1.7.2/lib/active_record/relation/batches/batch_enumerator.rb:39:in `each_record'
/usr/share/gems/gems/safemode-1.3.7/lib/safemode/jail.rb:31:in `method_missing'


Related issues 1 (0 open1 closed)

Is duplicate of Katello - Feature #30664: "Installable Errata" in report templateClosedIan BallouActions
Actions #1

Updated by Brian Frost over 1 year ago

Problem has been observed in katello 4.7.4 and 4.6.2. Previous version of Katello did not have this issue.

Actions #2

Updated by Partha Aji over 1 year ago

  • Status changed from New to Duplicate
Actions #3

Updated by Partha Aji over 1 year ago

  • Target version set to Katello Recycle Bin
  • Triaged changed from No to Yes
Actions #4

Updated by Ian Ballou over 1 year ago

  • Is duplicate of Feature #30664: "Installable Errata" in report template added
Actions #5

Updated by Ian Ballou over 1 year ago

  • Target version deleted (Katello Recycle Bin)

I'm already fixing this bug in the PR associated to https://projects.theforeman.org/issues/30664

Actions #6

Updated by Ian Ballou over 1 year ago

  • Target version set to Katello Recycle Bin
Actions

Also available in: Atom PDF