Project

General

Profile

Bug #32150

Hypervisor task failed with NoMethodError: undefined method `split` for nil:NilClass

Added by Hao Yu over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from bugzilla 1941443

Description of problem:
When a RHEL based hypervisor is also registered to the Satellite or for any reason that a hypervisor has operating system set. The hypervisor task will fail with the following error:

------------------------------------------------------------
Error:
NoMethodError
undefined method `split' for nil:NilClass
---
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.11/app/models/katello/host/subscription_facet.rb:228:in
`ignore_os?'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.11/app/models/katello/host/subscription_facet.rb:215:in
`update_facts'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.11/app/lib/actions/katello/host/hypervisors_update.rb:179:in
`update_facts'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.11/app/lib/actions/katello/host/hypervisors_update.rb:32:in
`block (2 levels) in run'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.11/app/lib/actions/katello/host/hypervisors_update.rb:31:in
`each'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.11/app/lib/actions/katello/host/hypervisors_update.rb:31:in
`block in run'"
- "/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'"
- "/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.11/app/lib/actions/katello/host/hypervisors_update.rb:18:in
`run'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:571:in
`block (3 levels) in execute_run'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in
`pass'"
------------------------------------------------------------

This is because virt-who doesn't report the operating system facts of the hypervisor but Satellite is expecting it.

Steps to Reproduce:
1. Prepare a host running libvirt and register the host to the Satellite.
2. On Satellite, add the virt-who config for this host and deploy the config.
3. Then run "virt-who -do"

Actual results:
Error:
NoMethodError
undefined method `split' for nil:NilClass

Expected results:
Hypvervisor task finishes without error

Associated revisions

Revision 28976c3d (diff)
Added by Lucy Fu over 1 year ago

Fixes #32150 - rhsm facts may not always have a distribution version

History

#1 Updated by Ian Ballou over 1 year ago

  • Triaged changed from No to Yes
  • Target version set to Katello 4.1.0

#2 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9252 added

#3 Updated by Jonathon Turel over 1 year ago

  • Assignee set to Lucy Fu

#4 Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases Katello 4.2.0 added

#5 Updated by Lucy Fu over 1 year ago

  • Status changed from Ready For Testing to Closed

#6 Updated by Jeremy Lenz over 1 year ago

  • Subject changed from Hypervisor task failed with NoMethodError: undefined method `split' for nil:NilClass to Hypervisor task failed with NoMethodError: undefined method `split` for nil:NilClass

Also available in: Atom PDF