Project

General

Profile

Actions

Bug #32150

closed

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

Added by Hao Yu about 3 years ago. Updated almost 3 years ago.

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

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

Actions #1

Updated by Ian Ballou about 3 years ago

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

Updated by The Foreman Bot about 3 years ago

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

Updated by Jonathon Turel about 3 years ago

  • Assignee set to Lucy Fu
Actions #4

Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases Katello 4.2.0 added
Actions #5

Updated by Lucy Fu about 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Jeremy Lenz almost 3 years 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
Actions

Also available in: Atom PDF