Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1941443 - Hypervisor task failed with NoMethodError: undefined method `split' for nil:NilClass
Summary: Hypervisor task failed with NoMethodError: undefined method `split' for nil:N...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Virt-who Configure Plugin
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: 6.10.0
Assignee: Marek Hulan
QA Contact: Kunxin Huang
satellite-doc-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-22 06:43 UTC by Hao Chang Yu
Modified: 2021-11-16 14:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:10:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 32150 0 Normal New Hypervisor task failed with NoMethodError: undefined method `split' for nil:NilClass 2021-03-22 06:47:52 UTC
Red Hat Knowledge Base (Solution) 5250841 0 None None None 2021-03-31 06:50:36 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:10:42 UTC

Description Hao Chang Yu 2021-03-22 06:43:32 UTC
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

Comment 1 Bryan Kearney 2021-03-31 16:02:42 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32150 has been resolved.

Comment 2 Kunxin Huang 2021-06-09 10:05:44 UTC
Verified this issue with Snap6.10_3.0:

Steps:
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"

Result:

-------------
[root@ent-02-vm-02 virt-who.d]# hammer task show --id 615ac194-f0d3-4944-a288-3a1f9ec9fd44
ID:          615ac194-f0d3-4944-a288-3a1f9ec9fd44
Action:      Hypervisors 
State:       stopped
Result:      success
Started at:  2021/06/09 10:00:49
Ended at:    2021/06/09 10:00:50
Owner:       virt_who_reporter_64
Task errors:

[root@ent-02-vm-02 virt-who.d]# 
------------

Hypvervisor task finishes without error

Comment 5 errata-xmlrpc 2021-11-16 14:10:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702


Note You need to log in before you can comment on or make changes to this bug.