-
Bug
-
Resolution: Done
-
Blocker
-
6.18.0
-
False
-
foreman-3.16.0.2-1.el9sat
-
Satellite Rocket Sprint 3, Satellite Rocket Sprint 4, Satellite Rocket Sprint 6
-
sat-rocket
-
None
-
None
-
Rejected
-
None
-
Yes
Description of problem:
During the RHSM fact upload, compute resources are missing, which causes the provisioning process to fail and results in an error:
NoMethodError: undefined method `[]' for nil:NilClass 2025-08-18T01:48:42 [I|app|3d42af70] Started POST "/rhsm/consumers?owner=Default_Organization&activation_keys=act_key" for 10.0.39.42 at 2025-08-18 01:48:42 -0400 2025-08-18T01:48:42 [I|app|3d42af70] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON 2025-08-18T01:48:42 [I|app|3d42af70] Parameters: \{"type"=>"system", "name"=>"diana-belnas.amol.foo", "facts"=>"[FILTERED]", "installedProducts"=>[{"productId"=>"479", "productName"=>"Red Hat Enterprise Linux for x86_64", "version"=>"8.10", "arch"=>"x86_64"}], "contentTags"=>["rhel-8-x86_64", "rhel-8"], "role"=>"", "addOns"=>[], "usage"=>"", "serviceLevel"=>"", "owner"=>"Default_Organization", "activation_keys"=>"act_key"} 2025-08-18T01:48:42 [E|kat|3d42af70] NoMethodError: undefined method `[]' for nil:NilClass 3d42af70 | /usr/share/foreman/app/models/concerns/hostext/operating_system.rb:41:in `template_kinds' 3d42af70 | /usr/share/foreman/app/models/concerns/orchestration/templates.rb:43:in `kind' 3d42af70 | /usr/share/foreman/app/models/concerns/orchestration/templates.rb:35:in `template' 3d42af70 | /usr/share/foreman/app/models/concerns/orchestration/templates.rb:12:in `queue_render_checks' 3d42af70 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/callbacks.rb:400:in `block in make_lambda' 3d42af70 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/callbacks.rb:247:in `block in halting' 3d42af70 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/callbacks.rb:599:in `block in invoke_after' 3d42af70 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/callbacks.rb:599:in `each' 3d42af70 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/callbacks.rb:599:in `invoke_after' 3d42af70 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/callbacks.rb:108:in `run_callbacks' 3d42af70 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/callbacks.rb:929:in `_run_validation_callbacks' 3d42af70 | /usr/share/gems/gems/activemodel-7.0.8.7/lib/active_model/validations/callbacks.rb:115:in `run_validations!' 3d42af70 | /usr/share/gems/gems/activemodel-7.0.8.7/lib/active_model/validations.rb:337:in `valid?' 3d42af70 | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/validations.rb:68:in `valid?' 3d42af70 | /usr/share/foreman/app/models/concerns/orchestration.rb:83:in `valid?' 3d42af70 | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/validations.rb:84:in `perform_validations' 3d42af70 | /usr/share/gems/gems/activerecord-7.0.8.7/lib/active_record/validations.rb:53:in `save!'
How reproducible:
Always
Is this issue a regression from an earlier version:
Yes, from snap 120.
Steps to Reproduce:
1. Create a VMware Compute Resource and then create an image in it.
2. Use this image to provision a host.
3. check /var/log/foreman/production.log
Actual behavior:
In the fact upload, the CR parameter is missing, which is causing the image-based provisioning to fail.
Expected behavior:
The CR parameter should be present; otherwise, it may cause further issues.